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

@@ -15,8 +15,8 @@
+
public class EntityArmorStand extends EntityLiving {
private static final Vector3f bx = new Vector3f(0.0F, 0.0F, 0.0F);
@@ -56,6 +65,13 @@
private static final Vector3f bu = new Vector3f(0.0F, 0.0F, 0.0F);
@@ -53,6 +62,13 @@
this.setPosition(d0, d1, d2);
}
@@ -27,12 +27,12 @@
+ }
+ // CraftBukkit end
+
public final void setSize(float f, float f1) {
@Override
public void updateSize() {
double d0 = this.locX;
double d1 = this.locY;
@@ -354,6 +370,21 @@
if (itemstack1.isEmpty() || (this.bH & 1 << enumitemslot.c() + 8) == 0) {
if (!itemstack1.isEmpty() || (this.bH & 1 << enumitemslot.c() + 16) == 0) {
@@ -374,6 +390,21 @@
if (itemstack1.isEmpty() || (this.bE & 1 << enumitemslot.c() + 8) == 0) {
if (!itemstack1.isEmpty() || (this.bE & 1 << enumitemslot.c() + 16) == 0) {
ItemStack itemstack2;
+ // CraftBukkit start
+ org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -52,9 +52,9 @@
if (entityhuman.abilities.canInstantlyBuild && itemstack1.isEmpty() && !itemstack.isEmpty()) {
itemstack2 = itemstack.cloneItemStack();
@@ -375,14 +406,19 @@
}
@@ -396,14 +427,19 @@
@Override
public boolean damageEntity(DamageSource damagesource, float f) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
@@ -66,71 +66,71 @@
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
return false;
} else if (!this.isInvulnerable(damagesource) && !this.bG && !this.isMarker()) {
} else if (!this.isInvulnerable(damagesource) && !this.bD && !this.isMarker()) {
if (damagesource.isExplosion()) {
this.D();
this.g(damagesource);
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
return false;
} else if (DamageSource.FIRE.equals(damagesource)) {
if (this.isBurning()) {
@@ -406,7 +442,7 @@
@@ -428,7 +464,7 @@
} else if (damagesource.v()) {
this.F();
this.A();
this.D();
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
return false;
return flag1;
} else {
long i = this.world.getTime();
@@ -417,7 +453,7 @@
@@ -439,7 +475,7 @@
} else {
this.B();
this.A();
this.f(damagesource);
this.D();
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
}
return true;
@@ -444,7 +480,7 @@
@@ -466,7 +502,7 @@
f1 -= f;
if (f1 <= 0.5F) {
this.D();
this.g(damagesource);
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
} else {
this.setHealth(f1);
}
@@ -452,7 +488,7 @@
@@ -474,7 +510,7 @@
}
private void B() {
private void f(DamageSource damagesource) {
- Block.a(this.world, new BlockPosition(this), new ItemStack(Items.ARMOR_STAND));
+ drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(new ItemStack(Items.ARMOR_STAND))); // CraftBukkit - add to drops
this.D();
this.g(damagesource);
}
@@ -465,7 +501,7 @@
for (i = 0; i < this.bE.size(); ++i) {
itemstack = (ItemStack) this.bE.get(i);
@@ -488,7 +524,7 @@
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
- Block.a(this.world, (new BlockPosition(this)).up(), itemstack);
+ drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
this.bE.set(i, ItemStack.a);
this.handItems.set(i, ItemStack.a);
}
}
@@ -473,7 +509,7 @@
for (i = 0; i < this.bF.size(); ++i) {
itemstack = (ItemStack) this.bF.get(i);
@@ -496,7 +532,7 @@
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
- Block.a(this.world, (new BlockPosition(this)).up(), itemstack);
+ drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
this.bF.set(i, ItemStack.a);
this.armorItems.set(i, ItemStack.a);
}
}
@@ -585,6 +621,7 @@
}
@@ -602,6 +638,7 @@
@Override
public void killEntity() {
+ org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event
this.die();