Fix Furnace Visual Bug

This commit is contained in:
TheBrokenRail 2024-01-07 04:57:16 -05:00
parent e4d9ee4f20
commit 67a0d3017b
2 changed files with 18 additions and 0 deletions

View File

@ -517,6 +517,20 @@ static void glColor4f_injection(__attribute__((unused)) GLfloat red, __attribute
}
#endif
// Fix Furnace Visual Bug
static int FurnaceTileEntity_getLitProgress_injection(FurnaceTileEntity *furnace, int max) {
// Call Original Method
int ret = FurnaceTileEntity_getLitProgress(furnace, max);
// Fix Bug
if (ret > max) {
ret = max;
}
// Return
return ret;
}
// Init
static void nop() {
}
@ -694,6 +708,9 @@ void init_misc() {
}
#endif
// Fix Furnace Visual Bug
overwrite_calls((void *) FurnaceTileEntity_getLitProgress, (void *) FurnaceTileEntity_getLitProgress_injection);
// Init C++ And Logging
_init_misc_cpp();
_init_misc_logging();

View File

@ -2,3 +2,4 @@ extends TileEntity;
virtual-method ItemInstance *getItem(int slot) = 0x2c;
static-method int getBurnDuration(ItemInstance *item_instance) = 0xd33f8;
method int getLitProgress(int max) = 0xd3240;