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

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/EntityEnderman.java
+++ b/net/minecraft/server/EntityEnderman.java
@@ -44,7 +44,17 @@
}
@@ -51,7 +51,17 @@
@Override
public void setGoalTarget(@Nullable EntityLiving entityliving) {
- super.setGoalTarget(entityliving);
+ // CraftBukkit start - fire event
@@ -19,33 +19,33 @@
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
if (entityliving == null) {
@@ -58,6 +68,7 @@
attributeinstance.b(EntityEnderman.b);
@@ -65,6 +75,7 @@
attributeinstance.b(EntityEnderman.c);
}
}
+ return true;
}
@@ -276,8 +287,12 @@
boolean flag = movingobjectposition != null && movingobjectposition.getBlockPosition().equals(blockposition);
@@ -294,8 +305,12 @@
boolean flag = movingobjectpositionblock.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && movingobjectpositionblock.getBlockPosition().equals(blockposition);
if (block.a(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
- this.enderman.setCarried(iblockdata);
- world.setAir(blockposition);
- world.a(blockposition, false);
+ // CraftBukkit start - Pickup event
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
+ this.enderman.setCarried(iblockdata);
+ world.setAir(blockposition);
+ world.a(blockposition, false);
+ }
+ // CraftBukkit end
}
}
@@ -307,8 +322,12 @@
@@ -328,8 +343,12 @@
IBlockData iblockdata2 = this.a.getCarried();
if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1)) {
if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
+ // CraftBukkit start - Place event
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition, iblockdata2).isCancelled()) {
world.setTypeAndData(blockposition, iblockdata2, 3);