@ @@CosnotraLF
#import <substrate.h>
#define plistPath @"/var/mobile/Library/Preferences/minecraftpehack.plist"
inline BOOL GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] boolValue];
}
void (*Originals_Entity_setPos)(void *self, float x, float y, float z)
void Entity_setPos(void *self, float x, float b, float z)
{
if(GetPrefBool(@"kPosHack"))
{
x = 1.0f;
y = 2.0f;
z = 3.0f;
}
else
{
return Originals_Entity_setPos(self, x, y, z);
}
}
%ctor
{
MSHookFunction((MSFindSymbol(NULL, "_ZN6Entity6setPosEfff")),(void *)Entity_setPos,(void **)&Originals_Entity_setPos);
}
the Entity * hidden this is a pointer to the entity class... u can ignore it