Update Paper

This commit is contained in:
Telesphoreo 2024-02-24 16:32:31 -06:00
parent ec0768f1a5
commit ce9b94d9b1
No known key found for this signature in database
GPG Key ID: 9D1991811E093C02
17 changed files with 48 additions and 47 deletions

View File

@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
version=1.20.4-R0.1-SNAPSHOT
mcVersion=1.20.4
paperRef=4939f8711884901ddf1c56337f606de71cdae78d
paperRef=681bbff110d9a56152ae898c4dfe1c0356b40e69
org.gradle.caching=true
org.gradle.parallel=true

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Build changes
diff --git a/build.gradle.kts b/build.gradle.kts
index ce3747d8d2a8f4327766cf23d5aaa72cfcb380bc..32118caeb0fa211def89c7f83563d38b8c317ca3 100644
index 241808d8619e17c0681f79acbbc98af5bf52dd89..82af4efd81ea8a9333bcafc3fe7d7e98ea69423b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
@ -23,7 +23,7 @@ index ce3747d8d2a8f4327766cf23d5aaa72cfcb380bc..32118caeb0fa211def89c7f83563d38b
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -66,11 +70,19 @@ tasks.jar {
@@ -67,11 +71,19 @@ tasks.jar {
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
@ -45,7 +45,7 @@ index ce3747d8d2a8f4327766cf23d5aaa72cfcb380bc..32118caeb0fa211def89c7f83563d38b
"Implementation-Vendor" to date, // Paper
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
@@ -154,7 +166,7 @@ fun TaskContainer.registerRunTask(
@@ -155,7 +167,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fixes log spam caused by invalid entities in beehives
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
index 56b328c64bea0ffd51930d8ba15fb87a36e6d8a1..d9bdebca610d070453a83b7639207fedaeffa639 100644
index 55b0e2bf98a285cdcd30e40d94192b7a1802efd8..c5f206f392efe86d801539e0bad354b125c3d411 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
@@ -11,6 +11,7 @@ import net.minecraft.nbt.CompoundTag;
@ -16,7 +16,7 @@ index 56b328c64bea0ffd51930d8ba15fb87a36e6d8a1..d9bdebca610d070453a83b7639207fed
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.BlockTags;
@@ -370,6 +371,13 @@ public class BeehiveBlockEntity extends BlockEntity {
@@ -374,6 +375,13 @@ public class BeehiveBlockEntity extends BlockEntity {
for (int i = 0; i < nbttaglist.size(); ++i) {
CompoundTag nbttagcompound1 = nbttaglist.getCompound(i);

View File

@ -31,10 +31,10 @@ index 2ee4ee14ab3345486dad6b24fd9a4fcc6c746b99..c5ac6cda91a81d3075f5c763e30dc009
@Override
diff --git a/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java b/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
index 1f55185814125c691288294d18bf1580461c8066..259d65f8e21f9cf99585d416eafdc967dddccf57 100644
index 094ab43e5a209ea848bf0994db9018281c64e08d..c6faba7da6809e24d734b7d6b0b787d20163b051 100644
--- a/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
+++ b/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
@@ -409,7 +409,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
@@ -410,7 +410,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
try {
this.setParticle(ParticleArgument.readParticle(new StringReader(nbt.getString("Particle")), (HolderLookup) BuiltInRegistries.PARTICLE_TYPE.asLookup()));
} catch (CommandSyntaxException commandsyntaxexception) {

View File

@ -6,13 +6,13 @@ Subject: [PATCH] Ignore errors thrown when trying to remove minecart entities
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
index 6d23c39e4eadf23616080d6d08672e13b5d3c37d..0bd5c3e3bb7074b5265e3f1bf670f993c9fe167d 100644
index 756d0434472921992c9d84597d7c9c824e93614c..77e9e106c522712a484d01bf7e7434c380de3621 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
@@ -139,7 +139,11 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
@Override
public void remove(Entity.RemovalReason reason) {
if (!this.level().isClientSide && reason.shouldDestroy()) {
@@ -147,7 +147,11 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
// CraftBukkit end
if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) {
- Containers.dropContents(this.level(), (Entity) this, (Container) this);
+ // Scissors start - Ignore errors thrown when trying to remove minecart entities with content in them
+ try {
@ -21,4 +21,4 @@ index 6d23c39e4eadf23616080d6d08672e13b5d3c37d..0bd5c3e3bb7074b5265e3f1bf670f993
+ // Scissors end
}
super.remove(reason);
super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause

View File

@ -5,19 +5,20 @@ Subject: [PATCH] ItemEntity - Check if items are air before calling setItem
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index eb0d6238588efa35fa868f26290547574a08eca2..83fd3204169801e18a355db5a547acc0157a50be 100644
index c7f06c3cfb737bd17a706798bf9cf0e1af5f0cc0..4fd00227d035284688e641cb2c55a3214dcbaa38 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -444,11 +444,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -445,11 +445,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
CompoundTag nbttagcompound1 = nbt.getCompound("Item");
- this.setItem(ItemStack.of(nbttagcompound1));
- if (this.getItem().isEmpty()) {
- this.discard(null); // CraftBukkit - add Bukkit remove cause
+ // Scissors start
+ ItemStack item = ItemStack.of(nbttagcompound1);
+ if (item.isEmpty()) {
this.discard();
+ this.discard(null);
+ return;
}

View File

@ -93,10 +93,10 @@ index 186547674894fd084bceb478bb6017b747df4173..74c880425964da042ca57c097eb93273
}
}).reduce((accumulator, current) -> {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 906eded9a2ab61737a30cfe89292a71237ce4eb7..ea36187ed37d59edd2481de79372599a85f04e97 100644
index 45439b0cc4ea69e409fd41d4684403c0e0feab12..79ef94350828bcf780ee65d9de7006730214a2c8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2529,11 +2529,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2545,11 +2545,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (nbt.contains("CustomName", 8)) {
String s = nbt.getString("CustomName");

View File

@ -1,19 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Allink <arclicious@vivaldi.net>
Date: Mon, 18 Apr 2022 16:55:19 +0100
From: Telesphoreo <me@telesphoreo.me>
Date: Sat, 24 Feb 2024 15:32:48 -0600
Subject: [PATCH] Fix negative death times
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index aceee33eebd4d5f89e62a42910ec51843f33843b..41efa95605aff3bad72dfd4ec1a5555a3abff284 100644
index 23570a0b1227a840b9c1e6ae326827ea655bb5f7..b95ea8c0ef66b1f8fad0de0e005bf2cf95da5808 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -628,7 +628,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -629,7 +629,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void tickDeath() {
++this.deathTime;
- if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) {
+ if ((this.deathTime >= 20 || this.deathTime <= 0) && !this.level().isClientSide() && !this.isRemoved()) { // Scissors
this.level().broadcastEntityEvent(this, (byte) 60);
this.remove(Entity.RemovalReason.KILLED);
this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
}

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Limit amount of vehicle collision checks to 3 and discard
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index d514ec1e4cbdc579c3a61533998437903afdc8b6..99576adcba7dafeb7aaccff48b53365c930ccad7 100644
index d514ec1e4cbdc579c3a61533998437903afdc8b6..7ee1f3552b81bff834c6f414e611e8b05463fc6f 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -8,6 +8,7 @@ import com.mojang.datafixers.util.Pair;
@ -43,7 +43,7 @@ index d514ec1e4cbdc579c3a61533998437903afdc8b6..99576adcba7dafeb7aaccff48b53365c
+
+ // Scissors start - Add a collision debounce
+ if (list.size() > 15) {
+ this.discard();
+ this.discard(null);
+ } else if (list.size() > 3) {
+ lastLargeCollision = System.currentTimeMillis();
+ }
@ -52,7 +52,7 @@ index d514ec1e4cbdc579c3a61533998437903afdc8b6..99576adcba7dafeb7aaccff48b53365c
} else {
Iterator iterator1 = this.level().getEntities(this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator();
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
index db6aa75d642f4a7258f197933671907faf79c8f2..9b7a358d61ea5caffa5f501f2586f316cc338c00 100644
index db6aa75d642f4a7258f197933671907faf79c8f2..e4490494a865e129c69d7df3742f61860763a8d8 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -5,6 +5,7 @@ import com.google.common.collect.UnmodifiableIterator;
@ -90,7 +90,7 @@ index db6aa75d642f4a7258f197933671907faf79c8f2..9b7a358d61ea5caffa5f501f2586f316
+
+ // Scissors start - Add collision debounce
+ if (list.size() > 15) {
+ this.discard();
+ this.discard(null);
+ } else if (list.size() > 3) {
+ lastLargeCollision = System.currentTimeMillis();
+ }

View File

@ -252,7 +252,7 @@ index 881379681c39230a00b3a1f11cd87498984396c7..d0513b72cdaec3b67b9341d251367b19
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index a61d7cd2b078fe511ff00344197b6ea11feebfb2..dd23c2ed904a3694337008207c953f7ed2a6e2ac 100644
index 757edf74751dc7183454656fda9cecc4eb601e4c..005de26f9a8a67f29a474823515ee66730690b52 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -6,6 +6,7 @@ import java.util.function.BooleanSupplier;
@ -263,7 +263,7 @@ index a61d7cd2b078fe511ff00344197b6ea11feebfb2..dd23c2ed904a3694337008207c953f7e
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList;
@@ -56,6 +57,17 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -57,6 +58,17 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
private int maxStack = MAX_STACK;
public List<ItemStack> getContents() {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't log invalid teams to console
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 41efa95605aff3bad72dfd4ec1a5555a3abff284..a4b89ac2bffb29e9f952b1ef3f0e08c1f6060118 100644
index b95ea8c0ef66b1f8fad0de0e005bf2cf95da5808..1e833374f4abd649074b2b42067317f42cf78df6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -861,7 +861,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -869,7 +869,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam);
if (!flag) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fixes out of bounds HangingEntity crash exploit
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
index f88918b7c15b72f4cb1dd313734f550432fd5858..684c7e3cf58fc3a9cd69b8bbf8c722180bfba62b 100644
index 2446d649225f96748e2fbb1a53a9e1902ac22aa1..76016cbbdff22592b76e827212b76021f3e39e13 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
@@ -279,6 +279,13 @@ public abstract class HangingEntity extends Entity {
@@ -280,6 +280,13 @@ public abstract class HangingEntity extends Entity {
public void readAdditionalSaveData(CompoundTag nbt) {
BlockPos blockposition = new BlockPos(nbt.getInt("TileX"), nbt.getInt("TileY"), nbt.getInt("TileZ"));

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent invalid container events
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1c2b3042b0d7b012876e3d4aab4521915d2cda18..a66ec293947fc852104dce93a418771b2f44106d 100644
index d0a7490c153e7968c657a525908de58f60f26c20..807117124668040121c5252a10c33ad100c0b0da 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -29,6 +29,7 @@ import java.util.function.UnaryOperator;
@ -16,7 +16,7 @@ index 1c2b3042b0d7b012876e3d4aab4521915d2cda18..a66ec293947fc852104dce93a418771b
import net.minecraft.ChatFormatting;
import net.minecraft.SharedConstants;
import net.minecraft.Util;
@@ -2894,6 +2895,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2898,6 +2899,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent velocity freeze
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
index c4ecc5faa4f61e7974e8c475762924a89615b377..1c14b87f84b678b36adede9d2aa9a18453ce4278 100644
index 20ce474b72894a8bb3fc21018b9d79bbdc8bb14b..b5c87bb5f5d3526600520913f04cfc6614a62b81 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
@@ -1,6 +1,8 @@
@ -17,7 +17,7 @@ index c4ecc5faa4f61e7974e8c475762924a89615b377..1c14b87f84b678b36adede9d2aa9a184
import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
@@ -47,12 +49,15 @@ public abstract class AbstractHurtingProjectile extends Projectile {
@@ -50,12 +52,15 @@ public abstract class AbstractHurtingProjectile extends Projectile {
// CraftBukkit end
double d6 = Math.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
@ -38,7 +38,7 @@ index c4ecc5faa4f61e7974e8c475762924a89615b377..1c14b87f84b678b36adede9d2aa9a184
}
public AbstractHurtingProjectile(EntityType<? extends AbstractHurtingProjectile> type, LivingEntity owner, double directionX, double directionY, double directionZ, Level world) {
@@ -164,6 +169,25 @@ public abstract class AbstractHurtingProjectile extends Projectile {
@@ -167,6 +172,25 @@ public abstract class AbstractHurtingProjectile extends Projectile {
nbt.put("power", this.newDoubleList(new double[]{this.xPower, this.yPower, this.zPower}));
}
@ -64,7 +64,7 @@ index c4ecc5faa4f61e7974e8c475762924a89615b377..1c14b87f84b678b36adede9d2aa9a184
@Override
public void readAdditionalSaveData(CompoundTag nbt) {
super.readAdditionalSaveData(nbt);
@@ -171,9 +195,13 @@ public abstract class AbstractHurtingProjectile extends Projectile {
@@ -174,9 +198,13 @@ public abstract class AbstractHurtingProjectile extends Projectile {
ListTag nbttaglist = nbt.getList("power", 6);
if (nbttaglist.size() == 3) {
@ -81,7 +81,7 @@ index c4ecc5faa4f61e7974e8c475762924a89615b377..1c14b87f84b678b36adede9d2aa9a184
}
}
@@ -207,9 +235,13 @@ public abstract class AbstractHurtingProjectile extends Projectile {
@@ -210,9 +238,13 @@ public abstract class AbstractHurtingProjectile extends Projectile {
Vec3 vec3d = entity.getLookAngle();
this.setDeltaMovement(vec3d);

View File

@ -62,7 +62,7 @@ index ba12919c3f9aec34a9e64993b143ae92be5eb172..bdfa4a7f5b50e80195e79a6dd1204cb7
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b324e9ac6bbbe691c0b3c2994f326c0aa06d7dd7..f2c3b81779bbd2c52068750e65e66e1ca6c4d492 100644
index 23f4fc3cc157830da18bf5905eb51f2ae2b452bd..29d230487b42150b8790685653e1ed24d435b417 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1,5 +1,6 @@
@ -97,7 +97,7 @@ index b324e9ac6bbbe691c0b3c2994f326c0aa06d7dd7..f2c3b81779bbd2c52068750e65e66e1c
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes
}
@@ -3456,6 +3459,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3460,6 +3463,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleChatSessionUpdate(ServerboundChatSessionUpdatePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Patch invalid entity rotation log spam
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ea36187ed37d59edd2481de79372599a85f04e97..133ce42e3c6574bdf922b43f7ab9516f79cbf64e 100644
index 79ef94350828bcf780ee65d9de7006730214a2c8..ed116878cf8525f4ab5b6656d6e40e8504a4f42b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4735,7 +4735,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4751,7 +4751,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void setXRot(float pitch) {
if (!Float.isFinite(pitch)) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent player banning using duplicate UUIDs
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..41b6df194a452cdf9504e0eab4123974a8c8ec33 100644
index 6907d1be36fbdf0856c0e11983218d2fd1f9cb46..298c8a9cd08425e9aa4f222b98d95d92b80951e6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1667,7 +1667,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -17,7 +17,7 @@ index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..41b6df194a452cdf9504e0eab4123974
+ if (entity instanceof ServerPlayer serverPlayer) {
+ this.removePlayerImmediately(serverPlayer, Entity.RemovalReason.DISCARDED);
+ } else {
+ entity.discard();
+ entity.discard(null);
+ }
+ // Scissors end
}