From 5d57253d563f9d8c6ccff8740634b036a6f7c50a Mon Sep 17 00:00:00 2001 From: Bigjango13 Date: Mon, 12 Feb 2024 18:31:05 -0500 Subject: [PATCH] More symbols and better patch error message --- libreborn/src/patch/patch.cpp | 2 +- symbols/src/entity/Entity.def | 1 + symbols/src/item/Item.def | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libreborn/src/patch/patch.cpp b/libreborn/src/patch/patch.cpp index 070c8d6..b6c4ebd 100644 --- a/libreborn/src/patch/patch.cpp +++ b/libreborn/src/patch/patch.cpp @@ -132,7 +132,7 @@ static void safe_mprotect(void *addr, size_t len, int prot) { } void _patch(const char *file, int line, void *start, unsigned char patch[4]) { if (((uint32_t) start) % 4 != 0) { - ERR("Invalid Address"); + ERR("Invalid Address: %p", start); } // Get Current Permissions diff --git a/symbols/src/entity/Entity.def b/symbols/src/entity/Entity.def index 29c3181..e9ca743 100644 --- a/symbols/src/entity/Entity.def +++ b/symbols/src/entity/Entity.def @@ -32,6 +32,7 @@ property float pitch = 0x44; property float old_yaw = 0x48; property float old_pitch = 0x4c; property AABB hitbox = 0x50; +property int fire_timer = 0xa0; property int renderer_id = 0xa8; property bool on_ground = 0xb2; property bool freeze_physics = 0xb9; diff --git a/symbols/src/item/Item.def b/symbols/src/item/Item.def index b937e36..107f2ca 100644 --- a/symbols/src/item/Item.def +++ b/symbols/src/item/Item.def @@ -14,6 +14,7 @@ virtual-method int getUseDuration(ItemInstance *item_instance) = 0x24; virtual-method ItemInstance useTimeDepleted(ItemInstance *item_instance, Level *level, Player *player) = 0x28; virtual-method int getDestorySpeed(ItemInstance *item_instance, Tile *tile) = 0x2c; virtual-method ItemInstance *use(ItemInstance *item_instance, Level *level, Player *player) = 0x30; +virtual-method void hurtEnemy(ItemInstance *itemInstance, Mob *mob) = 0x44; virtual-method bool mineBlock(ItemInstance *instance, int tile_id, int x, int y, int z) = 0x48; // Not just enemy, but any entity virtual-method void interactEnemy(ItemInstance *item_instance, Mob *mob) = 0x54;