summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityArmorStand.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-15 10:00:00 +1000
committermd_5 <git@md-5.net>2018-07-15 10:00:00 +1000
commit421c1728c81e2f729dff88da2ac96535d2b8e5e8 (patch)
tree6c51d93e811d1eb86b68461a42fc5cf03b168b0c /nms-patches/EntityArmorStand.patch
parent57ab4cfc6f4ff526d44319d9b8c79f6848db2de7 (diff)
downloadcraftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.gz
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.lz
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.xz
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.zip
Update to Minecraft 1.13-pre7
Diffstat (limited to 'nms-patches/EntityArmorStand.patch')
-rw-r--r--nms-patches/EntityArmorStand.patch76
1 files changed, 38 insertions, 38 deletions
diff --git a/nms-patches/EntityArmorStand.patch b/nms-patches/EntityArmorStand.patch
index 496a0925..a0f06e68 100644
--- a/nms-patches/EntityArmorStand.patch
+++ b/nms-patches/EntityArmorStand.patch
@@ -1,7 +1,7 @@
--- a/net/minecraft/server/EntityArmorStand.java
+++ b/net/minecraft/server/EntityArmorStand.java
@@ -5,6 +5,15 @@
- import java.util.List;
+ import java.util.function.Predicate;
import javax.annotation.Nullable;
+// CraftBukkit start
@@ -15,8 +15,8 @@
+
public class EntityArmorStand extends EntityLiving {
- private static final Vector3f br = new Vector3f(0.0F, 0.0F, 0.0F);
-@@ -61,6 +70,13 @@
+ private static final Vector3f bx = new Vector3f(0.0F, 0.0F, 0.0F);
+@@ -56,6 +65,13 @@
this.setPosition(d0, d1, d2);
}
@@ -30,9 +30,9 @@
public final void setSize(float f, float f1) {
double d0 = this.locX;
double d1 = this.locY;
-@@ -364,6 +380,21 @@
- if (itemstack1.isEmpty() || (this.bB & 1 << enumitemslot.c() + 8) == 0) {
- if (!itemstack1.isEmpty() || (this.bB & 1 << enumitemslot.c() + 16) == 0) {
+@@ -355,6 +371,21 @@
+ if (itemstack1.isEmpty() || (this.bH & 1 << enumitemslot.c() + 8) == 0) {
+ if (!itemstack1.isEmpty() || (this.bH & 1 << enumitemslot.c() + 16) == 0) {
ItemStack itemstack2;
+ // CraftBukkit start
+ org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -52,7 +52,7 @@
if (entityhuman.abilities.canInstantlyBuild && itemstack1.isEmpty() && !itemstack.isEmpty()) {
itemstack2 = itemstack.cloneItemStack();
-@@ -385,14 +416,19 @@
+@@ -376,14 +407,19 @@
}
public boolean damageEntity(DamageSource damagesource, float f) {
@@ -66,69 +66,69 @@
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
return false;
- } else if (!this.isInvulnerable(damagesource) && !this.bA && !this.isMarker()) {
+ } else if (!this.isInvulnerable(damagesource) && !this.bG && !this.isMarker()) {
if (damagesource.isExplosion()) {
- this.F();
+ this.D();
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
return false;
} else if (DamageSource.FIRE.equals(damagesource)) {
if (this.isBurning()) {
-@@ -421,7 +457,7 @@
- } else if (damagesource.u()) {
- this.H();
- this.D();
+@@ -407,7 +443,7 @@
+ } else if (damagesource.v()) {
+ this.F();
+ this.A();
+- this.die();
++ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
+ return false;
+ } else {
+ long i = this.world.getTime();
+@@ -418,7 +454,7 @@
+ } else {
+ this.B();
+ this.A();
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
- return false;
- } else {
- long i = this.world.getTime();
-@@ -432,7 +468,7 @@
- } else {
- this.E();
- this.D();
-- this.die();
-+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
- }
+ }
- return false;
-@@ -460,7 +496,7 @@
+ return true;
+@@ -445,7 +481,7 @@
f1 -= f;
if (f1 <= 0.5F) {
- this.F();
+ this.D();
- this.die();
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
} else {
this.setHealth(f1);
}
-@@ -468,7 +504,7 @@
+@@ -453,7 +489,7 @@
}
- private void E() {
+ private void B() {
- 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.F();
+ this.D();
}
-@@ -481,7 +517,7 @@
- for (i = 0; i < this.by.size(); ++i) {
- itemstack = (ItemStack) this.by.get(i);
+@@ -466,7 +502,7 @@
+ for (i = 0; i < this.bE.size(); ++i) {
+ itemstack = (ItemStack) this.bE.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.by.set(i, ItemStack.a);
+ this.bE.set(i, ItemStack.a);
}
}
-@@ -489,7 +525,7 @@
- for (i = 0; i < this.bz.size(); ++i) {
- itemstack = (ItemStack) this.bz.get(i);
+@@ -474,7 +510,7 @@
+ for (i = 0; i < this.bF.size(); ++i) {
+ itemstack = (ItemStack) this.bF.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.bz.set(i, ItemStack.a);
+ this.bF.set(i, ItemStack.a);
}
}
-@@ -601,6 +637,7 @@
+@@ -586,6 +622,7 @@
}
public void killEntity() {