Skip to content

Instantly share code, notes, and snippets.

@byteandahalf
Last active August 29, 2015 14:15
Show Gist options
  • Save byteandahalf/9e4b9338b692c2177380 to your computer and use it in GitHub Desktop.
Save byteandahalf/9e4b9338b692c2177380 to your computer and use it in GitHub Desktop.
Full entity struct :D
class Entity {
void** vtable; // 0
SynchedEntityData data; // 4; 28 bytes
float x; // 32
float y; // 36
float z; // 40
ChunkPos chunkPos; // 44; 8 bytes
int entityId; // 52
float viewScale; // 56
TileSource* region; // 60
bool added; // 64; aligned 4 bytes
Level* level; // 68
float xo; // 72
float yo; // 76
float zo; // 80
float motionX; // 84
float motionY; // 88
float motionZ; // 92
float yaw; // 96
float pitch; // 100
float prevYaw; // 104
float prevPitch; // 108
float rideYaw; // 112
float ridePitch; // 116
float terrainSurfaceOffset; // 120
Vec3 lastLightDir; // 124
Color lastLightColor; // 136
AABB bb; // 152
float heightOffset; // 180
float width; // 184
float height; // 188
float prevWalkDist; // 192
float walkDist; // 196
float xold; // 200
float yold; // 204
float zold; // 208
float slideOffset; // 212
float shoeSize; // 216
float pushThrough; // 220
int ticks; // 224
int invulnerableTime; // 228
int airSupply; // 232
int onFire; // 236
int fireticks; // 240
int renderType; // 244
Entity* rider; // 248
Entity* riding; // 252
float fallDist; // 256
bool blocksBuilding; // 260; alot of crazy bools, aligning goes nuts here. Offsets may vary.
bool onGround; // 261
bool horizontalCollision; // 262
bool verticalCollision; // 263
bool collision; // 264
bool hurtMarked; // 265
bool noPhysics; // 266
bool invisible; // 267
bool reallyRemoveIfPlayer; // 268
bool wasInWater; // 269
int airCapacity; // 270
bool makeStepSound; // 274
bool fireImmune; // 275
bool firstTick; // 286
int nextStep; // 277
bool stuckInWeb; // 281
bool dead; // 285
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment