Paper/CraftBukkit-Patches/0138-Refactor-ItemDoor-Place.patch
2016-03-03 03:46:56 -06:00

30 lines
1.6 KiB
Diff

From 02237184015ff86418a374b78dd54607433e0ff5 Mon Sep 17 00:00:00 2001
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
index 669940a..adaa131 100644
--- a/src/main/java/net/minecraft/server/ItemDoor.java
+++ b/src/main/java/net/minecraft/server/ItemDoor.java
@@ -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));
- world.setTypeAndData(blockposition, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 2);
- world.setTypeAndData(blockposition3, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 2);
- world.applyPhysics(blockposition, block);
- world.applyPhysics(blockposition3, block);
+ // Spigot start - update physics after the block multi place event
+ world.setTypeAndData(blockposition, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER), 3);
+ world.setTypeAndData(blockposition3, iblockdata.set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), 3);
+ // world.applyPhysics(blockposition, block);
+ // world.applyPhysics(blockposition3, block);
+ // Spigot end
}
}
--
2.5.0