Commits
md_5 authored 616a9687a10
11 11 | private IBlockData block; |
12 12 | |
13 13 | |
14 14 | if (this.ticksLived++ == 0) { |
15 15 | blockposition = new BlockPosition(this); |
16 16 | - if (this.world.getType(blockposition).getBlock() == block) { |
17 17 | + if (this.world.getType(blockposition).getBlock() == block && !CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) { |
18 18 | this.world.setAir(blockposition); |
19 19 | } else if (!this.world.isClientSide) { |
20 20 | this.die(); |
21 + | |
22 + | |
23 + | if (BlockFalling.i(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) { |
24 + | this.onGround = false; |
25 + | - return; |
26 + | + // return; // CraftBukkit |
27 + | } |
28 + | |
29 + | this.motX *= 0.699999988079071D; |
21 30 | |
22 31 | if (iblockdata.getBlock() != Blocks.PISTON_EXTENSION) { |
23 32 | this.die(); |
24 33 | if (!this.f) { |
25 34 | - if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down())) && this.world.setTypeAndData(blockposition, this.block, 3)) { |
26 35 | + // CraftBukkit start |
27 36 | + if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down()))) { |
28 37 | + if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this.block.getBlock(), this.block.getBlock().toLegacyData(this.block)).isCancelled()) { |
29 38 | + return; |
30 39 | + } |