diff --git a/libreborn/include/libreborn/minecraft.h b/libreborn/include/libreborn/minecraft.h index 60744c4..5391515 100644 --- a/libreborn/include/libreborn/minecraft.h +++ b/libreborn/include/libreborn/minecraft.h @@ -183,6 +183,8 @@ static void *TextEditScreen_updateEvents_vtable_addr = (void *) 0x10531c; // ProgressScreen +#define PROGRESS_SCREEN_SIZE 0x4c + typedef void *(*ProgressScreen_t)(unsigned char *obj); static ProgressScreen_t ProgressScreen = (ProgressScreen_t) 0x37044; diff --git a/mods/src/misc/misc.cpp b/mods/src/misc/misc.cpp index bb6c384..44e9f31 100644 --- a/mods/src/misc/misc.cpp +++ b/mods/src/misc/misc.cpp @@ -45,7 +45,7 @@ static int32_t Inventory_setupDefault_FillingContainer_addItem_call_injection(un // Bonemeal Is Already In The Creative Inventory continue; } - unsigned char *item_instance = (unsigned char *) ::operator new(0xc); + unsigned char *item_instance = (unsigned char *) ::operator new(ITEM_INSTANCE_SIZE); item_instance = (*ItemInstance_constructor_item_extra)(item_instance, *Item_dye_powder, 1, i); (*FillingContainer_addItem)(filling_container, item_instance); } diff --git a/mods/src/server/server.cpp b/mods/src/server/server.cpp index 1b8e9a4..19fd484 100644 --- a/mods/src/server/server.cpp +++ b/mods/src/server/server.cpp @@ -86,7 +86,7 @@ static void start_world(unsigned char *minecraft) { (*Minecraft_hostMultiplayer)(minecraft, port); INFO("Listening On: %i", port); - void *screen = ::operator new(0x4c); + void *screen = ::operator new(PROGRESS_SCREEN_SIZE); screen = (*ProgressScreen)((unsigned char *) screen); (*Minecraft_setScreen)(minecraft, (unsigned char *) screen); }