Stop Doors And Trapdoors Closing When Updated
This commit is contained in:
parent
de378826bf
commit
1417bf6269
@ -68,6 +68,7 @@
|
||||
* `Fix Eggs Spawning Abnormally Healthy Chickens` (Enabled By Default)
|
||||
* `Correctly Close API Sockets` (Enabled By Default)
|
||||
* `Optimized API Sockets` (Enabled By Default)
|
||||
* `Stop Doors And Trapdoors Closing When Updated` (Disabled By Default)
|
||||
* Existing Functionality (All Enabled By Default)
|
||||
* `Fix Screen Rendering When Hiding HUD`
|
||||
* `Sanitize Usernames`
|
||||
|
@ -160,3 +160,4 @@ CATEGORY Miscellaneous
|
||||
TRUE Add Camera Functionality
|
||||
TRUE Update Default Options
|
||||
TRUE Remove Chest Placement Restrictions
|
||||
FALSE Stop Doors And Trapdoors Closing When Updated
|
@ -698,6 +698,14 @@ void init_misc() {
|
||||
overwrite_call((void *) 0x7de0c, Chicken_moveTo, ThrownEgg_onHit_Chicken_moveTo_injection);
|
||||
}
|
||||
|
||||
// Stop Doors And Trapdoors Closing When Updated
|
||||
if (feature_has("Stop Doors And Trapdoors Closing When Updated", server_disabled)) {
|
||||
// Patch out the `setOpen` call for doors and trap doors in neighborChanged
|
||||
unsigned char nop_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop"
|
||||
patch((void *) 0xbe1a0, nop_patch); // door
|
||||
patch((void *) 0xcf818, nop_patch); // trapdoor
|
||||
}
|
||||
|
||||
// Disable overwrite_calls() After Minecraft::init
|
||||
misc_run_on_init([](__attribute__((unused)) Minecraft *minecraft) {
|
||||
thunk_enabler = [](__attribute__((unused)) void *a, __attribute__((unused)) void *b) -> void * {
|
||||
|
@ -6,6 +6,10 @@ vtable-size 0x13c;
|
||||
|
||||
constructor (Level *level, Entity *thrower) = 0x8ccf0;
|
||||
|
||||
virtual-method float getThrowPower() = 0x12c;
|
||||
virtual-method float getThrowUpAngleOffset() = 0x130;
|
||||
virtual-method float getGravity() = 0x134;
|
||||
virtual-method void onHit(HitResult *res) = 0x138;
|
||||
|
||||
property int thrower_id = 0xd8;
|
||||
property int life = 0xdc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user