Commits
md_5 authored 5f61739cb8d
50 50 | entityminecartabstract.setCustomName(itemstack.getName()); |
51 51 | } |
52 52 | |
53 53 | world.addEntity(entityminecartabstract); |
54 54 | - itemstack.cloneAndSubtract(1); |
55 55 | + // itemstack.a(1); // CraftBukkit - handled during event processing |
56 56 | + // CraftBukkit end |
57 57 | return itemstack; |
58 58 | } |
59 59 | |
60 - | |
61 - | d0 = 0.5D; |
62 - | } |
63 - | |
64 - | + // CraftBukkit start - Minecarts |
65 - | + org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, blockposition, enumdirection, itemstack, enumhand); |
66 - | + |
67 - | + if (event.isCancelled()) { |
68 - | + return EnumInteractionResult.PASS; |
69 - | + } |
70 - | + // CraftBukkit end |
71 - | + |
72 - | EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.a(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.0625D + d0, (double) blockposition.getZ() + 0.5D, this.b); |
73 - | |
74 - | if (itemstack.hasName()) { |