@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ItemBoat.java
|
||||
+++ b/net/minecraft/server/ItemBoat.java
|
||||
@@ -41,6 +41,13 @@
|
||||
--- a/net/minecraft/world/item/ItemBoat.java
|
||||
+++ b/net/minecraft/world/item/ItemBoat.java
|
||||
@@ -54,6 +54,13 @@
|
||||
}
|
||||
|
||||
if (movingobjectpositionblock.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
|
||||
@@ -8,13 +8,13 @@
|
||||
+ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPosition(), movingobjectpositionblock.getDirection(), itemstack, enumhand);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack);
|
||||
+ return InteractionResultWrapper.pass(itemstack);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
EntityBoat entityboat = new EntityBoat(world, movingobjectpositionblock.getPos().x, movingobjectpositionblock.getPos().y, movingobjectpositionblock.getPos().z);
|
||||
|
||||
entityboat.setType(this.b);
|
||||
@@ -49,7 +56,15 @@
|
||||
@@ -62,7 +69,15 @@
|
||||
return InteractionResultWrapper.fail(itemstack);
|
||||
} else {
|
||||
if (!world.isClientSide) {
|
||||
@@ -25,7 +25,7 @@
|
||||
+ }
|
||||
+
|
||||
+ if (!world.addEntity(entityboat)) {
|
||||
+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack);
|
||||
+ return InteractionResultWrapper.pass(itemstack);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
|
||||
Reference in New Issue
Block a user