diff options
author | Senmori <thesenmori@gmail.com> | 2018-08-12 18:39:51 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-08-12 18:40:03 +1000 |
commit | c0df4b82d380bea4fd66cc887a1476468e2301c4 (patch) | |
tree | 0fa0d8db07d29c0f1c53bb9a70568eb42e9a9c7d /nms-patches/EntityInsentient.patch | |
parent | 15da7067067a0786d221f2ad3cd060acd4dd3431 (diff) | |
download | craftbukkit-c0df4b82d380bea4fd66cc887a1476468e2301c4.tar craftbukkit-c0df4b82d380bea4fd66cc887a1476468e2301c4.tar.gz craftbukkit-c0df4b82d380bea4fd66cc887a1476468e2301c4.tar.lz craftbukkit-c0df4b82d380bea4fd66cc887a1476468e2301c4.tar.xz craftbukkit-c0df4b82d380bea4fd66cc887a1476468e2301c4.zip |
SPIGOT-1936: LootTable API
Diffstat (limited to 'nms-patches/EntityInsentient.patch')
-rw-r--r-- | nms-patches/EntityInsentient.patch | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/nms-patches/EntityInsentient.patch b/nms-patches/EntityInsentient.patch index a93da205..d315fadb 100644 --- a/nms-patches/EntityInsentient.patch +++ b/nms-patches/EntityInsentient.patch @@ -19,7 +19,7 @@ public abstract class EntityInsentient extends EntityLiving { private static final DataWatcherObject<Byte> a = DataWatcher.a(EntityInsentient.class, DataWatcherRegistry.a); -@@ -27,7 +39,7 @@ +@@ -27,11 +39,11 @@ public float[] dropChanceHand; private final NonNullList<ItemStack> bE; public float[] dropChanceArmor; @@ -27,7 +27,13 @@ + // public boolean canPickUpLoot; // CraftBukkit - moved up to EntityLiving public boolean persistent; private final Map<PathType, Float> bH; - private MinecraftKey bI; +- private MinecraftKey bI; +- private long bJ; ++ public MinecraftKey bI; // CraftBukkit private -> public ++ public long bJ; // CraftBukkit private -> public + private boolean bK; + private Entity leashHolder; + private NBTTagCompound bM; @@ -57,6 +69,9 @@ this.n(); } @@ -100,7 +106,19 @@ NBTTagList nbttaglist; int i; -@@ -470,11 +525,21 @@ +@@ -394,6 +449,11 @@ + protected MinecraftKey G() { + return null; + } ++ // CraftBukkit - start ++ public MinecraftKey getLootTable() { ++ return G(); ++ } ++ // CraftBukkit - end + + protected void a(boolean flag, int i, DamageSource damagesource) { + MinecraftKey minecraftkey = this.bI; +@@ -470,11 +530,21 @@ ItemStack itemstack1 = this.getEquipment(enumitemslot); boolean flag = this.a(itemstack, itemstack1, enumitemslot); @@ -123,7 +141,7 @@ } this.setSlot(enumitemslot, itemstack); -@@ -554,11 +619,11 @@ +@@ -554,11 +624,11 @@ double d2 = entityhuman.locZ - this.locZ; double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -137,7 +155,7 @@ this.die(); } else if (d3 < 1024.0D) { this.ticksFarFromPlayer = 0; -@@ -946,12 +1011,24 @@ +@@ -946,12 +1016,24 @@ public final boolean b(EntityHuman entityhuman, EnumHand enumhand) { if (this.isLeashed() && this.getLeashHolder() == entityhuman) { @@ -162,7 +180,7 @@ this.setLeashHolder(entityhuman, true); itemstack.subtract(1); return true; -@@ -972,10 +1049,12 @@ +@@ -972,10 +1054,12 @@ if (this.bK) { if (!this.isAlive()) { @@ -175,7 +193,7 @@ this.unleash(true, true); } } -@@ -986,7 +1065,9 @@ +@@ -986,7 +1070,9 @@ this.bK = false; this.leashHolder = null; if (!this.world.isClientSide && flag1) { @@ -185,7 +203,7 @@ } if (!this.world.isClientSide && flag && this.world instanceof WorldServer) { -@@ -1056,6 +1137,7 @@ +@@ -1056,6 +1142,7 @@ this.setLeashHolder(entityleash, true); } else { @@ -193,7 +211,7 @@ this.unleash(false, true); } } -@@ -1151,7 +1233,14 @@ +@@ -1151,7 +1238,14 @@ int j = EnchantmentManager.getFireAspectEnchantmentLevel(this); if (j > 0) { |