diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:32:46 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:32:45 +1100 |
commit | aa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch) | |
tree | cb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/ItemBoat.patch | |
parent | e1ebe524a78e27f6a2829ed4574fded3779094e1 (diff) | |
download | craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip |
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/ItemBoat.patch')
-rw-r--r-- | nms-patches/ItemBoat.patch | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/nms-patches/ItemBoat.patch b/nms-patches/ItemBoat.patch index 364ba055..daeabd5e 100644 --- a/nms-patches/ItemBoat.patch +++ b/nms-patches/ItemBoat.patch @@ -1,17 +1,16 @@ --- a/net/minecraft/server/ItemBoat.java +++ b/net/minecraft/server/ItemBoat.java -@@ -54,6 +54,14 @@ - if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) { - BlockPosition blockposition = movingobjectposition.a(); - -+ // 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); +@@ -55,6 +55,13 @@ + } else if (movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.BLOCK) { + return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); + } else { ++ // 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, movingobjectposition.a(), movingobjectposition.direction, itemstack); + -+ if (event.isCancelled()) { -+ return itemstack; -+ } -+ // CraftBukkit end -+ - if (world.getType(blockposition).getBlock() == Blocks.SNOW_LAYER) { - blockposition = blockposition.down(); - } ++ if (event.isCancelled()) { ++ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); ++ } ++ // CraftBukkit end + Block block = world.getType(movingobjectposition.a()).getBlock(); + boolean flag1 = block == Blocks.WATER || block == Blocks.FLOWING_WATER; + EntityBoat entityboat = new EntityBoat(world, movingobjectposition.pos.x, flag1 ? movingobjectposition.pos.y - 0.12D : movingobjectposition.pos.y, movingobjectposition.pos.z); |