From d0954a22f3a25d68ed2110da349b6365be7771a8 Mon Sep 17 00:00:00 2001 From: Bigjango13 Date: Tue, 2 Apr 2024 15:03:38 -0700 Subject: [PATCH] More symbols, remove Entity_moveTo --- symbols/CMakeLists.txt | 2 ++ symbols/src/entity/Entity.def | 5 +++-- symbols/src/item/AuxDataTileItem.def | 4 ++-- symbols/src/item/ItemRenderer.def | 4 ++++ symbols/src/item/TileItem.def | 4 ++++ symbols/src/item/TilePlanterItem.def | 6 ++++++ symbols/src/level/ChunkSource.def | 1 + symbols/src/level/Level.def | 13 ++++++++++++- symbols/src/level/LevelChunk.def | 1 + symbols/src/level/Material.def | 1 + symbols/src/tile/Tile.def | 2 ++ symbols/src/tile/entity/TileEntityRenderer.def | 2 ++ 12 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 symbols/src/item/TilePlanterItem.def create mode 100644 symbols/src/level/LevelChunk.def diff --git a/symbols/CMakeLists.txt b/symbols/CMakeLists.txt index 22beb9f4da..90d452d815 100644 --- a/symbols/CMakeLists.txt +++ b/symbols/CMakeLists.txt @@ -73,6 +73,7 @@ set(SRC src/level/LevelSource.def src/level/ExternalFileLevelStorageSource.def src/level/Biome.def + src/level/LevelChunk.def src/level/ChunkSource.def src/level/ChunkCache.def src/level/LightLayer.def @@ -97,6 +98,7 @@ set(SRC src/item/ArmorMaterial.def src/item/ArmorItem.def src/item/TileItem.def + src/item/TilePlanterItem.def src/item/FoodItem.def src/item/DiggerItem.def src/api/OffsetPosTranslator.def diff --git a/symbols/src/entity/Entity.def b/symbols/src/entity/Entity.def index 77e96c5dee..cf62518d61 100644 --- a/symbols/src/entity/Entity.def +++ b/symbols/src/entity/Entity.def @@ -1,6 +1,9 @@ vtable 0x10a548; virtual-method void remove() = 0x10; +// The difference between move and moveTo is that move is relative and moveTo is absolute +virtual-method void move(float xo, float yo, float zo) = 0x18; +virtual-method void moveTo(float x, float y, float z, float yaw, float pitch) = 0x1c; virtual-method void tick() = 0x34; virtual-method float getBrightness(float param_1) = 0x64; virtual-method bool interact(Player *with) = 0x6c; @@ -17,8 +20,6 @@ virtual-method bool isHangingEntity() = 0xf0; // The owner entity id for arrows/throwables, else 0 virtual-method int getAuxData() = 0xf4; -method void moveTo(float x, float y, float z, float yaw, float pitch) = 0x7a834; - property float x = 0x4; property float y = 0x8; property float z = 0xc; diff --git a/symbols/src/item/AuxDataTileItem.def b/symbols/src/item/AuxDataTileItem.def index 74806563f1..e8004f2792 100644 --- a/symbols/src/item/AuxDataTileItem.def +++ b/symbols/src/item/AuxDataTileItem.def @@ -1,7 +1,7 @@ -extends Item; +extends TileItem; vtable 0x114a58; - +vtable-size 0x98; size 0x2c; property Tile *icon_tile = 0x28; diff --git a/symbols/src/item/ItemRenderer.def b/symbols/src/item/ItemRenderer.def index 19ee7564a7..0d981ac392 100644 --- a/symbols/src/item/ItemRenderer.def +++ b/symbols/src/item/ItemRenderer.def @@ -3,3 +3,7 @@ static-method void renderGuiItem_two(Font *font, Textures *textures, ItemInstanc static-method void renderGuiItemCorrect(Font *font, Textures *textures, ItemInstance *item_instance, int x, int y) = 0x639a0; static-method void renderGuiItemDecorations(ItemInstance *item, float x, float y) = 0x63748; static-method void blit(float x, float y, float texture_x, float texture_y, float w, float h) = 0x638c0; + +// This doesn't include things that it doesn't need for item renderering (like the level) +// So if you are (ab)using it for something else, be sure to set what you need +static-property TileRenderer *tileRenderer = 0x137c18; diff --git a/symbols/src/item/TileItem.def b/symbols/src/item/TileItem.def index 6e92e2aa6d..24f543612d 100644 --- a/symbols/src/item/TileItem.def +++ b/symbols/src/item/TileItem.def @@ -1,3 +1,7 @@ extends Item; +vtable 0x114cd8; +vtable-size 0x98; +size 0x2c; + constructor (int id) = 0xce3a4; diff --git a/symbols/src/item/TilePlanterItem.def b/symbols/src/item/TilePlanterItem.def new file mode 100644 index 0000000000..d6a77770cf --- /dev/null +++ b/symbols/src/item/TilePlanterItem.def @@ -0,0 +1,6 @@ +extends Item; + +size 0x28; +vtable 0x10ecb0; + +property int tile_id = 0x24; diff --git a/symbols/src/level/ChunkSource.def b/symbols/src/level/ChunkSource.def index 64aa22465d..8d54ec351e 100644 --- a/symbols/src/level/ChunkSource.def +++ b/symbols/src/level/ChunkSource.def @@ -1,3 +1,4 @@ vtable 0x10fb88; +virtual-method LevelChunk *getChunk(int chunk_x, int chunk_y) = 0xc; virtual-method void postProcess(ChunkSource *chunk_source, int chunk_x, int chunk_y) = 0x14; diff --git a/symbols/src/level/Level.def b/symbols/src/level/Level.def index 454eb2fc43..44f1d43d83 100644 --- a/symbols/src/level/Level.def +++ b/symbols/src/level/Level.def @@ -4,8 +4,15 @@ vtable 0x10fcf0; method void saveLevelData() = 0xa2e94; method void setTile(int x, int y, int z, int id) = 0xa3904; +method void setData(int x, int y, int z, int data) = 0xa394c; method void setTileAndData(int x, int y, int z, int id, int data) = 0xa38b4; method void setTileAndDataNoUpdate(int x, int y, int z, int id, int data) = 0xa33d0; +// Calls setTileDirty and updateNearbyTiles +method void tileUpdated(int x, int y, int z, int id) = 0xa387c; +method void setTileDirty(int x, int y, int z) = 0xa3508; +// Calls neighborChanged for all adjacent tiles +method void updateNearbyTiles(int x, int y, int z, int id) = 0xa36cc; +method void neighborChanged(int x, int y, int z, int id) = 0xa3658; // clip_liquids and clip_hitboxes default to true // If clip_hitboxes is true it will ignore blocks that have their getAABB return NULL method HitResult clip(uchar *param_1, uchar *param_2, bool clip_liquids, bool clip_hitboxes) = 0xa3db0; @@ -29,6 +36,7 @@ method TileEntity *getTileEntity(int x, int y, int z) = 0xa55d4; method void setTileEntity(int x, int y, int z, TileEntity *tileEntity) = 0xa7b58; method void removeTileEntity(int x, int y, int z) = 0xa7aac; method void animateTick(int x, int y, int z) = 0xa5920; +method void addToTickNextTick(int x, int y, int z, int id, int delay) = 0xa7428; // Called by trapdoors, doors, and tnt method bool hasNeighborSignal(int x, int y, int z) = 0xa5f08; // Called by hasNeighborSignal @@ -42,8 +50,11 @@ virtual-method void tick() = 0x28; virtual-method void updateSleepingPlayerList() = 0x2c; virtual-method ChunkCache *createChunkSource() = 0x30; +property bool is_client_side = 0x11; property bool done_generating = 0x12; property std::vector entities = 0x20; property std::vector tileentities = 0x50; property std::vector players = 0x60; -property Dimension *dimension = 0x74; \ No newline at end of file +property Dimension *dimension = 0x74; +property ChunkSource *chunk_source = 0xa5c; +property bool no_update = 0x70; diff --git a/symbols/src/level/LevelChunk.def b/symbols/src/level/LevelChunk.def new file mode 100644 index 0000000000..01c5bd442e --- /dev/null +++ b/symbols/src/level/LevelChunk.def @@ -0,0 +1 @@ +vtable 0x110268; diff --git a/symbols/src/level/Material.def b/symbols/src/level/Material.def index bfde2e0f78..19998ea38f 100644 --- a/symbols/src/level/Material.def +++ b/symbols/src/level/Material.def @@ -3,6 +3,7 @@ virtual-method bool isSolid() = 0x8; // Globals static-property Material *dirt = 0x180a94; static-property Material *stone = 0x180a9c; +static-property Material *wood = 0x180a98; static-property Material *metal = 0x180aa0; static-property Material *plant = 0x180ab0; static-property Material *glass = 0x180acc; diff --git a/symbols/src/tile/Tile.def b/symbols/src/tile/Tile.def index abdf9a7a41..bf0987399e 100644 --- a/symbols/src/tile/Tile.def +++ b/symbols/src/tile/Tile.def @@ -18,6 +18,8 @@ virtual-method int getTexture1() = 0x28; virtual-method int getTexture2(int face, int data) = 0x2c; virtual-method int getTexture3(LevelSource *level, int x, int y, int z, int face) = 0x30; virtual-method AABB *getAABB(Level *level, int x, int y, int z) = 0x34; +// Chain Tile_setShape_non_virtual and Tile_addAABBs_non_virtual, look at how stairs and fences do it +virtual-method void addAABBs(Level *level, int x, int y, int z, AABB *intersecting, std::vector *aabbs) = 0x38; virtual-method bool isSolidRender() = 0x40; virtual-method bool mayPlace(Level *level, int x, int y, int z, uchar face) = 0x4c; virtual-method bool mayPlace2(Level *level, int x, int y, int z) = 0x50; diff --git a/symbols/src/tile/entity/TileEntityRenderer.def b/symbols/src/tile/entity/TileEntityRenderer.def index 57434d7422..766af4ee0e 100644 --- a/symbols/src/tile/entity/TileEntityRenderer.def +++ b/symbols/src/tile/entity/TileEntityRenderer.def @@ -8,4 +8,6 @@ virtual-method void render(TileEntity *tileentity, float x, float y, float z, fl virtual-method void onGraphicsReset() = 0xc; virtual-method void onNewLevel(Level *level) = 0x10; +method void bindTexture(std::string *file) = 0x67638; + property TileEntityRenderDispatcher *tileEntityRenderDispatcher = 0x4;