From dae8787b450f9cdfc2c6c0b507db607c06adca56 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Jun 2023 21:19:26 +0200 Subject: [PATCH] More more more work --- ...to-control-if-armour-stands-can-move.patch | 0 .../server/Add-EntityZapEvent.patch | 0 .../server/Add-ProjectileCollideEvent.patch | 2 +- ...n-option-to-prevent-player-names-fro.patch | 0 ...ke-parrots-stay-on-shoulders-despite.patch | 7 +-- .../server/Add-server-name-parameter.patch | 0 ...setting-for-proxy-online-mode-status.patch | 0 .../Add-source-to-PlayerExpChangeEvent.patch | 0 .../Allow-Reloading-of-Command-Aliases.patch | 0 .../Async-GameProfileCache-saving.patch | 2 +- ...blocking-on-Network-Manager-creation.patch | 0 .../Bound-Treasure-Maps-to-World-Border.patch | 0 .../Cache-user-authenticator-threads.patch | 0 .../server/Cap-Entity-Collisions.patch | 0 ...figurable-Cartographer-Treasure-Maps.patch | 2 +- .../Configurable-flying-kick-messages.patch | 0 ...onfigurable-packet-in-spam-threshold.patch | 0 .../server/Do-not-let-armorstands-drown.patch | 0 ...llow-entities-to-ride-themselves-572.patch | 0 ...e-profiles-that-have-no-UUID-and-no-.patch | 0 ...y-scoreboard-teams-to-scoreboard.dat.patch | 0 .../server/Enforce-Sync-Player-Saves.patch | 0 ...PI-for-Reason-Source-Triggering-play.patch | 61 ++++++++----------- ...r-redstone-torch-rapid-clock-removal.patch | 0 ...-entity-nbt-data-from-falling-blocks.patch | 0 .../server/Firework-API-s.patch | 0 .../server/Item-canEntityPickup.patch | 0 ...-API-Replenishable-Lootables-Feature.patch | 41 ++++++------- ...-sounds-to-same-world-if-limiting-ra.patch | 14 ++--- ...ptimise-BlockState-s-hashCode-equals.patch | 0 ...imize-World.isLoaded-BlockPosition-Z.patch | 0 .../Optional-TNT-doesn-t-move-in-water.patch | 0 .../server/PlayerAttemptPickupItemEvent.patch | 0 ...PlayerPickupItemEvent-setFlyAtPlayer.patch | 2 +- .../PlayerTeleportEndGatewayEvent.patch | 0 ...vent-Pathfinding-out-of-World-Border.patch | 0 .../Properly-fix-item-duplication-bug.patch | 0 ...le-async-calls-to-restart-the-server.patch | 0 ...rovide-E-TE-Chunk-count-stat-methods.patch | 0 ...e-CraftScheduler-Async-Task-Debugger.patch | 0 .../server/String-based-Action-Bar-API.patch | 0 ...tem-property-for-disabling-watchdoge.patch | 2 +- ...oleAppender-for-console-improvements.patch | 0 ...urable-option-to-disable-creeper-lin.patch | 4 +- .../server/Fix-Old-Sign-Conversion.patch | 49 --------------- .../server/Optimize-ItemStack.isEmpty.patch | 20 ------ 46 files changed, 60 insertions(+), 146 deletions(-) rename patches/{unapplied => }/server/Add-API-methods-to-control-if-armour-stands-can-move.patch (100%) rename patches/{unapplied => }/server/Add-EntityZapEvent.patch (100%) rename patches/{unapplied => }/server/Add-ProjectileCollideEvent.patch (96%) rename patches/{unapplied => }/server/Add-configuration-option-to-prevent-player-names-fro.patch (100%) rename patches/{unapplied => }/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch (86%) rename patches/{unapplied => }/server/Add-server-name-parameter.patch (100%) rename patches/{unapplied => }/server/Add-setting-for-proxy-online-mode-status.patch (100%) rename patches/{unapplied => }/server/Add-source-to-PlayerExpChangeEvent.patch (100%) rename patches/{unapplied => }/server/Allow-Reloading-of-Command-Aliases.patch (100%) rename patches/{unapplied => }/server/Async-GameProfileCache-saving.patch (97%) rename patches/{unapplied => }/server/Avoid-blocking-on-Network-Manager-creation.patch (100%) rename patches/{unapplied => }/server/Bound-Treasure-Maps-to-World-Border.patch (100%) rename patches/{unapplied => }/server/Cache-user-authenticator-threads.patch (100%) rename patches/{unapplied => }/server/Cap-Entity-Collisions.patch (100%) rename patches/{unapplied => }/server/Configurable-Cartographer-Treasure-Maps.patch (99%) rename patches/{unapplied => }/server/Configurable-flying-kick-messages.patch (100%) rename patches/{unapplied => }/server/Configurable-packet-in-spam-threshold.patch (100%) rename patches/{unapplied => }/server/Do-not-let-armorstands-drown.patch (100%) rename patches/{unapplied => }/server/Don-t-allow-entities-to-ride-themselves-572.patch (100%) rename patches/{unapplied => }/server/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch (100%) rename patches/{unapplied => }/server/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch (100%) rename patches/{unapplied => }/server/Enforce-Sync-Player-Saves.patch (100%) rename patches/{unapplied => }/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch (81%) rename patches/{unapplied => }/server/Faster-redstone-torch-rapid-clock-removal.patch (100%) rename patches/{unapplied => }/server/Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch (100%) rename patches/{unapplied => }/server/Firework-API-s.patch (100%) rename patches/{unapplied => }/server/Item-canEntityPickup.patch (100%) rename patches/{unapplied => }/server/LootTable-API-Replenishable-Lootables-Feature.patch (95%) rename patches/{unapplied => }/server/Only-send-global-sounds-to-same-world-if-limiting-ra.patch (81%) rename patches/{unapplied => }/server/Optimise-BlockState-s-hashCode-equals.patch (100%) rename patches/{unapplied => }/server/Optimize-World.isLoaded-BlockPosition-Z.patch (100%) rename patches/{unapplied => }/server/Optional-TNT-doesn-t-move-in-water.patch (100%) rename patches/{unapplied => }/server/PlayerAttemptPickupItemEvent.patch (100%) rename patches/{unapplied => }/server/PlayerPickupItemEvent-setFlyAtPlayer.patch (96%) rename patches/{unapplied => }/server/PlayerTeleportEndGatewayEvent.patch (100%) rename patches/{unapplied => }/server/Prevent-Pathfinding-out-of-World-Border.patch (100%) rename patches/{unapplied => }/server/Properly-fix-item-duplication-bug.patch (100%) rename patches/{unapplied => }/server/Properly-handle-async-calls-to-restart-the-server.patch (100%) rename patches/{unapplied => }/server/Provide-E-TE-Chunk-count-stat-methods.patch (100%) rename patches/{unapplied => }/server/Remove-CraftScheduler-Async-Task-Debugger.patch (100%) rename patches/{unapplied => }/server/String-based-Action-Bar-API.patch (100%) rename patches/{unapplied => }/server/System-property-for-disabling-watchdoge.patch (91%) rename patches/{unapplied => }/server/Use-TerminalConsoleAppender-for-console-improvements.patch (100%) rename patches/{unapplied => }/server/provide-a-configurable-option-to-disable-creeper-lin.patch (83%) delete mode 100644 patches/unapplied/server/Fix-Old-Sign-Conversion.patch delete mode 100644 patches/unapplied/server/Optimize-ItemStack.isEmpty.patch diff --git a/patches/unapplied/server/Add-API-methods-to-control-if-armour-stands-can-move.patch b/patches/server/Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 100% rename from patches/unapplied/server/Add-API-methods-to-control-if-armour-stands-can-move.patch rename to patches/server/Add-API-methods-to-control-if-armour-stands-can-move.patch diff --git a/patches/unapplied/server/Add-EntityZapEvent.patch b/patches/server/Add-EntityZapEvent.patch similarity index 100% rename from patches/unapplied/server/Add-EntityZapEvent.patch rename to patches/server/Add-EntityZapEvent.patch diff --git a/patches/unapplied/server/Add-ProjectileCollideEvent.patch b/patches/server/Add-ProjectileCollideEvent.patch similarity index 96% rename from patches/unapplied/server/Add-ProjectileCollideEvent.patch rename to patches/server/Add-ProjectileCollideEvent.patch index 9be38b77a8..fc4a1e2dfe 100644 --- a/patches/unapplied/server/Add-ProjectileCollideEvent.patch +++ b/patches/server/Add-ProjectileCollideEvent.patch @@ -40,6 +40,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), hitEntity, hitBlock, hitFace); + event.setCancelled(cancelled); // Paper - propagate legacy event cancellation to modern event - entity.level.getCraftServer().getPluginManager().callEvent(event); + entity.level().getCraftServer().getPluginManager().callEvent(event); return event; } diff --git a/patches/unapplied/server/Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/Add-configuration-option-to-prevent-player-names-fro.patch similarity index 100% rename from patches/unapplied/server/Add-configuration-option-to-prevent-player-names-fro.patch rename to patches/server/Add-configuration-option-to-prevent-player-names-fro.patch diff --git a/patches/unapplied/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch similarity index 86% rename from patches/unapplied/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch rename to patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 0c04eb8cc6..caed12f626 100644 --- a/patches/unapplied/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -38,9 +38,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity { this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft()); this.playShoulderEntityAmbientSound(this.getShoulderEntityRight()); - if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) { -- this.removeEntitiesOnShoulder(); -+ if (!this.level.paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) this.removeEntitiesOnShoulder(); // Paper - Hang on! + if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) { ++ if (!this.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) // Paper - Hang on! + this.removeEntitiesOnShoulder(); } - } diff --git a/patches/unapplied/server/Add-server-name-parameter.patch b/patches/server/Add-server-name-parameter.patch similarity index 100% rename from patches/unapplied/server/Add-server-name-parameter.patch rename to patches/server/Add-server-name-parameter.patch diff --git a/patches/unapplied/server/Add-setting-for-proxy-online-mode-status.patch b/patches/server/Add-setting-for-proxy-online-mode-status.patch similarity index 100% rename from patches/unapplied/server/Add-setting-for-proxy-online-mode-status.patch rename to patches/server/Add-setting-for-proxy-online-mode-status.patch diff --git a/patches/unapplied/server/Add-source-to-PlayerExpChangeEvent.patch b/patches/server/Add-source-to-PlayerExpChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Add-source-to-PlayerExpChangeEvent.patch rename to patches/server/Add-source-to-PlayerExpChangeEvent.patch diff --git a/patches/unapplied/server/Allow-Reloading-of-Command-Aliases.patch b/patches/server/Allow-Reloading-of-Command-Aliases.patch similarity index 100% rename from patches/unapplied/server/Allow-Reloading-of-Command-Aliases.patch rename to patches/server/Allow-Reloading-of-Command-Aliases.patch diff --git a/patches/unapplied/server/Async-GameProfileCache-saving.patch b/patches/server/Async-GameProfileCache-saving.patch similarity index 97% rename from patches/unapplied/server/Async-GameProfileCache-saving.patch rename to patches/server/Async-GameProfileCache-saving.patch index 6c9a19c7ca..97a7b667a3 100644 --- a/patches/unapplied/server/Async-GameProfileCache-saving.patch +++ b/patches/server/Async-GameProfileCache-saving.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.getProfileCache().save(false); // Paper } // Spigot end - io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system + diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/patches/unapplied/server/Avoid-blocking-on-Network-Manager-creation.patch b/patches/server/Avoid-blocking-on-Network-Manager-creation.patch similarity index 100% rename from patches/unapplied/server/Avoid-blocking-on-Network-Manager-creation.patch rename to patches/server/Avoid-blocking-on-Network-Manager-creation.patch diff --git a/patches/unapplied/server/Bound-Treasure-Maps-to-World-Border.patch b/patches/server/Bound-Treasure-Maps-to-World-Border.patch similarity index 100% rename from patches/unapplied/server/Bound-Treasure-Maps-to-World-Border.patch rename to patches/server/Bound-Treasure-Maps-to-World-Border.patch diff --git a/patches/unapplied/server/Cache-user-authenticator-threads.patch b/patches/server/Cache-user-authenticator-threads.patch similarity index 100% rename from patches/unapplied/server/Cache-user-authenticator-threads.patch rename to patches/server/Cache-user-authenticator-threads.patch diff --git a/patches/unapplied/server/Cap-Entity-Collisions.patch b/patches/server/Cap-Entity-Collisions.patch similarity index 100% rename from patches/unapplied/server/Cap-Entity-Collisions.patch rename to patches/server/Cap-Entity-Collisions.patch diff --git a/patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch b/patches/server/Configurable-Cartographer-Treasure-Maps.patch similarity index 99% rename from patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch rename to patches/server/Configurable-Cartographer-Treasure-Maps.patch index a16de874ce..d086e46733 100644 --- a/patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch +++ b/patches/server/Configurable-Cartographer-Treasure-Maps.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class VillagerTrades { return null; } else { - ServerLevel serverLevel = (ServerLevel)entity.level; + ServerLevel serverLevel = (ServerLevel)entity.level(); - BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, entity.blockPosition(), 100, true); + if (!serverLevel.paperConfig().environment.treasureMaps.enabled) return null; // Paper + BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, entity.blockPosition(), 100, !serverLevel.paperConfig().environment.treasureMaps.findAlreadyDiscoveredVillager); // Paper diff --git a/patches/unapplied/server/Configurable-flying-kick-messages.patch b/patches/server/Configurable-flying-kick-messages.patch similarity index 100% rename from patches/unapplied/server/Configurable-flying-kick-messages.patch rename to patches/server/Configurable-flying-kick-messages.patch diff --git a/patches/unapplied/server/Configurable-packet-in-spam-threshold.patch b/patches/server/Configurable-packet-in-spam-threshold.patch similarity index 100% rename from patches/unapplied/server/Configurable-packet-in-spam-threshold.patch rename to patches/server/Configurable-packet-in-spam-threshold.patch diff --git a/patches/unapplied/server/Do-not-let-armorstands-drown.patch b/patches/server/Do-not-let-armorstands-drown.patch similarity index 100% rename from patches/unapplied/server/Do-not-let-armorstands-drown.patch rename to patches/server/Do-not-let-armorstands-drown.patch diff --git a/patches/unapplied/server/Don-t-allow-entities-to-ride-themselves-572.patch b/patches/server/Don-t-allow-entities-to-ride-themselves-572.patch similarity index 100% rename from patches/unapplied/server/Don-t-allow-entities-to-ride-themselves-572.patch rename to patches/server/Don-t-allow-entities-to-ride-themselves-572.patch diff --git a/patches/unapplied/server/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/patches/server/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch similarity index 100% rename from patches/unapplied/server/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch rename to patches/server/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch diff --git a/patches/unapplied/server/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/patches/server/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch similarity index 100% rename from patches/unapplied/server/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch rename to patches/server/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch diff --git a/patches/unapplied/server/Enforce-Sync-Player-Saves.patch b/patches/server/Enforce-Sync-Player-Saves.patch similarity index 100% rename from patches/unapplied/server/Enforce-Sync-Player-Saves.patch rename to patches/server/Enforce-Sync-Player-Saves.patch diff --git a/patches/unapplied/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 81% rename from patches/unapplied/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 0c3033c257..f816de736c 100644 --- a/patches/unapplied/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -138,9 +138,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 protected void dropExperience() { // CraftBukkit start - Update getExpReward() above if the removed if() changes! if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time -- ExperienceOrb.award((ServerLevel) this.level, this.position(), this.expToDrop); +- ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop); + LivingEntity attacker = this.lastHurtByPlayer != null ? this.lastHurtByPlayer : this.lastHurtByMob; // Paper -+ ExperienceOrb.award((ServerLevel) this.level, this.position(), this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this); // Paper ++ ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this); // Paper this.expToDrop = 0; } // CraftBukkit end @@ -149,14 +149,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/animal/Animal.java +++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java @@ -0,0 +0,0 @@ public abstract class Animal extends AgeableMob { - if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { - // CraftBukkit start - use event experience - if (experience > 0) { -- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience)); -+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper - } - // CraftBukkit end + if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { + // CraftBukkit start - use event experience + if (experience > 0) { +- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience)); ++ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, null)); // Paper //TODO trigger } + // CraftBukkit end + } 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -183,38 +183,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } -diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -@@ -0,0 +0,0 @@ public class Frog extends Animal implements VariantHolder { - this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE); - world.broadcastEntityEvent(this, (byte)18); - if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { -- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1)); -+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper - } - - } 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 @@ -0,0 +0,0 @@ public class EnderDragon extends Mob implements Enemy { - if (this.level instanceof ServerLevel) { + if (this.level() instanceof ServerLevel) { if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp -- ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.08F)); -+ ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.08F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper +- ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.08F)); ++ ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.08F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper } if (this.dragonDeathTime == 1 && !this.isSilent()) { @@ -0,0 +0,0 @@ public class EnderDragon extends Mob implements Enemy { this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D)); - if (this.dragonDeathTime == 200 && this.level instanceof ServerLevel) { + if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) { if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp -- ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.2F)); -+ ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.2F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper +- ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.2F)); ++ ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.2F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper } if (this.dragonFight != null) { @@ -226,8 +213,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } if (offer.shouldRewardExp()) { -- this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i)); -+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper +- this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i)); ++ this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper } } @@ -239,8 +226,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (offer.shouldRewardExp()) { int i = 3 + this.random.nextInt(4); -- this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i)); -+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper +- this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i)); ++ this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper } } @@ -249,11 +236,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -0,0 +0,0 @@ public class FishingHook extends Projectile { - this.level.addFreshEntity(entityitem); + this.level().addFreshEntity(entityitem); // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop() if (playerFishEvent.getExpToDrop() > 0) { -- entityhuman.level.addFreshEntity(new ExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop())); -+ entityhuman.level.addFreshEntity(new ExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.getPlayerOwner(), this)); // Paper +- entityhuman.level().addFreshEntity(new ExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop())); ++ entityhuman.level().addFreshEntity(new ExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.getPlayerOwner(), this)); // Paper } // CraftBukkit end if (itemstack1.is(ItemTags.FISHES)) { @@ -265,8 +252,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } // CraftBukkit end -- ExperienceOrb.award((ServerLevel) this.level, this.position(), i); -+ ExperienceOrb.award((ServerLevel) this.level, this.position(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, this.getOwner(), this); // Paper +- ExperienceOrb.award((ServerLevel) this.level(), this.position(), i); ++ ExperienceOrb.award((ServerLevel) this.level(), this.position(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, this.getOwner(), this); // Paper this.discard(); } diff --git a/patches/unapplied/server/Faster-redstone-torch-rapid-clock-removal.patch b/patches/server/Faster-redstone-torch-rapid-clock-removal.patch similarity index 100% rename from patches/unapplied/server/Faster-redstone-torch-rapid-clock-removal.patch rename to patches/server/Faster-redstone-torch-rapid-clock-removal.patch diff --git a/patches/unapplied/server/Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch b/patches/server/Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch similarity index 100% rename from patches/unapplied/server/Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch rename to patches/server/Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch diff --git a/patches/unapplied/server/Firework-API-s.patch b/patches/server/Firework-API-s.patch similarity index 100% rename from patches/unapplied/server/Firework-API-s.patch rename to patches/server/Firework-API-s.patch diff --git a/patches/unapplied/server/Item-canEntityPickup.patch b/patches/server/Item-canEntityPickup.patch similarity index 100% rename from patches/unapplied/server/Item-canEntityPickup.patch rename to patches/server/Item-canEntityPickup.patch diff --git a/patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch similarity index 95% rename from patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch rename to patches/server/LootTable-API-Replenishable-Lootables-Feature.patch index 6e7863e254..08b467f4df 100644 --- a/patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch @@ -561,7 +561,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @@ -0,0 +0,0 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain - this.level.gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player)); + this.level().gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player)); } + // Paper start @@ -606,19 +606,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public interface ContainerEntity extends Container, MenuProvider { default void unpackChestVehicleLootTable(@Nullable Player player) { - MinecraftServer minecraftServer = this.getLevel().getServer(); + MinecraftServer minecraftServer = this.level().getServer(); - if (this.getLootTable() != null && minecraftServer != null) { + if (this.getLootableData().shouldReplenish(player) && minecraftServer != null) { // Paper - LootTable lootTable = minecraftServer.getLootTables().get(this.getLootTable()); + LootTable lootTable = minecraftServer.getLootData().getLootTable(this.getLootTable()); if (player != null) { CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.getLootTable()); } - this.setLootTable((ResourceLocation)null); -+ // this.setLootTable((ResourceLocation)null); // Paper + this.getLootableData().processRefill(player); // Paper -+ - LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.getLevel())).withParameter(LootContextParams.ORIGIN, this.position()).withOptionalRandomSeed(this.getLootTableSeed()); + LootParams.Builder builder = (new LootParams.Builder((ServerLevel)this.level())).withParameter(LootContextParams.ORIGIN, this.position()); if (player != null) { builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); @@ -0,0 +0,0 @@ public interface ContainerEntity extends Container, MenuProvider { @@ -680,17 +678,29 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void unpackLootTable(@Nullable Player player) { - if (this.lootTable != null && this.level.getServer() != null) { + if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper - LootTable lootTable = this.level.getServer().getLootTables().get(this.lootTable); + LootTable lootTable = this.level.getServer().getLootData().getLootTable(this.lootTable); if (player instanceof ServerPlayer) { CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.lootTable); } - this.lootTable = null; -+ //this.lootTable = null; // Paper + this.lootableData.processRefill(player); // Paper - LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)).withOptionalRandomSeed(this.lootTableSeed); + LootParams.Builder builder = (new LootParams.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)); if (player != null) { builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java +@@ -0,0 +0,0 @@ public class CraftBrushableBlock extends CraftBlockEntityState 0 ? ((ServerLevel) level).players() : level.getServer().getPlayerList().players) { // Paper + // this.level().globalLevelEvent(1028, this.blockPosition(), 0); + int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16; +- for (net.minecraft.server.level.ServerPlayer player : this.level().getServer().getPlayerList().players) { ++ for (net.minecraft.server.level.ServerPlayer player : this.level().spigotConfig.dragonDeathSoundRadius > 0 ? ((ServerLevel) this.level()).players() : this.level().getServer().getPlayerList().players) { // Paper double deltaX = this.getX() - player.getX(); double deltaZ = this.getZ() - player.getZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; @@ -25,10 +25,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java @@ -0,0 +0,0 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob // CraftBukkit start - Use relative location for far away sounds - // this.world.globalLevelEvent(1023, new BlockPosition(this), 0); - int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; + // this.level().globalLevelEvent(1023, new BlockPosition(this), 0); + int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16; - for (ServerPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { -+ for (ServerPlayer player : level.spigotConfig.witherSpawnSoundRadius > 0 ? ((ServerLevel) level).players() : level.getServer().getPlayerList().players) { // Paper ++ for (ServerPlayer player : this.level().spigotConfig.witherSpawnSoundRadius > 0 ? ((ServerLevel) this.level()).players() : this.level().getServer().getPlayerList().players) { // Paper double deltaX = this.getX() - player.getX(); double deltaZ = this.getZ() - player.getZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch b/patches/server/Optimise-BlockState-s-hashCode-equals.patch similarity index 100% rename from patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch rename to patches/server/Optimise-BlockState-s-hashCode-equals.patch diff --git a/patches/unapplied/server/Optimize-World.isLoaded-BlockPosition-Z.patch b/patches/server/Optimize-World.isLoaded-BlockPosition-Z.patch similarity index 100% rename from patches/unapplied/server/Optimize-World.isLoaded-BlockPosition-Z.patch rename to patches/server/Optimize-World.isLoaded-BlockPosition-Z.patch diff --git a/patches/unapplied/server/Optional-TNT-doesn-t-move-in-water.patch b/patches/server/Optional-TNT-doesn-t-move-in-water.patch similarity index 100% rename from patches/unapplied/server/Optional-TNT-doesn-t-move-in-water.patch rename to patches/server/Optional-TNT-doesn-t-move-in-water.patch diff --git a/patches/unapplied/server/PlayerAttemptPickupItemEvent.patch b/patches/server/PlayerAttemptPickupItemEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerAttemptPickupItemEvent.patch rename to patches/server/PlayerAttemptPickupItemEvent.patch diff --git a/patches/unapplied/server/PlayerPickupItemEvent-setFlyAtPlayer.patch b/patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 96% rename from patches/unapplied/server/PlayerPickupItemEvent-setFlyAtPlayer.patch rename to patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch index 4fdcc7ce04..046fb6bae4 100644 --- a/patches/unapplied/server/PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ItemEntity extends Entity implements TraceableEntity { PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); - this.level.getCraftServer().getPluginManager().callEvent(playerEvent); + this.level().getCraftServer().getPluginManager().callEvent(playerEvent); + flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper if (playerEvent.isCancelled()) { itemstack.setCount(i); // SPIGOT-5294 - restore count diff --git a/patches/unapplied/server/PlayerTeleportEndGatewayEvent.patch b/patches/server/PlayerTeleportEndGatewayEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerTeleportEndGatewayEvent.patch rename to patches/server/PlayerTeleportEndGatewayEvent.patch diff --git a/patches/unapplied/server/Prevent-Pathfinding-out-of-World-Border.patch b/patches/server/Prevent-Pathfinding-out-of-World-Border.patch similarity index 100% rename from patches/unapplied/server/Prevent-Pathfinding-out-of-World-Border.patch rename to patches/server/Prevent-Pathfinding-out-of-World-Border.patch diff --git a/patches/unapplied/server/Properly-fix-item-duplication-bug.patch b/patches/server/Properly-fix-item-duplication-bug.patch similarity index 100% rename from patches/unapplied/server/Properly-fix-item-duplication-bug.patch rename to patches/server/Properly-fix-item-duplication-bug.patch diff --git a/patches/unapplied/server/Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/Properly-handle-async-calls-to-restart-the-server.patch similarity index 100% rename from patches/unapplied/server/Properly-handle-async-calls-to-restart-the-server.patch rename to patches/server/Properly-handle-async-calls-to-restart-the-server.patch diff --git a/patches/unapplied/server/Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/Provide-E-TE-Chunk-count-stat-methods.patch similarity index 100% rename from patches/unapplied/server/Provide-E-TE-Chunk-count-stat-methods.patch rename to patches/server/Provide-E-TE-Chunk-count-stat-methods.patch diff --git a/patches/unapplied/server/Remove-CraftScheduler-Async-Task-Debugger.patch b/patches/server/Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 100% rename from patches/unapplied/server/Remove-CraftScheduler-Async-Task-Debugger.patch rename to patches/server/Remove-CraftScheduler-Async-Task-Debugger.patch diff --git a/patches/unapplied/server/String-based-Action-Bar-API.patch b/patches/server/String-based-Action-Bar-API.patch similarity index 100% rename from patches/unapplied/server/String-based-Action-Bar-API.patch rename to patches/server/String-based-Action-Bar-API.patch diff --git a/patches/unapplied/server/System-property-for-disabling-watchdoge.patch b/patches/server/System-property-for-disabling-watchdoge.patch similarity index 91% rename from patches/unapplied/server/System-property-for-disabling-watchdoge.patch rename to patches/server/System-property-for-disabling-watchdoge.patch index 8b145e16e3..c5213c8c5a 100644 --- a/patches/unapplied/server/System-property-for-disabling-watchdoge.patch +++ b/patches/server/System-property-for-disabling-watchdoge.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -0,0 +0,0 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -0,0 +0,0 @@ public class WatchdogThread extends Thread while ( !this.stopping ) { // diff --git a/patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 100% rename from patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch rename to patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch diff --git a/patches/unapplied/server/provide-a-configurable-option-to-disable-creeper-lin.patch b/patches/server/provide-a-configurable-option-to-disable-creeper-lin.patch similarity index 83% rename from patches/unapplied/server/provide-a-configurable-option-to-disable-creeper-lin.patch rename to patches/server/provide-a-configurable-option-to-disable-creeper-lin.patch index 92e5942c61..6c00b79745 100644 --- a/patches/unapplied/server/provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/patches/server/provide-a-configurable-option-to-disable-creeper-lin.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Collection collection = this.getActiveEffects(); - if (!collection.isEmpty()) { -+ if (!collection.isEmpty() && !level.paperConfig().entities.behavior.disableCreeperLingeringEffect) { // Paper - AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level, this.getX(), this.getY(), this.getZ()); ++ if (!collection.isEmpty() && !this.level().paperConfig().entities.behavior.disableCreeperLingeringEffect) { // Paper + AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ()); entityareaeffectcloud.setOwner(this); // CraftBukkit diff --git a/patches/unapplied/server/Fix-Old-Sign-Conversion.patch b/patches/unapplied/server/Fix-Old-Sign-Conversion.patch deleted file mode 100644 index 2e3eef34d9..0000000000 --- a/patches/unapplied/server/Fix-Old-Sign-Conversion.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 17 Jun 2016 20:50:11 -0400 -Subject: [PATCH] Fix Old Sign Conversion - -1) Sign loading code was trying to parse the JSON before the check for oldSign. - That code could then skip the old sign converting code if it triggers a JSON parse exception. -2) New Mojang Schematic system has Tile Entities in the new converted format, but missing the Bukkit.isConverted flag - This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -0,0 +0,0 @@ public abstract class BlockEntity { - private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); - public CraftPersistentDataContainer persistentDataContainer; - // CraftBukkit end -+ public boolean isLoadingStructure = false; // Paper - private static final Logger LOGGER = LogUtils.getLogger(); - private final BlockEntityType type; - @Nullable -diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C - s = "\"\""; - } - -- if (oldSign) { -+ if (oldSign && !this.isLoadingStructure) { // Paper - saved structures will be in the new format, but will not have isConverted - this.messages[i] = org.bukkit.craftbukkit.util.CraftChatMessage.fromString(s)[0]; - continue; - } -diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -0,0 +0,0 @@ public class StructureTemplate { - definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong()); - } - -+ tileentity.isLoadingStructure = true; // Paper - tileentity.load(definedstructure_blockinfo.nbt); -+ tileentity.isLoadingStructure = false; // Paper - } - } - diff --git a/patches/unapplied/server/Optimize-ItemStack.isEmpty.patch b/patches/unapplied/server/Optimize-ItemStack.isEmpty.patch deleted file mode 100644 index 0c2c0e2f49..0000000000 --- a/patches/unapplied/server/Optimize-ItemStack.isEmpty.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Wed, 21 Dec 2016 03:48:29 -0500 -Subject: [PATCH] Optimize ItemStack.isEmpty() - -Remove hashMap lookup every check, simplify code to remove ternary - -diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/item/ItemStack.java -+++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -0,0 +0,0 @@ public final class ItemStack { - } - - public boolean isEmpty() { -- return this == ItemStack.EMPTY ? true : (this.getItem() != null && !this.is(Items.AIR) ? this.count <= 0 : true); -+ return this == ItemStack.EMPTY || this.item == null || this.item == Items.AIR || this.count <= 0; // Paper - } - - public boolean isItemEnabled(FeatureFlagSet enabledFeatures) {