3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/ItemBoat.patch

18 Zeilen
938 B
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/ItemBoat.java
+++ b/net/minecraft/server/ItemBoat.java
2015-02-26 23:41:06 +01:00
@@ -54,6 +54,14 @@
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
BlockPosition blockposition = movingobjectposition.a();
2015-02-26 23:41:06 +01:00
+ // CraftBukkit start - Boat placement
+ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, blockposition, movingobjectposition.direction, itemstack);
+
+ if (event.isCancelled()) {
+ return itemstack;
+ }
+ // CraftBukkit end
2015-02-26 23:41:06 +01:00
+
if (world.getType(blockposition).getBlock() == Blocks.SNOW_LAYER) {
blockposition = blockposition.down();
2015-02-26 23:41:06 +01:00
}