Paper/CraftBukkit-Patches/0138-Refactor-ItemDoor-Place.patch

30 lines
1.6 KiB
Diff
Raw Normal View History

2016-03-01 01:23:45 +01:00
From 02237184015ff86418a374b78dd54607433e0ff5 Mon Sep 17 00:00:00 2001
2014-11-28 02:17:45 +01:00
From: md_5 <git@md-5.net>
Date: Tue, 30 Sep 2014 21:43:15 +1000
Subject: [PATCH] Refactor ItemDoor Place
diff --git a/src/main/java/net/minecraft/server/ItemDoor.java b/src/main/java/net/minecraft/server/ItemDoor.java
2016-02-29 22:33:06 +01:00
index 669940a..adaa131 100644
2014-11-28 02:17:45 +01:00
--- a/src/main/java/net/minecraft/server/ItemDoor.java
+++ b/src/main/java/net/minecraft/server/ItemDoor.java
2016-02-29 22:33:06 +01:00
@@ -58,9 +58,11 @@ public class ItemDoor extends Item {
boolean flag3 = world.isBlockIndirectlyPowered(blockposition) || world.isBlockIndirectlyPowered(blockposition3);
IBlockData iblockdata = block.getBlockData().set(BlockDoor.FACING, enumdirection).set(BlockDoor.HINGE, flag ? BlockDoor.EnumDoorHinge.RIGHT : BlockDoor.EnumDoorHinge.LEFT).set(BlockDoor.POWERED, Boolean.valueOf(flag3)).set(BlockDoor.OPEN, Boolean.valueOf(flag3));
2014-11-28 02:17:45 +01:00
2015-02-28 12:36:22 +01:00
- world.setTypeAndData(blockposition, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 2);
- world.setTypeAndData(blockposition3, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 2);
2014-11-28 02:17:45 +01:00
- world.applyPhysics(blockposition, block);
- world.applyPhysics(blockposition3, block);
+ // Spigot start - update physics after the block multi place event
2015-02-28 12:36:22 +01:00
+ world.setTypeAndData(blockposition, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 3);
+ world.setTypeAndData(blockposition3, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 3);
2014-11-28 02:17:45 +01:00
+ // world.applyPhysics(blockposition, block);
+ // world.applyPhysics(blockposition3, block);
+ // Spigot end
}
}
--
2016-02-29 22:33:06 +01:00
2.5.0
2014-11-28 02:17:45 +01:00