[Auto] Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
08de4679f #789: Call EntityDropItemEvent when a wither rose is dropped
This commit is contained in:
Aikar 2021-01-28 18:32:05 -05:00
parent d9f5f70188
commit d0477d326b
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE
23 changed files with 74 additions and 74 deletions

View file

@ -1043,7 +1043,7 @@ index 9f32f6c3c34464e82a953a50141343b0083dea71..ace7d5a36c0a44763d554d5d83cee781
protected BlockPosition ap() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63a2d2f724 100644
index 8ad1256bcde950bc34aeb7f61ef9598f3b1cd2a3..d41638b97188ba58d2456d2f6c3c71fc79fe572a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -42,7 +42,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1055,7 +1055,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
public abstract class EntityLiving extends Entity {
@@ -2358,7 +2358,6 @@ public abstract class EntityLiving extends Entity {
@@ -2365,7 +2365,6 @@ public abstract class EntityLiving extends Entity {
@Override
public void tick() {
@ -1063,7 +1063,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
super.tick();
this.t();
this.v();
@@ -2407,9 +2406,7 @@ public abstract class EntityLiving extends Entity {
@@ -2414,9 +2413,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -1073,7 +1073,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
double d0 = this.locX() - this.lastX;
double d1 = this.locZ() - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -2489,8 +2486,6 @@ public abstract class EntityLiving extends Entity {
@@ -2496,8 +2493,6 @@ public abstract class EntityLiving extends Entity {
if (this.isSleeping()) {
this.pitch = 0.0F;
}
@ -1082,7 +1082,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
}
public void updateEquipment() { // PAIL private->public; updateEquipment
@@ -2672,7 +2667,6 @@ public abstract class EntityLiving extends Entity {
@@ -2679,7 +2674,6 @@ public abstract class EntityLiving extends Entity {
this.setMot(d4, d5, d6);
this.world.getMethodProfiler().enter("ai");
@ -1090,7 +1090,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
if (this.isFrozen()) {
this.jumping = false;
this.aR = 0.0F;
@@ -2682,7 +2676,6 @@ public abstract class EntityLiving extends Entity {
@@ -2689,7 +2683,6 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.getMethodProfiler().exit();
}
@ -1098,7 +1098,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("jump");
@@ -2717,9 +2710,9 @@ public abstract class EntityLiving extends Entity {
@@ -2724,9 +2717,9 @@ public abstract class EntityLiving extends Entity {
this.r();
AxisAlignedBB axisalignedbb = this.getBoundingBox();
@ -1110,7 +1110,7 @@ index 0ca7457a669b3c96313a39af0c1696d51c1eb10a..5f348259cca7eb21912100c4b1c63e63
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("push");
if (this.bf > 0) {
@@ -2727,9 +2720,7 @@ public abstract class EntityLiving extends Entity {
@@ -2734,9 +2727,7 @@ public abstract class EntityLiving extends Entity {
this.a(axisalignedbb, this.getBoundingBox());
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index aeb6b01dfa6537f08129c254f3e1180299f56c99..3858fabf74e7604a7c62806e98c68eed4a97a485 100644
index 276f06982b3c17b8ae29497e1f561bb7d1559e29..a001629eda462ba34555aed6fe162078c18e0c02 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3105,9 +3105,10 @@ public abstract class EntityLiving extends Entity {
@@ -3112,9 +3112,10 @@ public abstract class EntityLiving extends Entity {
this.b(this.activeItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@ -20,7 +20,7 @@ index aeb6b01dfa6537f08129c254f3e1180299f56c99..3858fabf74e7604a7c62806e98c68eed
world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -3121,6 +3122,13 @@ public abstract class EntityLiving extends Entity {
@@ -3128,6 +3129,13 @@ public abstract class EntityLiving extends Entity {
} else {
itemstack = this.activeItem.a(this.world, this);
}
@ -34,7 +34,7 @@ index aeb6b01dfa6537f08129c254f3e1180299f56c99..3858fabf74e7604a7c62806e98c68eed
// CraftBukkit end
if (itemstack != this.activeItem) {
@@ -3128,6 +3136,11 @@ public abstract class EntityLiving extends Entity {
@@ -3135,6 +3143,11 @@ public abstract class EntityLiving extends Entity {
}
this.clearActiveItem();

View file

@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3858fabf74e7604a7c62806e98c68eed4a97a485..28fc0288b625694fb2dc356cf7eff9d012b70c72 100644
index a001629eda462ba34555aed6fe162078c18e0c02..d20f405287fb25fd4b221345b0845a0c6713298e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -609,7 +609,13 @@ public abstract class EntityLiving extends Entity {
@ -34,7 +34,7 @@ index 3858fabf74e7604a7c62806e98c68eed4a97a485..28fc0288b625694fb2dc356cf7eff9d0
// CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
@@ -2945,7 +2955,7 @@ public abstract class EntityLiving extends Entity {
@@ -2952,7 +2962,7 @@ public abstract class EntityLiving extends Entity {
}
public void setAbsorptionHearts(float f) {

View file

@ -147,7 +147,7 @@ index 2c2d44562f732c75532cda910db5ce67d6a534ab..a9fff75882217b1fd680fd8fd47110f8
@Override
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 9ab0a4638c36d46327435eec4745d2746819d9b0..7c3e36f62f4ab076807cd4b85a70528fffbbc2af 100644
index 0e5bbe285bcbb410cc442eba1738aeb2a117ce62..723cd60254111579b157684dc82311af5cf9fd13 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -464,7 +464,7 @@ public class EntityFishingHook extends IProjectile {
@ -173,10 +173,10 @@ index fef00b46e7cf3690044059f9ee527f799d535b81..a7bbf21e9736a0da38f95d93b013097b
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 8365987a845fc23fdad99e101df5b5154d555bbb..af460b43984c36475d99785a1b78a3db6b3fd1d9 100644
index cda084e6fe8f4f5dcd8c0b13bd07326db2ca7c59..abc300a54100b42e30705185ec60da6624db4c91 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1494,7 +1494,8 @@ public abstract class EntityLiving extends Entity {
@@ -1501,7 +1501,8 @@ public abstract class EntityLiving extends Entity {
int j = EntityExperienceOrb.getOrbValue(i);
i -= j;
@ -278,7 +278,7 @@ index a3ddf7be4c7ea588098381b8f05b2bad5b388853..99b20fa5feff0f766124d4ec9474852e
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 54a2324ac61dc0d70155dfc085dcc518a946138a..7b8440c58471315d7b8af786ba8daddc1625865f 100644
index 3f35e1290beaab1fa2ca93ec64ab0dd42d68d71c..85562d2cafab6f81705b70ac1f965ccfb38abdf5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1822,7 +1822,7 @@ public class CraftWorld implements World {

View file

@ -27,7 +27,7 @@ index 2dc58b9f769ea43b737804456aafab47ecc143b8..c611b5a63498f5ad1f50a75ccd5d7299
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b61307a4a5b8b3bcf5b8d719f20f99cbb1970928..6271133af5425325ddfc3dc127b88b957561d4b1 100644
index bd7d9949eb9a290833958d170d1ad69990406b16..bb049690ce61310a90852637397abd449c1dc43a 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -183,6 +183,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -39,10 +39,10 @@ index b61307a4a5b8b3bcf5b8d719f20f99cbb1970928..6271133af5425325ddfc3dc127b88b95
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 5b57675c1466dc97b6359e2b5b39f947a2737d7b..bb69b6b086b6828f4b7682aaeccd81e67f136162 100644
index abc300a54100b42e30705185ec60da6624db4c91..c2c5dbba5cc048e8fa2a4a383737330adf7b7663 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2803,8 +2803,11 @@ public abstract class EntityLiving extends Entity {
@@ -2810,8 +2810,11 @@ public abstract class EntityLiving extends Entity {
}
}

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index dd55c3d991b1713e1262fc54df558b729bf63bd7..1e49b2c84d9b35367a9bc89be0c606293b42f2c8 100644
index 67b5b28c6c082a616ae2114874cdb0969f95ab98..087d961cb51dc3c9b24cf6e1785252c2c0afb296 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1,5 +1,6 @@
@ -15,7 +15,7 @@ index dd55c3d991b1713e1262fc54df558b729bf63bd7..1e49b2c84d9b35367a9bc89be0c60629
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -2546,6 +2547,13 @@ public abstract class EntityLiving extends Entity {
@@ -2553,6 +2554,13 @@ public abstract class EntityLiving extends Entity {
ItemStack itemstack1 = this.getEquipment(enumitemslot);
if (!ItemStack.matches(itemstack1, itemstack)) {

View file

@ -19,10 +19,10 @@ index e8e1e7dafaf1c105b2f58cf3e118e3d665dc50ec..3e4bd1d6718d3ad2498fe9bd72eaac45
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 997feac9d0f4a13945d3a6672e4f36dd9e8c769f..615d0f949bfa26ef171a7b0120367a2c9d231f45 100644
index 087d961cb51dc3c9b24cf6e1785252c2c0afb296..f8c9c4e41faed2a76ca6ff4105351b09c2193cdd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3211,7 +3211,7 @@ public abstract class EntityLiving extends Entity {
@@ -3218,7 +3218,7 @@ public abstract class EntityLiving extends Entity {
if (this.isHandRaised() && !this.activeItem.isEmpty()) {
Item item = this.activeItem.getItem();
@ -31,7 +31,7 @@ index 997feac9d0f4a13945d3a6672e4f36dd9e8c769f..615d0f949bfa26ef171a7b0120367a2c
} else {
return false;
}
@@ -3467,4 +3467,15 @@ public abstract class EntityLiving extends Entity {
@@ -3474,4 +3474,15 @@ public abstract class EntityLiving extends Entity {
public void broadcastItemBreak(EnumHand enumhand) {
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
}

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent
This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 88a23d3e8f251304f22818b8c65590c39c42cd80..e59d54755542b9053e64618495a3fa79cb084915 100644
index 0cf43351bd2d1ba00217ee9b37a51dbc5a271f7a..9b5683240478acae516481026cb7802dc5757413 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1080,7 +1080,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -28,7 +28,7 @@ index 88a23d3e8f251304f22818b8c65590c39c42cd80..e59d54755542b9053e64618495a3fa79
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 1b0c4234cf579b35f404c129c2c6d3266b670b09..38bf49da2cc6b2f7068462ea8b57cf3a76ae1779 100644
index 6274cf1975270fdac8ae4986e1c170bd075d640e..fbecc8ccab47b428c43530ad344e325538cf242d 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1500,7 +1500,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -41,7 +41,7 @@ index 1b0c4234cf579b35f404c129c2c6d3266b670b09..38bf49da2cc6b2f7068462ea8b57cf3a
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 134da62b90b7a167cd580680a986dd470a3b9aad..991839c39206ec984c442776693afdf50f90b409 100644
index f8c9c4e41faed2a76ca6ff4105351b09c2193cdd..014f27ab7c183e3b416e96d6bbbbfc776e54ca84 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1246,7 +1246,7 @@ public abstract class EntityLiving extends Entity {
@ -62,7 +62,7 @@ index 134da62b90b7a167cd580680a986dd470a3b9aad..991839c39206ec984c442776693afdf5
}
private boolean f(DamageSource damagesource) {
@@ -1530,6 +1530,11 @@ public abstract class EntityLiving extends Entity {
@@ -1537,6 +1537,11 @@ public abstract class EntityLiving extends Entity {
}
public void a(float f, double d0, double d1) {
@ -74,7 +74,7 @@ index 134da62b90b7a167cd580680a986dd470a3b9aad..991839c39206ec984c442776693afdf5
f = (float) ((double) f * (1.0D - this.b(GenericAttributes.KNOCKBACK_RESISTANCE)));
if (f > 0.0F) {
this.impulse = true;
@@ -1537,6 +1542,16 @@ public abstract class EntityLiving extends Entity {
@@ -1544,6 +1549,16 @@ public abstract class EntityLiving extends Entity {
Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f);
this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);

View file

@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0409f4584cff7dbf7e5266f9df45ac315c316ce1..8b05c47550adf5adc66bd802373b8339dca578f2 100644
index 014f27ab7c183e3b416e96d6bbbbfc776e54ca84..e118f96fb9b67874ec86db8dede00cf34473e085 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity {
@ -18,7 +18,7 @@ index 0409f4584cff7dbf7e5266f9df45ac315c316ce1..8b05c47550adf5adc66bd802373b8339
protected int bd;
protected int be;
private BlockPosition bx;
@@ -3194,10 +3194,12 @@ public abstract class EntityLiving extends Entity {
@@ -3201,10 +3201,12 @@ public abstract class EntityLiving extends Entity {
return this.activeItem;
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 54f0f5b49d33794c1df38f4434707e207a1e03c1..c8ce23e443df0761bfdd10836a19bf7a401bd622 100644
index e118f96fb9b67874ec86db8dede00cf34473e085..858db1505aa06d85f4e0b522d221f6543ff40f56 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3485,6 +3485,23 @@ public abstract class EntityLiving extends Entity {
@@ -3492,6 +3492,23 @@ public abstract class EntityLiving extends Entity {
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
}
// Paper start

View file

@ -27,7 +27,7 @@ index 0790d45e3c8ac68c280b9378d93061b48b045639..a8054a599e3eb502e7bbce903b568398
int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b2cccdc9f2f243cd3fb1283ade0280b2acb0f772..4923fe299e7f057d5d70d346e83e746185eafdd3 100644
index 769fada8ffa657493e5d7bf025281ff5f9f4299f..c9f4dab524e8f2a80b9e3ee178c36b2e394b5f84 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1452,6 +1452,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -47,7 +47,7 @@ index b2cccdc9f2f243cd3fb1283ade0280b2acb0f772..4923fe299e7f057d5d70d346e83e7461
protected void l(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 8021d06b7765ad00abdbd8b77c37f7a80cb15803..7a061f1f072f57042bb32ff187b0f916545e2e48 100644
index 5076dd7e874be76d81b13f53076bc4723dd2fddc..cd50fe3616d4b33c7ad76458fb75683541c33ae5 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -711,7 +711,8 @@ public class EntityArmorStand extends EntityLiving {
@ -119,7 +119,7 @@ index 09d076db37507b17797635df232a568752c97584..3bcebb89c9f9a5243d1d215a47d7d5e6
public void saveData(NBTTagCompound nbttagcompound) {
super.saveData(nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 9f08c6dd5e4c6859f9e8017eb1d0f388f6aba0d3..0b05588d9ad01c10edf1ca12c303207ab6069c0a 100644
index 858db1505aa06d85f4e0b522d221f6543ff40f56..352049363d4b7a0302610f7d7cd54c9cc6c2a9e0 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -96,7 +96,7 @@ public abstract class EntityLiving extends Entity {
@ -222,7 +222,7 @@ index 9f08c6dd5e4c6859f9e8017eb1d0f388f6aba0d3..0b05588d9ad01c10edf1ca12c303207a
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
BlockPosition blockposition = this.getChunkCoordinates();
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
@@ -1449,7 +1475,8 @@ public abstract class EntityLiving extends Entity {
@@ -1456,7 +1482,8 @@ public abstract class EntityLiving extends Entity {
}
}
@ -232,7 +232,7 @@ index 9f08c6dd5e4c6859f9e8017eb1d0f388f6aba0d3..0b05588d9ad01c10edf1ca12c303207a
Entity entity = damagesource.getEntity();
int i;
@@ -1467,15 +1494,18 @@ public abstract class EntityLiving extends Entity {
@@ -1474,15 +1501,18 @@ public abstract class EntityLiving extends Entity {
this.dropDeathLoot(damagesource, i, flag);
}
// CraftBukkit start - Call death event
@ -252,7 +252,7 @@ index 9f08c6dd5e4c6859f9e8017eb1d0f388f6aba0d3..0b05588d9ad01c10edf1ca12c303207a
// CraftBukkit start
public int getExpReward() {
@@ -1560,6 +1590,7 @@ public abstract class EntityLiving extends Entity {
@@ -1567,6 +1597,7 @@ public abstract class EntityLiving extends Entity {
return SoundEffects.ENTITY_GENERIC_HURT;
}
@ -260,7 +260,7 @@ index 9f08c6dd5e4c6859f9e8017eb1d0f388f6aba0d3..0b05588d9ad01c10edf1ca12c303207a
@Nullable
protected SoundEffect getSoundDeath() {
return SoundEffects.ENTITY_GENERIC_DEATH;
@@ -2096,10 +2127,12 @@ public abstract class EntityLiving extends Entity {
@@ -2103,10 +2134,12 @@ public abstract class EntityLiving extends Entity {
}
@ -274,7 +274,7 @@ index 9f08c6dd5e4c6859f9e8017eb1d0f388f6aba0d3..0b05588d9ad01c10edf1ca12c303207a
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 415f0d74748484db0a211187a74b5d0b51ffe1cd..1e57e53c965a2e9335aa36926c44f7f3aa43af3c 100644
index 74acd6cc97d6b115ff2db220e53081ea9baa7eed..3e7cdc8c1bf9f12598c1364b711001a16c3b9c87 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -84,6 +84,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View file

@ -91,10 +91,10 @@ index 502625005f9775ec4cb7200c7e401e44314f6d08..ed544187f27b06c4cd575eff45f5691c
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index ad15e356b1ae5e1cbcd7f4bde974218c506ea658..68ffb2c3f27ea8d034eda4776ddb78524f654770 100644
index 352049363d4b7a0302610f7d7cd54c9cc6c2a9e0..cade819fe5f7b23b2f4ada721b33ae74516ef8fc 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2915,11 +2915,13 @@ public abstract class EntityLiving extends Entity {
@@ -2922,11 +2922,13 @@ public abstract class EntityLiving extends Entity {
return ((Byte) this.datawatcher.get(EntityLiving.ag) & 4) != 0;
}

View file

@ -66,10 +66,10 @@ index 031dcd2092800118d4cb12c8bb92b51ccf1bbd27..8827ccfc77284020496046e755b3639d
return 0.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 68ffb2c3f27ea8d034eda4776ddb78524f654770..b0a2ce464261b6bdb96f78e429a28e48a42e841b 100644
index cade819fe5f7b23b2f4ada721b33ae74516ef8fc..870aa56735bae3344d7d01d252b943225cc056c4 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3537,6 +3537,37 @@ public abstract class EntityLiving extends Entity {
@@ -3544,6 +3544,37 @@ public abstract class EntityLiving extends Entity {
return world.rayTrace(raytrace);
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b0a2ce464261b6bdb96f78e429a28e48a42e841b..2ad4415b41930b4e002c5c526f0cdd9a1645a38a 100644
index 870aa56735bae3344d7d01d252b943225cc056c4..4567b0fe175765748bb787049e10fbe0af0a61d9 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3100,10 +3100,13 @@ public abstract class EntityLiving extends Entity {
@@ -3107,10 +3107,13 @@ public abstract class EntityLiving extends Entity {
this.datawatcher.set(EntityLiving.ag, (byte) j);
}
@ -24,7 +24,7 @@ index b0a2ce464261b6bdb96f78e429a28e48a42e841b..2ad4415b41930b4e002c5c526f0cdd9a
this.activeItem = itemstack;
this.bd = itemstack.k();
if (!this.world.isClientSide) {
@@ -3181,6 +3184,7 @@ public abstract class EntityLiving extends Entity {
@@ -3188,6 +3191,7 @@ public abstract class EntityLiving extends Entity {
this.releaseActiveItem();
} else {
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
@ -32,7 +32,7 @@ index b0a2ce464261b6bdb96f78e429a28e48a42e841b..2ad4415b41930b4e002c5c526f0cdd9a
this.b(this.activeItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -3215,8 +3219,8 @@ public abstract class EntityLiving extends Entity {
@@ -3222,8 +3226,8 @@ public abstract class EntityLiving extends Entity {
}
this.clearActiveItem();

View file

@ -7,10 +7,10 @@ Fixes an AssertionError when setting the player's item in hand to null or a new
Fixes GH-2718
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index dbd212fc2f0c95ab1dcc4b6be86f0f87ac726fa7..37e3efa1fed858f735166a5c0cb97f886b2bbb4e 100644
index 4567b0fe175765748bb787049e10fbe0af0a61d9..11a1fad5450ec94aeb4b135d7efc72718297c9cd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2055,6 +2055,7 @@ public abstract class EntityLiving extends Entity {
@@ -2062,6 +2062,7 @@ public abstract class EntityLiving extends Entity {
return predicate.test(this.getItemInMainHand().getItem()) || predicate.test(this.getItemInOffHand().getItem());
}
@ -19,7 +19,7 @@ index dbd212fc2f0c95ab1dcc4b6be86f0f87ac726fa7..37e3efa1fed858f735166a5c0cb97f88
if (enumhand == EnumHand.MAIN_HAND) {
return this.getEquipment(EnumItemSlot.MAINHAND);
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4dd57152cb0d09b2df08be68ab111623724d52fc..a6b83cb349386ff1fb6f3267f0d610bf31df3f16 100644
index ca5860d69dc729c8e1c2c123471a0a615367f00d..d35cfd180bb1854d61b66d46ab4930d70f470ab0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1557,6 +1557,10 @@ public class PlayerConnection implements PacketListenerPlayIn {

View file

@ -7,7 +7,7 @@ When the server is lagging, players will wait longer when eating.
Change to also use a time check instead if it passes.
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f855a39f27309f11e9f27f97a188d118f138c658..35d8972535342c65bafd67c24008d05a557ecf1d 100644
index 11a1fad5450ec94aeb4b135d7efc72718297c9cd..cfc4422aaaf79a7b198f7991d422f887574f59e0 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -120,7 +120,7 @@ public abstract class EntityLiving extends Entity {
@ -19,7 +19,7 @@ index f855a39f27309f11e9f27f97a188d118f138c658..35d8972535342c65bafd67c24008d05a
protected int be;
private BlockPosition bx;
private Optional<BlockPosition> by;
@@ -3050,6 +3050,11 @@ public abstract class EntityLiving extends Entity {
@@ -3057,6 +3057,11 @@ public abstract class EntityLiving extends Entity {
return ((Byte) this.datawatcher.get(EntityLiving.ag) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND;
}
@ -31,7 +31,7 @@ index f855a39f27309f11e9f27f97a188d118f138c658..35d8972535342c65bafd67c24008d05a
private void t() {
if (this.isHandRaised()) {
if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) {
@@ -3059,7 +3064,12 @@ public abstract class EntityLiving extends Entity {
@@ -3066,7 +3071,12 @@ public abstract class EntityLiving extends Entity {
this.b(this.activeItem, 5);
}
@ -45,7 +45,7 @@ index f855a39f27309f11e9f27f97a188d118f138c658..35d8972535342c65bafd67c24008d05a
this.s();
}
} else {
@@ -3109,7 +3119,10 @@ public abstract class EntityLiving extends Entity {
@@ -3116,7 +3126,10 @@ public abstract class EntityLiving extends Entity {
if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag
this.activeItem = itemstack;
@ -57,7 +57,7 @@ index f855a39f27309f11e9f27f97a188d118f138c658..35d8972535342c65bafd67c24008d05a
if (!this.world.isClientSide) {
this.c(1, true);
this.c(2, enumhand == EnumHand.OFF_HAND);
@@ -3133,7 +3146,10 @@ public abstract class EntityLiving extends Entity {
@@ -3140,7 +3153,10 @@ public abstract class EntityLiving extends Entity {
}
} else if (!this.isHandRaised() && !this.activeItem.isEmpty()) {
this.activeItem = ItemStack.b;
@ -69,7 +69,7 @@ index f855a39f27309f11e9f27f97a188d118f138c658..35d8972535342c65bafd67c24008d05a
}
}
@@ -3261,7 +3277,10 @@ public abstract class EntityLiving extends Entity {
@@ -3268,7 +3284,10 @@ public abstract class EntityLiving extends Entity {
}
this.activeItem = ItemStack.b;

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index eaac2827d49067f92e22b39fceef8d149fb5001b..4df0fd9883027440b7148a47c855e30730ab8590 100644
index 5d8c2f2b002945f5d6c26d61d2c3cffe4c84ec81..ae3787bbdeacbac83b238eac098fcfe1e3b6e448 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2775,8 +2775,10 @@ public abstract class EntityLiving extends Entity {
@@ -2782,8 +2782,10 @@ public abstract class EntityLiving extends Entity {
} else if (this.aQ() && (!this.onGround || d7 > d8)) {
this.c((Tag) TagsFluid.LAVA);
} else if ((this.onGround || flag && d7 <= d8) && this.jumpTicks == 0) {

View file

@ -7,10 +7,10 @@ Will not run if max entity craming is disabled and
the max collisions per entity is less than or equal to 0
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 4df0fd9883027440b7148a47c855e30730ab8590..8ab635d2f95e32d08db21060419914f0250dbc79 100644
index ae3787bbdeacbac83b238eac098fcfe1e3b6e448..976e66ca81fe13b6bfede4da46bd45f0274de57f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2843,10 +2843,16 @@ public abstract class EntityLiving extends Entity {
@@ -2850,10 +2850,16 @@ public abstract class EntityLiving extends Entity {
protected void doTick() {}
protected void collideNearby() {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 25af1a69317cda73fb93689c899fcee676ff5c95..97696e489413cb93bd12299a886b18152f32f522 100644
index 976e66ca81fe13b6bfede4da46bd45f0274de57f..29baae49888f030d136e99c44a5a55494606e471 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1830,7 +1830,16 @@ public abstract class EntityLiving extends Entity {
@@ -1837,7 +1837,16 @@ public abstract class EntityLiving extends Entity {
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
if (damagesource.getEntity() instanceof EntityHuman) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c081df4c5e007770bf1d4f0e45eac91869d27c14..338fb04d69eaad4902a2db80a6839d2ad0eeb467 100644
index 29baae49888f030d136e99c44a5a55494606e471..91c3d5adb98f0ba004db51ea51942655ba8852c0 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2940,7 +2940,7 @@ public abstract class EntityLiving extends Entity {
@@ -2947,7 +2947,7 @@ public abstract class EntityLiving extends Entity {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - suppress

View file

@ -88,7 +88,7 @@ index befd863533b84a88ae2f004125428a6fbeedddab..2a91f07ca9c4dc0cb3b5aef5c9c1db7f
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 338fb04d69eaad4902a2db80a6839d2ad0eeb467..568e9b13691f5dd8f388718d040fd57c75f72eea 100644
index 91c3d5adb98f0ba004db51ea51942655ba8852c0..2a1b17717b37e5f839e357c2196287a4024852e9 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -43,7 +43,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -99,7 +99,7 @@ index 338fb04d69eaad4902a2db80a6839d2ad0eeb467..568e9b13691f5dd8f388718d040fd57c
public abstract class EntityLiving extends Entity {
@@ -2858,7 +2857,7 @@ public abstract class EntityLiving extends Entity {
@@ -2865,7 +2864,7 @@ public abstract class EntityLiving extends Entity {
return;
}
// Paper - end don't run getEntities if we're not going to use its result
@ -108,7 +108,7 @@ index 338fb04d69eaad4902a2db80a6839d2ad0eeb467..568e9b13691f5dd8f388718d040fd57c
if (!list.isEmpty()) {
// Paper - move up
@@ -2996,9 +2995,16 @@ public abstract class EntityLiving extends Entity {
@@ -3003,9 +3002,16 @@ public abstract class EntityLiving extends Entity {
return !this.dead && this.collides; // CraftBukkit
}

View file

@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 7b5bb97d410e20d3aa6b9222e4f8ad878e667bc8..b52e23ac1b62973c64d39d776c709f567774b74e 100644
index 3c23a8ab3fe5e4b58816cf051dbe237530bff4a0..b7a362bd9c5e9dae909b863335bae3a94d404a16 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -10,6 +10,7 @@ import com.mojang.datafixers.util.Pair;
@ -16,7 +16,7 @@ index 7b5bb97d410e20d3aa6b9222e4f8ad878e667bc8..b52e23ac1b62973c64d39d776c709f56
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
@@ -2811,6 +2812,20 @@ public abstract class EntityLiving extends Entity {
@@ -2818,6 +2819,20 @@ public abstract class EntityLiving extends Entity {
this.collideNearby();
this.world.getMethodProfiler().exit();

@ -1 +1 @@
Subproject commit c3e684ef704c2685bc85b1f2b760d7075e434dfc
Subproject commit 08de4679f03b406714cdb4308566804a17abfb48