aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0359-Fix-item-duplication-and-teleport-issues.patch')
-rw-r--r--patches/server/0359-Fix-item-duplication-and-teleport-issues.patch30
1 files changed, 15 insertions, 15 deletions
diff --git a/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
index 9929b92856..b15c4048e1 100644
--- a/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
+++ b/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
@@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7bbf10475 100644
+index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de675fcaf8c8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2403,11 +2403,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2416,11 +2416,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@@ -34,7 +34,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
-@@ -3206,6 +3207,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3219,6 +3220,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
// CraftBukkit end
@@ -47,7 +47,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
this.level().getProfiler().push("changeDimension");
// CraftBukkit start
-@@ -3232,6 +3239,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3245,6 +3252,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit end
this.level().getProfiler().popPush("reloading");
@@ -59,7 +59,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
Entity entity = this.getType().create(worldserver);
if (entity != null) {
-@@ -3249,10 +3261,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3262,10 +3274,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start - Forward the CraftEntity to the new entity
this.getBukkitEntity().setHandle(entity);
entity.bukkitEntity = this.getBukkitEntity();
@@ -70,7 +70,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
// CraftBukkit end
}
-@@ -3371,7 +3379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3384,7 +3392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean canChangeDimensions() {
@@ -80,10 +80,10 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 8fff7d4c98e198bba0b4076807adc67476fcaf4b..035faf890c02ebd5bdbb430dc473e7a1bc7b9fd1 100644
+index d53069d6b0be5a82f7b34a336439fdfd356e4a79..67ff37d395f83c1a0f5c8305375f703cbe4c0609 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1706,9 +1706,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1714,9 +1714,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
@@ -96,7 +96,7 @@ index 8fff7d4c98e198bba0b4076807adc67476fcaf4b..035faf890c02ebd5bdbb430dc473e7a1
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
-@@ -1809,8 +1809,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1817,8 +1817,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(source, i, flag);
this.clearEquipmentSlots = prev; // Paper
}
@@ -113,10 +113,10 @@ index 8fff7d4c98e198bba0b4076807adc67476fcaf4b..035faf890c02ebd5bdbb430dc473e7a1
this.drops = new ArrayList<>();
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-index ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d..4e3cf19b83410f3bcacd953a600bf0bed6e45450 100644
+index 11555d1b771f93234098a3bc6a6eaacddeeeb4f6..bc1a95f466b700bb0530cf0bb61fcbcbe21f5bbb 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -624,7 +624,7 @@ public class ArmorStand extends LivingEntity {
+@@ -625,7 +625,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
@@ -125,7 +125,7 @@ index ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d..4e3cf19b83410f3bcacd953a600bf0be
this.handItems.set(i, ItemStack.EMPTY);
}
}
-@@ -632,7 +632,7 @@ public class ArmorStand extends LivingEntity {
+@@ -633,7 +633,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
@@ -135,10 +135,10 @@ index ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d..4e3cf19b83410f3bcacd953a600bf0be
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 2b342f81ae8bfefe2a240351f28fcafc40609a75..c9fbc54d7ba10da4f4c376e029b64fb0249171a3 100644
+index 3dee6c973d4b4ac6f64fdcb5ac7fa681cefbdb1c..8da01bdaa2a1c621947b6a50b178eec10deb1250 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -893,6 +893,11 @@ public class CraftEventFactory {
+@@ -894,6 +894,11 @@ public class CraftEventFactory {
}
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
@@ -150,7 +150,7 @@ index 2b342f81ae8bfefe2a240351f28fcafc40609a75..c9fbc54d7ba10da4f4c376e029b64fb0
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
populateFields(victim, event); // Paper - make cancellable
-@@ -906,11 +911,13 @@ public class CraftEventFactory {
+@@ -907,11 +912,13 @@ public class CraftEventFactory {
playDeathSound(victim, event);
// Paper end
victim.expToDrop = event.getDroppedExp();