diff --git a/dependencies/symbol-processor/src b/dependencies/symbol-processor/src index 2390ef0..8bca4b7 160000 --- a/dependencies/symbol-processor/src +++ b/dependencies/symbol-processor/src @@ -1 +1 @@ -Subproject commit 2390ef024752785e7e6e492feca5fec08014fa06 +Subproject commit 8bca4b7ec6aa28ef6fbc894d1f358468bcc4b321 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f4b0f8a..ef1feb5 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,13 +1,16 @@ # Changelog +**3.0.0** +* Add ``Add Cake`` Feature Flag (Enabled By Default) +* Add Milk Buckets +* Implement Crafting Remainders +* Add Death Messages + **2.5.3** * Add `Replace Block Highlight With Outline` Feature Flag (Enabled By Default) * By Default, The Outline Width Is Set Using The GUI Scale * This Can Be Overridden Using The ``MCPI_BLOCK_OUTLINE_WIDTH`` Environmental Variable * Added ``overwrite_calls_within`` Function -* Add ``Add Cake`` Feature Flag (Enabled By Default) -* Add Milk Buckets -* Implement Crafting Remainders **2.5.2** * Add `3D Chest Model` Feature Flag (Enabled By Default) diff --git a/mods/include/mods/bucket/bucket.h b/mods/include/mods/bucket/bucket.h index de355c4..2547d63 100644 --- a/mods/include/mods/bucket/bucket.h +++ b/mods/include/mods/bucket/bucket.h @@ -1 +1,3 @@ -bool buckets_enabled(); +#pragma once + +extern bool buckets_enabled; diff --git a/mods/src/bucket/bucket.cpp b/mods/src/bucket/bucket.cpp index 0f7c90e..22af894 100644 --- a/mods/src/bucket/bucket.cpp +++ b/mods/src/bucket/bucket.cpp @@ -200,6 +200,8 @@ static FoodItem *create_bucket(int32_t id, int32_t texture_x, int32_t texture_y, item->max_damage = 0; item->max_stack_size = 1; item->nutrition = 0; + item->unknown_param_1 = 0.6; + item->meat = false; // Return return item; @@ -336,19 +338,17 @@ static void FurnaceTileEntity_tick_ItemInstance_setNull_injection(ItemInstance * } } +// Add the bucket name to the language file static void Language_injection(__attribute__((unused)) void *null) { I18n__strings.insert(std::make_pair("item.bucketMilk.name", "Milk Bucket")); } // Init -bool buckets_enabled() { - static bool ret = feature_has("Add Buckets", server_enabled); - return ret; -} - +bool buckets_enabled = false; void init_bucket() { // Add Buckets - if (buckets_enabled()) { + buckets_enabled = feature_has("Add Buckets", server_enabled); + if (buckets_enabled) { // Add Items misc_run_on_items_setup(Item_initItems_injection); // Change Max Stack Size Based On Auxiliary diff --git a/mods/src/cake/cake.cpp b/mods/src/cake/cake.cpp index e922975..c9c0034 100644 --- a/mods/src/cake/cake.cpp +++ b/mods/src/cake/cake.cpp @@ -16,7 +16,7 @@ static std::string Cake_getDescriptionId(__attribute__((unused)) Tile *tile) { } // Textures -static int Cake_getTexture2(__attribute__((unused)) Tile *tile, int face) { +static int Cake_getTexture2(__attribute__((unused)) Tile *tile, int face, __attribute__((unused)) int data) { if (face == 1) { // Top texture return 121; @@ -38,7 +38,7 @@ static int Cake_getTexture3(__attribute__((unused)) Tile *tile, LevelSource *lev } } // Normal - return Cake_getTexture2(tile, face); + return Cake_getTexture2(tile, face, 0); } // Rendering @@ -235,7 +235,7 @@ void init_cake() { if (feature_has("Add Cake", server_enabled)) { misc_run_on_tiles_setup(Tile_initTiles_injection); misc_run_on_creative_inventory_setup(Inventory_setupDefault_FillingContainer_addItem_call_injection); - if (buckets_enabled()) { + if (buckets_enabled) { // The recipe needs milk buckets misc_run_on_recipes_setup(Recipes_injection); } diff --git a/mods/src/death/death.cpp b/mods/src/death/death.cpp index 16d653e..606ece2 100644 --- a/mods/src/death/death.cpp +++ b/mods/src/death/death.cpp @@ -134,6 +134,7 @@ void init_death() { overwrite_calls((void *) Mob_hurt_non_virtual, (void *) Mob_hurt_injection); } // Fix TNT + // This changes PrimedTnt_explode from Level_explode(NULL, x, y, z, 3.1f) to Level_explode(this, x, y, z, 3.1f) unsigned char cpy_r1_r0_patch[4] = {0x00, 0x10, 0xa0, 0xe1}; // "cpy r1,r0" patch((void *) 0x87998, cpy_r1_r0_patch); unsigned char ldr_r0_24_patch[4] = {0x24, 0x00, 0x90, 0xe5}; // "ldr r0,[r0,#0x24]" diff --git a/symbols/src/gui/Gui.def b/symbols/src/gui/Gui.def index fc7595a..dc477cd 100644 --- a/symbols/src/gui/Gui.def +++ b/symbols/src/gui/Gui.def @@ -12,6 +12,7 @@ method void addMessage(std::string *text) = 0x27820; method void getSlotPos(int slot, int *x, int *y) = 0x25548; method void renderSlot(int slot, int x, int y, float alpha) = 0x25cc0; method void renderSlotText(ItemInstance *item, float x, float y, bool finite, bool shadow) = 0x25df8; +method void renderHearts() = 0x2641c; property Minecraft *minecraft = 0x9f4; property float selected_item_text_timer = 0x9fc; diff --git a/symbols/src/gui/components/GuiComponent.def b/symbols/src/gui/components/GuiComponent.def index 93a801c..4a14dc1 100644 --- a/symbols/src/gui/components/GuiComponent.def +++ b/symbols/src/gui/components/GuiComponent.def @@ -7,3 +7,4 @@ method void blit(int x_dest, int y_dest, int x_src, int y_src, int width_dest, i method void drawCenteredString(Font *font, std::string *text, int x, int y, int color) = 0x2821c; method void drawString(Font *font, std::string *text, int x, int y, int color) = 0x28284; method void fill(int x1, int y1, int x2, int y2, uint color) = 0x285f0; +method void fillGradient(int x1, int y1, int x2, int y2, int color1, int color2) = 0x287c0; \ No newline at end of file diff --git a/symbols/src/gui/screens/Screen.def b/symbols/src/gui/screens/Screen.def index 79c3818..8f2ecff 100644 --- a/symbols/src/gui/screens/Screen.def +++ b/symbols/src/gui/screens/Screen.def @@ -6,23 +6,23 @@ constructor () = 0x29028; vtable-size 0x74; vtable 0x1039d8; -virtual-method void updateEvents() = 0x14; -virtual-method void keyboardNewChar(char key) = 0x70; -virtual-method void keyPressed(int key) = 0x6c; +virtual-method void init() = 0xc; virtual-method void render(int x, int y, float param_1) = 0x8; +virtual-method void setupPositions() = 0x10; +virtual-method void updateEvents() = 0x14; virtual-method bool handleBackEvent(bool param_1) = 0x24; virtual-method void tick() = 0x28; -virtual-method void buttonClicked(Button *button) = 0x60; -virtual-method void init() = 0xc; -virtual-method void mouseClicked(int x, int y, int param_1) = 0x64; virtual-method void removed() = 0x2c; virtual-method void renderBackground() = 0x30; -virtual-method void setupPositions() = 0x10; +virtual-method void buttonClicked(Button *button) = 0x60; +virtual-method void mouseClicked(int x, int y, int param_1) = 0x64; +virtual-method void keyPressed(int key) = 0x6c; +virtual-method void keyboardNewChar(char key) = 0x70; -property Minecraft *minecraft = 0x14; -property std::vector