Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -9,40 +9,28 @@
public class EntityFallingBlock extends Entity {
private IBlockData block;
@@ -71,7 +73,7 @@
@@ -73,7 +75,7 @@
if (this.ticksLived++ == 0) {
blockposition = new BlockPosition(this);
- if (this.world.getType(blockposition).getBlock() == block) {
+ if (this.world.getType(blockposition).getBlock() == block && !CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
this.world.setAir(blockposition);
this.world.a(blockposition, false);
} else if (!this.world.isClientSide) {
this.die();
@@ -112,7 +114,7 @@
@@ -125,6 +127,11 @@
this.block = (IBlockData) this.block.set(BlockProperties.C, true);
}
if (!flag1 && BlockFalling.canFallThrough(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) {
this.onGround = false;
- return;
+ // return; // CraftBukkit
}
this.motX *= 0.699999988079071D;
@@ -121,7 +123,13 @@
if (iblockdata.getBlock() != Blocks.MOVING_PISTON) {
this.die();
if (!this.f) {
- if (iblockdata.getMaterial().isReplaceable() && (flag1 || !BlockFalling.canFallThrough(this.world.getType(blockposition.down()))) && this.world.setTypeAndData(blockposition, this.block, 3)) {
+ // CraftBukkit start
+ if (iblockdata.getMaterial().isReplaceable() && (flag1 || !BlockFalling.canFallThrough(this.world.getType(blockposition.down())))) {
+ // CraftBukkit start
+ if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, this.block).isCancelled()) {
+ return;
+ }
+ this.world.setTypeAndData(blockposition, this.block, 3);
+ // CraftBukkit end
if (block instanceof BlockFalling) {
((BlockFalling) block).a(this.world, blockposition, this.block, iblockdata);
}
@@ -175,7 +183,9 @@
if (this.world.setTypeAndData(blockposition, this.block, 3)) {
if (block instanceof BlockFalling) {
((BlockFalling) block).a(this.world, blockposition, this.block, iblockdata);
@@ -179,7 +186,9 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();