diff --git a/patches/server/0092-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0092-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 2b8d71debd..8b89961f0b 100644 --- a/patches/server/0092-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/patches/server/0092-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -25,7 +25,7 @@ index 6896ead71f87989c2fa90d0339eedfd08ac49dd1..99a7fadf87b0b081a1f5ab15a8eeb1b0 } } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index c20753645585143421eb544a03884f0765eafb8b..5ef9abc0903fc06468c35f5a8cc450a8f6c03165 100644 +index c20753645585143421eb544a03884f0765eafb8b..11e7c30e448f192493c65330a65d89ed3e14139f 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -763,6 +763,14 @@ public abstract class Player extends LivingEntity { @@ -34,7 +34,7 @@ index c20753645585143421eb544a03884f0765eafb8b..5ef9abc0903fc06468c35f5a8cc450a8 // CraftBukkit end + // Paper start - remove player from map on drop + if (itemstack.getItem() == Items.FILLED_MAP) { -+ net.minecraft.world.level.saveddata.maps.MapItemSavedData worldmap = net.minecraft.world.item.MapItem.getSavedData(itemstack, this.level); ++ net.minecraft.world.level.saveddata.maps.MapItemSavedData worldmap = net.minecraft.world.item.MapItem.getSavedData(itemstack, this.level()); + if (worldmap != null) { + worldmap.tickCarriedBy(this, itemstack); + } diff --git a/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 80e7a083e3..2d77eb0fb8 100644 --- a/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/0130-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -14,7 +14,7 @@ To be converted into a Paper-API event at some point in the future? public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b2297825402502c6b54d 100644 +index ec78328916a7cc544fea868afc904208d446739f..39d1304506abe361213fc6436c5ae25f000f8aee 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2322,6 +2322,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -23,7 +23,7 @@ index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b22978254025 this.player.setShiftKeyDown(true); + + // Paper start - Hang on! -+ if (this.player.level.paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) { ++ if (this.player.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) { + this.player.removeEntitiesOnShoulder(); + } + // Paper end @@ -32,7 +32,7 @@ index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b22978254025 case RELEASE_SHIFT_KEY: this.player.setShiftKeyDown(false); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 5ef9abc0903fc06468c35f5a8cc450a8f6c03165..90aba22c91bf9950c4df2204afc3fc97e411ea9a 100644 +index 11e7c30e448f192493c65330a65d89ed3e14139f..8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0140-Shoulder-Entities-Release-API.patch b/patches/server/0140-Shoulder-Entities-Release-API.patch index a8cf56ed85..b3bbf8aa8a 100644 --- a/patches/server/0140-Shoulder-Entities-Release-API.patch +++ b/patches/server/0140-Shoulder-Entities-Release-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580f71bd217 100644 +index 8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8..85488adc9c822c89ab5778bc1d48c58e916795c8 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -2036,20 +2036,45 @@ public abstract class Player extends LivingEntity { @@ -14,7 +14,7 @@ index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580 + // Paper start + public Entity releaseLeftShoulderEntity() { -+ Entity entity = this.spawnEntityFromShoulder0(this.getShoulderEntityLeft()); ++ Entity entity = this.respawnEntityOnShoulder0(this.getShoulderEntityLeft()); + if (entity != null) { + this.setShoulderEntityLeft(new CompoundTag()); + } @@ -22,7 +22,7 @@ index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580 + } + + public Entity releaseRightShoulderEntity() { -+ Entity entity = this.spawnEntityFromShoulder0(this.getShoulderEntityRight()); ++ Entity entity = this.respawnEntityOnShoulder0(this.getShoulderEntityRight()); + if (entity != null) { + this.setShoulderEntityRight(new CompoundTag()); + } @@ -32,7 +32,7 @@ index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580 + private boolean respawnEntityOnShoulder(CompoundTag nbttagcompound) { // CraftBukkit void->boolean - if (!this.level().isClientSide && !nbttagcompound.isEmpty()) { -+ return this.spawnEntityFromShoulder0(nbttagcompound) != null; ++ return this.respawnEntityOnShoulder0(nbttagcompound) != null; + } + + // Paper - return entity diff --git a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch index abf388f3b3..cb7094caa5 100644 --- a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 3fb88342aeab37cc397ba80077fdf580f71bd217..62112ea94bc6a022b69ab426cc2b71821b12c19e 100644 +index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535f70030e8 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -1234,7 +1234,7 @@ public abstract class Player extends LivingEntity { @@ -61,7 +61,7 @@ index 3fb88342aeab37cc397ba80077fdf580f71bd217..62112ea94bc6a022b69ab426cc2b7182 } + // Paper start - send SoundEffect to everyone who can see fromEntity + private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) { -+ fromEntity.level.playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself ++ fromEntity.level().playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself + if (fromEntity instanceof ServerPlayer) { + ((ServerPlayer) fromEntity).connection.send(new net.minecraft.network.protocol.game.ClientboundSoundPacket(net.minecraft.core.registries.BuiltInRegistries.SOUND_EVENT.wrapAsHolder(soundEffect), soundCategory, x, y, z, volume, pitch, fromEntity.random.nextLong())); + } diff --git a/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch index 86a28063b9..f2da60a6cf 100644 --- a/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 62112ea94bc6a022b69ab426cc2b71821b12c19e..0bf9425d001660816b36674c2757ec9e85cbd296 100644 +index 9922ab54fa2ea3abef759aba08cca535f70030e8..a668a62da9fb7fc013f078c030580b13a62db3ca 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -1241,6 +1241,7 @@ public abstract class Player extends LivingEntity { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; -+ flag2 = flag2 && !level.paperConfig().entities.behavior.disablePlayerCrits; // Paper ++ flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper flag2 = flag2 && !this.isSprinting(); if (flag2) { f *= 1.5F; diff --git a/patches/server/0187-Configurable-sprint-interruption-on-attack.patch b/patches/server/0187-Configurable-sprint-interruption-on-attack.patch index 0b1be26726..34edd1092e 100644 --- a/patches/server/0187-Configurable-sprint-interruption-on-attack.patch +++ b/patches/server/0187-Configurable-sprint-interruption-on-attack.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 0bf9425d001660816b36674c2757ec9e85cbd296..f5662c9b8dfd3251be6bf57e7bc13aeb54fe30c2 100644 +index a668a62da9fb7fc013f078c030580b13a62db3ca..10dd06a23b34b7c8515c9ccc3988a9e8182c460d 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -1290,7 +1290,11 @@ public abstract class Player extends LivingEntity { @@ -15,7 +15,7 @@ index 0bf9425d001660816b36674c2757ec9e85cbd296..f5662c9b8dfd3251be6bf57e7bc13aeb this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); - this.setSprinting(false); + // Paper start - Configuration option to disable automatic sprint interruption -+ if (!level.paperConfig().misc.disableSprintInterruptionOnAttack) { ++ if (!this.level().paperConfig().misc.disableSprintInterruptionOnAttack) { + this.setSprinting(false); + } + // Paper end diff --git a/patches/unapplied/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/0216-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch similarity index 84% rename from patches/unapplied/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch rename to patches/server/0216-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index e95d8952ce..f378ab2174 100644 --- a/patches/unapplied/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/0216-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread diff --git a/build.gradle.kts b/build.gradle.kts -index 8af9299c67ad2a1746bb340287b3373b208568ee..03095720795b994d0d97e7f65d350552792d71a8 100644 +index 967b675eb600282b881d966f95c9d3cde3edc4e8..89bdaf0da412eb13c33039599df90b9ac86b02bf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,6 +27,7 @@ dependencies { implementation("commons-lang:commons-lang:2.6") - runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") - runtimeOnly("com.mysql:mysql-connector-j:8.0.32") + runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0") + runtimeOnly("com.mysql:mysql-connector-j:8.0.33") + runtimeOnly("com.lmax:disruptor:3.4.4") // Paper - runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5") - runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") + runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.2") + runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10") diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 476f4a5cbe664ddd05474cb88553018bd334a5b8..3dc317e466e1b93dff030794dd7f29ca1b266778 100644 --- a/src/main/resources/log4j2.xml diff --git a/patches/unapplied/server/0222-add-more-information-to-Entity.toString.patch b/patches/server/0217-add-more-information-to-Entity.toString.patch similarity index 87% rename from patches/unapplied/server/0222-add-more-information-to-Entity.toString.patch rename to patches/server/0217-add-more-information-to-Entity.toString.patch index fe3ae30a1e..c1b9db48ea 100644 --- a/patches/unapplied/server/0222-add-more-information-to-Entity.toString.patch +++ b/patches/server/0217-add-more-information-to-Entity.toString.patch @@ -6,12 +6,12 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 8b3beb78cf48ea7a23865ddc16c8421ecb047aba..8d3712314a1674470bad90895e86bb34d923dcaa 100644 +index 2032b98a1571846b28fd18cdb3ae96f2640a11c9..96a4fb8f0fe5e8c3ec8172e5c1f49f16455f3853 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3025,7 +3025,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3096,7 +3096,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public String toString() { - String s = this.level == null ? "~NULL~" : this.level.toString(); + String s = this.level() == null ? "~NULL~" : this.level().toString(); - return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, s, this.getX(), this.getY(), this.getZ(), this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getName().getString(), this.id, s, this.getX(), this.getY(), this.getZ()); + return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid, this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid); diff --git a/patches/unapplied/server/0223-EnderDragon-Events.patch b/patches/server/0218-EnderDragon-Events.patch similarity index 83% rename from patches/unapplied/server/0223-EnderDragon-Events.patch rename to patches/server/0218-EnderDragon-Events.patch index 6368f8e07f..0559cac19b 100644 --- a/patches/unapplied/server/0223-EnderDragon-Events.patch +++ b/patches/server/0218-EnderDragon-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EnderDragon Events diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java -index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba04ab640f 100644 +index f72ad2e7d0d5953c906d0d9f8adb9ba74d1841be..7b96cf748b69db98cb1bc3dc0430e39b9ffc93f2 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java @@ -83,7 +83,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { @@ -13,7 +13,7 @@ index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba this.flame.setParticle(ParticleTypes.DRAGON_BREATH); this.flame.addEffect(new MobEffectInstance(MobEffects.HARM)); + if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.dragon.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.flame.getBukkitEntity()).callEvent()) { // Paper - this.dragon.level.addFreshEntity(this.flame); + this.dragon.level().addFreshEntity(this.flame); + // Paper start + } else { + this.end(); @@ -23,21 +23,21 @@ index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java -index 62b4b9a63452e8af7425c4d8ea4b4bada441c563..c2a14305cb737fbc6447c555d8a15e2d3977e3fa 100644 +index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..a3456b35db4e938f91d6bc32d4d202a011bf13c4 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java @@ -74,7 +74,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance { - DragonFireball dragonFireball = new DragonFireball(this.dragon.level, this.dragon, r, s, t); + DragonFireball dragonFireball = new DragonFireball(this.dragon.level(), this.dragon, r, s, t); dragonFireball.moveTo(o, p, q, 0.0F, 0.0F); + if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) dragon.getBukkitEntity(), (org.bukkit.entity.DragonFireball) dragonFireball.getBukkitEntity()).callEvent()) // Paper - this.dragon.level.addFreshEntity(dragonFireball); + this.dragon.level().addFreshEntity(dragonFireball); + else dragonFireball.discard(); // Paper this.fireballCharge = 0; if (this.currentPath != null) { while(!this.currentPath.isDone()) { diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java -index a7935042497a108a21814c28b01a0ab27aefbbc4..6afe37e42d88701af38df5793a9ea9d7d2cda5c5 100644 +index 796a2a88134eee4021423fef132537a5e0680bc5..9652e3385ad10e5d825dd141f6be3522c596916d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java @@ -52,8 +52,10 @@ public class DragonFireball extends AbstractHurtingProjectile { @@ -45,8 +45,8 @@ index a7935042497a108a21814c28b01a0ab27aefbbc4..6afe37e42d88701af38df5793a9ea9d7 } + if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - this.level.levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); - this.level.addFreshEntity(areaEffectCloud); + this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); + this.level().addFreshEntity(areaEffectCloud); + } else areaEffectCloud.discard(); // Paper this.discard(); } diff --git a/patches/unapplied/server/0224-PlayerElytraBoostEvent.patch b/patches/server/0219-PlayerElytraBoostEvent.patch similarity index 100% rename from patches/unapplied/server/0224-PlayerElytraBoostEvent.patch rename to patches/server/0219-PlayerElytraBoostEvent.patch diff --git a/patches/unapplied/server/0225-PlayerLaunchProjectileEvent.patch b/patches/server/0220-PlayerLaunchProjectileEvent.patch similarity index 99% rename from patches/unapplied/server/0225-PlayerLaunchProjectileEvent.patch rename to patches/server/0220-PlayerLaunchProjectileEvent.patch index 16a5be1670..558aaf5b04 100644 --- a/patches/unapplied/server/0225-PlayerLaunchProjectileEvent.patch +++ b/patches/server/0220-PlayerLaunchProjectileEvent.patch @@ -267,7 +267,7 @@ index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide()); } diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java -index 998758be827efbcb7693ed36ab1dffc0ef0369bf..9365f886a23a71c41091b22d46896ff18a5a0635 100644 +index 216ae3fbc6d64538255ad404ad7e9915d6694f81..8078f127ff4b6e0aafb5804b9c02e237f79445b5 100644 --- a/src/main/java/net/minecraft/world/item/TridentItem.java +++ b/src/main/java/net/minecraft/world/item/TridentItem.java @@ -83,21 +83,25 @@ public class TridentItem extends Item implements Vanishable { diff --git a/patches/unapplied/server/0226-Improve-BlockPosition-inlining.patch b/patches/server/0221-Improve-BlockPosition-inlining.patch similarity index 100% rename from patches/unapplied/server/0226-Improve-BlockPosition-inlining.patch rename to patches/server/0221-Improve-BlockPosition-inlining.patch diff --git a/patches/unapplied/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0222-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 75% rename from patches/unapplied/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/0222-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index ccc7098c42..cd32f1ada4 100644 --- a/patches/unapplied/server/0227-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0222-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups 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 8de5a556d364f29706e3391825288c8a3a75c9c8..51acb26076d7de1f365f7aaf6a2ab274a4b87cdc 100644 +index 68ac3ffae5d800bde3c5b5163a52768a43bb5963..a59381646031a1a99c98c8c6ad9de7efc96b774a 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -337,6 +337,7 @@ public class ArmorStand extends LivingEntity { @Override protected void pushEntities() { -+ if (!level.paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper - List list = this.level.getEntities((Entity) this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS); ++ if (!this.level().paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper + List list = this.level().getEntities((Entity) this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS); for (int i = 0; i < list.size(); ++i) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7c8069e237a41bf5d9fc09199ff1ac247e245d9d..f07e70ab26fffaec5055a7dd2571dc4d29c66d35 100644 +index eb2f9464b15f4e6e25c419761c055b6ee4c03279..823121fdfe99db01e3e995a50dbc8e241bcebe9c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -772,6 +772,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -760,6 +760,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end } } diff --git a/patches/unapplied/server/0228-Vanished-players-don-t-have-rights.patch b/patches/server/0223-Vanished-players-don-t-have-rights.patch similarity index 93% rename from patches/unapplied/server/0228-Vanished-players-don-t-have-rights.patch rename to patches/server/0223-Vanished-players-don-t-have-rights.patch index f2b8dd2ac7..59a9d99910 100644 --- a/patches/unapplied/server/0228-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0223-Vanished-players-don-t-have-rights.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index ad5c96e9a7577df1729533ec9a709387b7232844..621ecd0f3cac52d3e4cecd003c67401ec7f0a6f7 100644 +index e9ae25a70c747c173ebd2e393818d205527d5314..f49dd279ba9e8970f116f956466feb072c4f8420 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -216,6 +216,15 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -217,6 +217,15 @@ public abstract class Projectile extends Entity implements TraceableEntity { } else { Entity entity1 = this.getOwner(); @@ -39,10 +39,10 @@ index a6638e626600e4304a973497a39e3fac52203b16..e68b7a1b03783e4f9de24c5ae8773fc3 BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b1331b7f8 100644 +index 823121fdfe99db01e3e995a50dbc8e241bcebe9c..99bc511425cf079303716a5b12c913bc48ce775a 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -274,6 +274,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -273,6 +273,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } @@ -89,7 +89,7 @@ index f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b public boolean isClientSide() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c50cfe19bd40fb75fc66767d2760eb3b5852c4c8..ff1108579b9f8bb867be02a07784c645d0f4d037 100644 +index 116d3af618351cfec7dc172ba8e5170453b7226d..b77fefc9cf30fd438f557e5b56efb4c0251cb17a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1298,6 +1298,14 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0229-Allow-disabling-armour-stand-ticking.patch b/patches/server/0224-Allow-disabling-armour-stand-ticking.patch similarity index 96% rename from patches/unapplied/server/0229-Allow-disabling-armour-stand-ticking.patch rename to patches/server/0224-Allow-disabling-armour-stand-ticking.patch index 861b4b3b1e..25ee029470 100644 --- a/patches/unapplied/server/0229-Allow-disabling-armour-stand-ticking.patch +++ b/patches/server/0224-Allow-disabling-armour-stand-ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armour stand ticking 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 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a807a609c7 100644 +index a59381646031a1a99c98c8c6ad9de7efc96b774a..719f68f96e58ddcdd3592131c691d21263c81915 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -93,9 +93,16 @@ public class ArmorStand extends LivingEntity { @@ -54,7 +54,7 @@ index 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a8 CompoundTag nbttagcompound1 = nbt.getCompound("Pose"); this.readPose(nbttagcompound1); -@@ -669,7 +684,29 @@ public class ArmorStand extends LivingEntity { +@@ -663,7 +678,29 @@ public class ArmorStand extends LivingEntity { @Override public void tick() { @@ -84,7 +84,7 @@ index 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a8 Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE); if (!this.headPose.equals(vector3f)) { -@@ -793,31 +830,37 @@ public class ArmorStand extends LivingEntity { +@@ -792,31 +829,37 @@ public class ArmorStand extends LivingEntity { public void setHeadPose(Rotations angle) { this.headPose = angle; this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle); diff --git a/patches/unapplied/server/0230-SkeletonHorse-Additions.patch b/patches/server/0225-SkeletonHorse-Additions.patch similarity index 84% rename from patches/unapplied/server/0230-SkeletonHorse-Additions.patch rename to patches/server/0225-SkeletonHorse-Additions.patch index 0ff3d41afa..21281dd850 100644 --- a/patches/unapplied/server/0230-SkeletonHorse-Additions.patch +++ b/patches/server/0225-SkeletonHorse-Additions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java -index 17fda4857f74d2994525262472700e7788dec383..3b452b960a5e5e5d6582d7b64fe034402fb5fc2b 100644 +index 8f20239f3ef7ebe41fac8ee6e024c36dafec33c4..d00fb16ae3b94dfcb10fd1a7c1671595e2ff1855 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java @@ -18,6 +18,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper; @@ -20,22 +20,22 @@ index 17fda4857f74d2994525262472700e7788dec383..3b452b960a5e5e5d6582d7b64fe03440 @Override public boolean canUse() { -- return this.horse.level.hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API -+ return !(eligiblePlayers = this.horse.level.findNearbyBukkitPlayers(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D, net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING)).isEmpty(); // Paper - Affects Spawning API & SkeletonHorseTrapEvent +- return this.horse.level().hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API ++ return !(eligiblePlayers = this.horse.level().findNearbyBukkitPlayers(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D, net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING)).isEmpty(); // Paper - Affects Spawning API & SkeletonHorseTrapEvent } @Override public void tick() { - ServerLevel worldserver = (ServerLevel) this.horse.level; + ServerLevel worldserver = (ServerLevel) this.horse.level(); + if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.horse.getBukkitEntity(), eligiblePlayers).callEvent()) return; // Paper DifficultyInstance difficultydamagescaler = worldserver.getCurrentDifficultyAt(this.horse.blockPosition()); this.horse.setTrap(false); diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java -index ea98625fe7c00743b8df74a24e6d4b75df4189a5..66a5783e2a83c75ca46d1fd6f97d9de733c01a09 100644 +index 5e19b91e6fb7e5e354f55ea206b3d59e8767e714..625de1355efddf97f0fd3a0225081867c8a3fa7c 100644 --- a/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java -@@ -105,6 +105,28 @@ public interface EntityGetter { +@@ -93,6 +93,28 @@ public interface EntityGetter { return player; } diff --git a/patches/unapplied/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/0226-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 95% rename from patches/unapplied/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/0226-Don-t-call-getItemMeta-on-hasItemMeta.patch index 749cbf37f3..840fa83aff 100644 --- a/patches/unapplied/server/0231-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/patches/server/0226-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 4f350770fe90166f59c14e88abb34a3e3f494d22..16dd2e9951cf34af0c5bd4891d013423b9fad8b9 100644 +index e9ea9c85544a895dcf4220d907744996e6e077d4..5388a07fd8b5c8a4ea604996fb41e526e0d7c16c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -654,7 +654,7 @@ public final class CraftItemStack extends ItemStack { +@@ -656,7 +656,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { diff --git a/patches/unapplied/server/0232-Implement-Expanded-ArmorStand-API.patch b/patches/server/0227-Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/server/0232-Implement-Expanded-ArmorStand-API.patch rename to patches/server/0227-Implement-Expanded-ArmorStand-API.patch diff --git a/patches/unapplied/server/0233-AnvilDamageEvent.patch b/patches/server/0228-AnvilDamageEvent.patch similarity index 91% rename from patches/unapplied/server/0233-AnvilDamageEvent.patch rename to patches/server/0228-AnvilDamageEvent.patch index 677b0c90af..ad0982dd6c 100644 --- a/patches/unapplied/server/0233-AnvilDamageEvent.patch +++ b/patches/server/0228-AnvilDamageEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index e0d7fffdda14038907792fd73251d5dc41f94b3f..0a132fbbc58f52e51f50a44e887a3f20d2e0a61c 100644 +index b3d4b8a1a3fecd58edeed6562ffabe123569c139..d15f01f5a4f14d25ded9de015c70cbc7977a6a77 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -@@ -105,6 +105,16 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -108,6 +108,16 @@ public class AnvilMenu extends ItemCombinerMenu { if (!player.getAbilities().instabuild && iblockdata.is(BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) { BlockState iblockdata1 = AnvilBlock.damage(iblockdata); diff --git a/patches/unapplied/server/0234-Add-TNTPrimeEvent.patch b/patches/server/0229-Add-TNTPrimeEvent.patch similarity index 93% rename from patches/unapplied/server/0234-Add-TNTPrimeEvent.patch rename to patches/server/0229-Add-TNTPrimeEvent.patch index fe2676104d..3cad8a112f 100644 --- a/patches/unapplied/server/0234-Add-TNTPrimeEvent.patch +++ b/patches/server/0229-Add-TNTPrimeEvent.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 55a8ab31a26a16adbe78b3b34366dc81851c02d4..da1e60206f300d64f68f5aedeba52a164829676e 100644 +index 9d5d03a913366c0f60557e39523c30df7e2fde33..655f23ab6d594db838acca7baede45594ce1fd79 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -534,6 +534,11 @@ public class EnderDragon extends Mob implements Enemy { +@@ -567,6 +567,11 @@ public class EnderDragon extends Mob implements Enemy { }); - craftBlock.getNMS().spawnAfterBreak((ServerLevel) level, blockposition, ItemStack.EMPTY, false); + craftBlock.getNMS().spawnAfterBreak((ServerLevel) this.level(), blockposition, ItemStack.EMPTY, false); } + // Paper start - TNTPrimeEvent + org.bukkit.block.Block tntBlock = level.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); + if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.EXPLOSION, explosionSource.getIndirectSourceEntity().getBukkitEntity()).callEvent()) + continue; + // Paper end - nmsBlock.wasExploded(level, blockposition, explosionSource); + nmsBlock.wasExploded(this.level(), blockposition, explosionSource); - this.level.removeBlock(blockposition, false); + this.level().removeBlock(blockposition, false); diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 9b3764fb06c186d1f971f6c7468bed4d7159987f..d16bec52ad650670927093efb9943da1dd5eac3f 100644 +index 49df94d8a5d1d4020e7e9f5457f117ebaa581b43..945d8b0f58f6a5b2281f136d3afbba3b34e0e6b5 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -295,12 +295,19 @@ public class FireBlock extends BaseFireBlock { diff --git a/patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0230-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 94% rename from patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/0230-Break-up-and-make-tab-spam-limits-configurable.patch index cc05eb2d65..511eb0b504 100644 --- a/patches/unapplied/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0230-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7f7b897e3633df849b764b7e7f94cc588b55046d..2c3b91cb401880353ca77ce6237214d7068a518e 100644 +index 225274027b6db1138f7d28bff967f26b2544be18..1aec3ec3debe3adfd5fda424761b559614dfdc84 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -265,6 +265,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -41,9 +41,9 @@ index 7f7b897e3633df849b764b7e7f94cc588b55046d..2c3b91cb401880353ca77ce6237214d7 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -789,7 +791,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -797,7 +799,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { - // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async + // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async // CraftBukkit start - if (this.chatSpamTickCount.addAndGet(1) > 500 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { + if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable diff --git a/patches/unapplied/server/0236-Fix-NBT-type-issues.patch b/patches/server/0231-Fix-NBT-type-issues.patch similarity index 82% rename from patches/unapplied/server/0236-Fix-NBT-type-issues.patch rename to patches/server/0231-Fix-NBT-type-issues.patch index eb338da33c..a92fd18c8a 100644 --- a/patches/unapplied/server/0236-Fix-NBT-type-issues.patch +++ b/patches/server/0231-Fix-NBT-type-issues.patch @@ -8,10 +8,10 @@ Addresses two issues: - Allay duplication cooldown is saved and exposed as a long, but loaded as an int diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index c0c0090ab271dba1cc367e216fea3d9f73e5b887..a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8 100644 +index 74e86c76631f779d7edb92de4d2a94c4ccca4afb..600acd102086050d63b1471b30fed0468cecfaf9 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -288,7 +288,7 @@ public class ExperienceOrb extends Entity { +@@ -293,7 +293,7 @@ public class ExperienceOrb extends Entity { public void addAdditionalSaveData(CompoundTag nbt) { nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); @@ -20,7 +20,7 @@ index c0c0090ab271dba1cc367e216fea3d9f73e5b887..a9f20e6a73e2e1875abd1e122a5d08c4 nbt.putInt("Count", this.count); this.savePaperNBT(nbt); // Paper } -@@ -297,7 +297,7 @@ public class ExperienceOrb extends Entity { +@@ -302,7 +302,7 @@ public class ExperienceOrb extends Entity { public void readAdditionalSaveData(CompoundTag nbt) { this.health = nbt.getShort("Health"); this.age = nbt.getShort("Age"); @@ -30,10 +30,10 @@ index c0c0090ab271dba1cc367e216fea3d9f73e5b887..a9f20e6a73e2e1875abd1e122a5d08c4 this.loadPaperNBT(nbt); // Paper } diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index cc8c99e8f260ffe5c2e3f81f928e15efdece6228..9b57d2b766f2de2d3fb4a3b5ef4df8d6756a1942 100644 +index 33a058474cd9d5e089a39e04cf5176eb9df62603..339c70f101d026a100a801e66cf514b3329a89d2 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -516,7 +516,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier { +@@ -514,7 +514,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS }); } diff --git a/patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0232-Remove-unnecessary-itemmeta-handling.patch similarity index 100% rename from patches/unapplied/server/0237-Remove-unnecessary-itemmeta-handling.patch rename to patches/server/0232-Remove-unnecessary-itemmeta-handling.patch diff --git a/patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0233-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 89% rename from patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/0233-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index ca437a8314..bf8817181a 100644 --- a/patches/unapplied/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0233-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information 1.17: Needs to be reworked for new entity storage system diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708638ad835 100644 +index ab01080c3b00a3988f2dd48fd4ecf1488bfcce8b..74fcf9debaebd5c99c2c06dfc5e169261da284de 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -899,6 +899,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1431,6 +1431,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -19,7 +19,7 @@ index 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708 this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -941,7 +942,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1473,7 +1474,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } @@ -29,10 +29,10 @@ index 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708 protected void tick() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a171df8eb33 100644 +index 0612151976fe8bca5bdda27980d7e35e0aea1547..7a1587ef175e075d7748604cf33db7e3d514479f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -217,6 +217,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -221,6 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper @@ -42,7 +42,7 @@ index 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a17 @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); -@@ -1270,7 +1273,28 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1179,7 +1182,28 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -72,7 +72,7 @@ index 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a17 return false; } else { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 8d3712314a1674470bad90895e86bb34d923dcaa..bb926384659194501bfdbed01b1f66d0909a592a 100644 +index 96a4fb8f0fe5e8c3ec8172e5c1f49f16455f3853..b1697cf2501f75620bf82d3b9eb8ca81491baff0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -238,6 +238,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -85,10 +85,10 @@ index 8d3712314a1674470bad90895e86bb34d923dcaa..bb926384659194501bfdbed01b1f66d0 if (this.bukkitEntity == null) { this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 754e1667aadef89bbaccebc0f437197b1331b7f8..e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2 100644 +index 99bc511425cf079303716a5b12c913bc48ce775a..9f64020550a721ae01f9ffbe870b75762bfbd423 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -151,6 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -150,6 +150,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean pvpMode; public boolean keepSpawnInMemory = true; public org.bukkit.generator.ChunkGenerator generator; diff --git a/patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0234-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 90% rename from patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/0234-Add-Early-Warning-Feature-to-WatchDog.patch index eacf13b578..fb9379c5a8 100644 --- a/patches/unapplied/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0234-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 274f3a213e60c9b67dbc43c8b53efb676b8bd41e..387c423dfe69a3310f8e7aa3dbb7faafc9501e50 100644 +index 646d6d3833ab7e40165502f29b0522562d6b8a71..a6d0d3b4f9d69391fb33c4d13388ad573939a36f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1052,6 +1052,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop collidableExemptions = new HashSet<>(); public boolean bukkitPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @@ -81,7 +81,7 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 @Override public float getBukkitYaw() { -@@ -1455,13 +1456,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1504,13 +1505,12 @@ public abstract class LivingEntity extends Entity implements Attackable { if (knockbackCancelled) this.level.broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback if (this.isDeadOrDying()) { if (!this.checkTotemDeathProtection(source)) { @@ -99,7 +99,7 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 } } else if (flag1) { this.playHurtSound(source); -@@ -1613,7 +1613,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1662,7 +1662,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (!this.isRemoved() && !this.dead) { Entity entity = damageSource.getEntity(); LivingEntity entityliving = this.getKillCredit(); @@ -108,8 +108,8 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 if (this.deathScore >= 0 && entityliving != null) { entityliving.awardKillScore(this, this.deathScore, damageSource); } -@@ -1625,20 +1625,53 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (!this.level.isClientSide && this.hasCustomName()) { +@@ -1674,24 +1674,56 @@ public abstract class LivingEntity extends Entity implements Attackable { + if (!this.level().isClientSide && this.hasCustomName()) { if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot } + */ // Paper - move down to make death event cancellable - this is the awardKillScore below @@ -117,8 +117,10 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 this.dead = true; - this.getCombatTracker().recheckStatus(); + // Paper - moved into if below - if (this.level instanceof ServerLevel) { -- if (entity == null || entity.wasKilled((ServerLevel) this.level, this)) { + Level world = this.level(); + + if (world instanceof ServerLevel) { + ServerLevel worldserver = (ServerLevel) world; + // Paper - move below into if for onKill + + // Paper start @@ -139,45 +141,45 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 + if (this.isSleeping()) { + this.stopSleeping(); + } -+ -+ if (!this.level.isClientSide && this.hasCustomName()) { + +- if (entity == null || entity.killedEntity(worldserver, this)) { ++ if (!this.level().isClientSide && this.hasCustomName()) { + if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot + } + + this.getCombatTracker().recheckStatus(); + if (entity != null) { -+ entity.wasKilled((ServerLevel) this.level, this); ++ entity.wasKilled((ServerLevel) this.level(), this); + } this.gameEvent(GameEvent.ENTITY_DIE); - this.dropAllDeathLoot(damageSource); - this.createWitherRose(entityliving); -+ } else { -+ this.dead = false; -+ this.setHealth((float) deathEvent.getReviveHealth()); } -- -- this.level.broadcastEntityEvent(this, (byte) 3); + +- this.level().broadcastEntityEvent(this, (byte) 3); + // Paper end + this.createWitherRose(entityliving); } ++ // Paper start + if (this.dead) { // Paper -+ this.level.broadcastEntityEvent(this, (byte) 3); ++ this.level().broadcastEntityEvent(this, (byte) 3); this.setPose(Pose.DYING); -+ } // Paper ++ } ++ // Paper end } } -@@ -1646,7 +1679,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (!this.level.isClientSide) { +@@ -1699,7 +1731,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + if (!this.level().isClientSide) { boolean flag = false; - if (adversary instanceof WitherBoss) { + if (this.dead && adversary instanceof WitherBoss) { // Paper - if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { + if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { BlockPos blockposition = this.blockPosition(); BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState(); -@@ -1675,7 +1708,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1728,7 +1760,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -190,9 +192,9 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 Entity entity = source.getEntity(); int i; -@@ -1690,18 +1727,27 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1743,18 +1779,27 @@ public abstract class LivingEntity extends Entity implements Attackable { this.dropEquipment(); // CraftBukkit - from below - if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { + if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { this.dropFromLootTable(source, flag); + // Paper start + final boolean prev = this.clearEquipmentSlots; @@ -220,10 +222,10 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2 // CraftBukkit start public int getExpReward() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 984a33d5e1f790a9c78ba57f2dc21fb072a44b3d..dbf442e9686e59723ed0456f97e472cc663f8cc7 100644 +index 8151da761dd2dd561384181576321c71197a84e1..b60714796725ba3dc0a17ff4ca7df8b344e838da 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1065,7 +1065,13 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1068,7 +1068,13 @@ public abstract class Mob extends LivingEntity implements Targeting { } this.spawnAtLocation(itemstack); @@ -238,7 +240,7 @@ index 984a33d5e1f790a9c78ba57f2dc21fb072a44b3d..dbf442e9686e59723ed0456f97e472cc } diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 13061aed29649acfc52d13207aaebcd8ba339ebe..73510697455d891af6858b9a8ad8ca0c9b74880f 100644 +index c2a87255178917a9555ec48ff7e705efef2da7ab..1526ca0063da0962ae781b7aa877d8cf5e1ffd73 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -706,15 +706,25 @@ public class Fox extends Animal implements VariantHolder { @@ -271,7 +273,7 @@ index 13061aed29649acfc52d13207aaebcd8ba339ebe..73510697455d891af6858b9a8ad8ca0c public static boolean isPathClear(Fox fox, LivingEntity chasedEntity) { diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java -index e763421e263d9ed7a67106495fda4b74745a67fc..36f949f6a66edab8373439ff450ad34fff6bae2d 100644 +index ebe207e2c4d8b7e125fec8a5182fe4882c9339e3..8ac82d3efc0f6d8ff40226e4f8084435c136eba4 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java @@ -69,11 +69,19 @@ public abstract class AbstractChestedHorse extends AbstractHorse { @@ -296,10 +298,10 @@ index e763421e263d9ed7a67106495fda4b74745a67fc..36f949f6a66edab8373439ff450ad34f public void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); 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 e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea448c0e3212 100644 +index 719f68f96e58ddcdd3592131c691d21263c81915..4413b609f1250cf9477fcb3fecd7b67afee0b896 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -542,8 +542,9 @@ public class ArmorStand extends LivingEntity { +@@ -536,8 +536,9 @@ public class ArmorStand extends LivingEntity { this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity()); this.lastHit = i; } else { @@ -310,7 +312,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44 this.discard(); // CraftBukkit - SPIGOT-4890: remain as this.discard() since above damagesource method will call death event } -@@ -605,7 +606,7 @@ public class ArmorStand extends LivingEntity { +@@ -599,7 +600,7 @@ public class ArmorStand extends LivingEntity { } @@ -319,7 +321,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44 ItemStack itemstack = new ItemStack(Items.ARMOR_STAND); if (this.hasCustomName()) { -@@ -613,10 +614,10 @@ public class ArmorStand extends LivingEntity { +@@ -607,10 +608,10 @@ public class ArmorStand extends LivingEntity { } drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops @@ -332,7 +334,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44 this.playBrokenSound(); // this.dropAllDeathLoot(damagesource); // CraftBukkit - moved down -@@ -638,7 +639,7 @@ public class ArmorStand extends LivingEntity { +@@ -632,7 +633,7 @@ public class ArmorStand extends LivingEntity { this.armorItems.set(i, ItemStack.EMPTY); } } @@ -341,7 +343,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44 } -@@ -770,7 +771,8 @@ public class ArmorStand extends LivingEntity { +@@ -764,7 +765,8 @@ public class ArmorStand extends LivingEntity { @Override public void kill() { @@ -352,10 +354,10 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44 this.gameEvent(GameEvent.ENTITY_DIE); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 31c75a7b7a947626417421287be0f0e2097acbd9..f3d532ea98264c233cacde042d6af0957ca6f31d 100644 +index e193632f4b795d16a62e074e082a2fd5f10b1330..a33262e0bcc98321cb7acef533973629de5278a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2321,7 +2321,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2252,7 +2252,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -372,7 +374,7 @@ index 31c75a7b7a947626417421287be0f0e2097acbd9..f3d532ea98264c233cacde042d6af095 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index ff1108579b9f8bb867be02a07784c645d0f4d037..f77bb8401f0d4b5acc64c8b707083bc251caf8e5 100644 +index b77fefc9cf30fd438f557e5b56efb4c0251cb17a..17a5d568e9ac367917e40c554aa7354088f66114 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -824,9 +824,16 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 91% rename from patches/unapplied/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch rename to patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch index df898121dc..de907aac39 100644 --- a/patches/unapplied/server/0256-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index a598b6522ce4d41575f04425d189319fa12a7b70..57661672d02b19c864bb267c09b2fa433e716b7b 100644 +index 0db25566c47eb5b7e970dafea0ed186592fea38c..441fbeb3226b698648788de5ad58b94a66499a41 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -372,6 +372,7 @@ public final class ItemStack { +@@ -376,6 +376,7 @@ public final class ItemStack { enuminteractionresult = InteractionResult.FAIL; // cancel placement // PAIL: Remove this when MC-99075 fixed placeEvent.getPlayer().updateInventory();