diff --git a/patches/unapplied/server/Add-PlayerUseUnknownEntityEvent.patch b/patches/server/Add-PlayerUseUnknownEntityEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerUseUnknownEntityEvent.patch rename to patches/server/Add-PlayerUseUnknownEntityEvent.patch diff --git a/patches/unapplied/server/Add-World-Util-Methods.patch b/patches/server/Add-World-Util-Methods.patch similarity index 100% rename from patches/unapplied/server/Add-World-Util-Methods.patch rename to patches/server/Add-World-Util-Methods.patch diff --git a/patches/unapplied/server/Add-ability-to-configure-frosted_ice-properties.patch b/patches/server/Add-ability-to-configure-frosted_ice-properties.patch similarity index 100% rename from patches/unapplied/server/Add-ability-to-configure-frosted_ice-properties.patch rename to patches/server/Add-ability-to-configure-frosted_ice-properties.patch diff --git a/patches/unapplied/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 100% rename from patches/unapplied/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to patches/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch diff --git a/patches/unapplied/server/Allow-Reloading-of-Custom-Permissions.patch b/patches/server/Allow-Reloading-of-Custom-Permissions.patch similarity index 100% rename from patches/unapplied/server/Allow-Reloading-of-Custom-Permissions.patch rename to patches/server/Allow-Reloading-of-Custom-Permissions.patch diff --git a/patches/unapplied/server/Complete-resource-pack-API.patch b/patches/server/Complete-resource-pack-API.patch similarity index 100% rename from patches/unapplied/server/Complete-resource-pack-API.patch rename to patches/server/Complete-resource-pack-API.patch diff --git a/patches/unapplied/server/Configurable-Chunk-Inhabited-Time.patch b/patches/server/Configurable-Chunk-Inhabited-Time.patch similarity index 100% rename from patches/unapplied/server/Configurable-Chunk-Inhabited-Time.patch rename to patches/server/Configurable-Chunk-Inhabited-Time.patch diff --git a/patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/Configurable-Grass-Spread-Tick-Rate.patch similarity index 100% rename from patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch rename to patches/server/Configurable-Grass-Spread-Tick-Rate.patch diff --git a/patches/unapplied/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 58% rename from patches/unapplied/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to patches/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch index c559618d52..c5e06c7e6b 100644 --- a/patches/unapplied/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/patches/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -13,8 +13,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 protected void tickDespawn() { ++this.life; -- if (this.life >= ((this instanceof ThrownTrident) ? level.spigotConfig.tridentDespawnRate : level.spigotConfig.arrowDespawnRate)) { // Spigot -+ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? level.paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? level.paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? level.spigotConfig.tridentDespawnRate : level.spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init? +- if (this.life >= ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot ++ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? this.level().paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? this.level().paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init? this.discard(); } diff --git a/patches/unapplied/server/Configurable-Player-Collision.patch b/patches/server/Configurable-Player-Collision.patch similarity index 100% rename from patches/unapplied/server/Configurable-Player-Collision.patch rename to patches/server/Configurable-Player-Collision.patch diff --git a/patches/unapplied/server/Configurable-RCON-IP-address.patch b/patches/server/Configurable-RCON-IP-address.patch similarity index 100% rename from patches/unapplied/server/Configurable-RCON-IP-address.patch rename to patches/server/Configurable-RCON-IP-address.patch diff --git a/patches/unapplied/server/Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/Configurable-spawn-chances-for-skeleton-horses.patch similarity index 100% rename from patches/unapplied/server/Configurable-spawn-chances-for-skeleton-horses.patch rename to patches/server/Configurable-spawn-chances-for-skeleton-horses.patch diff --git a/patches/unapplied/server/Custom-replacement-for-eaten-items.patch b/patches/server/Custom-replacement-for-eaten-items.patch similarity index 69% rename from patches/unapplied/server/Custom-replacement-for-eaten-items.patch rename to patches/server/Custom-replacement-for-eaten-items.patch index 2a5ea664af..754d70a50e 100644 --- a/patches/unapplied/server/Custom-replacement-for-eaten-items.patch +++ b/patches/server/Custom-replacement-for-eaten-items.patch @@ -18,20 +18,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand); - PlayerItemConsumeEvent event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); + event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); // Paper - level.getCraftServer().getPluginManager().callEvent(event); + this.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { } else { - itemstack = this.useItem.finishUsingItem(this.level, this); + itemstack = this.useItem.finishUsingItem(this.level(), this); } -+ -+ // Paper start - save the default replacement item and change it if necessary -+ final ItemStack defaultReplacement = itemstack; -+ if (event != null && event.getReplacement() != null) { -+ itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); -+ } -+ // Paper end ++ // Paper start - save the default replacement item and change it if necessary ++ final ItemStack defaultReplacement = itemstack; ++ if (event != null && event.getReplacement() != null) { ++ itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); ++ } ++ // Paper end // CraftBukkit end if (itemstack != this.useItem) { @@ -39,11 +38,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } this.stopUsingItem(); -+ // Paper start - if the replacement is anything but the default, update the client inventory -+ if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { -+ ((ServerPlayer) this).getBukkitEntity().updateInventory(); -+ } -+ // Paper end ++ // Paper start - if the replacement is anything but the default, update the client inventory ++ if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { ++ ((ServerPlayer) this).getBukkitEntity().updateInventory(); ++ } ++ // Paper end } } diff --git a/patches/unapplied/server/Default-loading-permissions.yml-before-plugins.patch b/patches/server/Default-loading-permissions.yml-before-plugins.patch similarity index 100% rename from patches/unapplied/server/Default-loading-permissions.yml-before-plugins.patch rename to patches/server/Default-loading-permissions.yml-before-plugins.patch diff --git a/patches/unapplied/server/Do-not-load-chunks-for-Pathfinding.patch b/patches/server/Do-not-load-chunks-for-Pathfinding.patch similarity index 90% rename from patches/unapplied/server/Do-not-load-chunks-for-Pathfinding.patch rename to patches/server/Do-not-load-chunks-for-Pathfinding.patch index c7c95139d8..81d756a44c 100644 --- a/patches/unapplied/server/Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/Do-not-load-chunks-for-Pathfinding.patch @@ -23,8 +23,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return BlockPathTypes.DANGER_OTHER; } @@ -0,0 +0,0 @@ public class WalkNodeEvaluator extends NodeEvaluator { - if (world.getFluidState(pos).is(FluidTags.WATER)) { - return BlockPathTypes.WATER_BORDER; + if (blockState.is(Blocks.WITHER_ROSE) || blockState.is(Blocks.POINTED_DRIPSTONE)) { + return BlockPathTypes.DAMAGE_CAUTIOUS; } + } // Paper } @@ -38,5 +38,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + BlockState blockState = world.getBlockStateIfLoaded(pos); // Paper + if (blockState == null) return BlockPathTypes.BLOCKED; // Paper Block block = blockState.getBlock(); - Material material = blockState.getMaterial(); if (blockState.isAir()) { + return BlockPathTypes.OPEN; diff --git a/patches/unapplied/server/Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/Entity-AddTo-RemoveFrom-World-Events.patch similarity index 100% rename from patches/unapplied/server/Entity-AddTo-RemoveFrom-World-Events.patch rename to patches/server/Entity-AddTo-RemoveFrom-World-Events.patch diff --git a/patches/unapplied/server/EntityPathfindEvent.patch b/patches/server/EntityPathfindEvent.patch similarity index 98% rename from patches/unapplied/server/EntityPathfindEvent.patch rename to patches/server/EntityPathfindEvent.patch index 38706bf0da..9f236330f5 100644 --- a/patches/unapplied/server/EntityPathfindEvent.patch +++ b/patches/server/EntityPathfindEvent.patch @@ -42,12 +42,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class GroundPathNavigation extends PathNavigation { } - if (!this.level.getBlockState(target).getMaterial().isSolid()) { + if (!this.level.getBlockState(target).isSolid()) { - return super.createPath(target, distance); + return super.createPath(target, entity, distance); // Paper } else { BlockPos blockPos2; - for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && this.level.getBlockState(blockPos2).getMaterial().isSolid(); blockPos2 = blockPos2.above()) { + for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && this.level.getBlockState(blockPos2).isSolid(); blockPos2 = blockPos2.above()) { } - return super.createPath(blockPos2, distance); diff --git a/patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/EntityRegainHealthEvent-isFastRegen-API.patch similarity index 96% rename from patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch rename to patches/server/EntityRegainHealthEvent-isFastRegen-API.patch index 46f2785d77..28255c6108 100644 --- a/patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch +++ b/patches/server/EntityRegainHealthEvent-isFastRegen-API.patch @@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason, isFastRegen); // Paper // Suppress during worldgen if (this.valid) { - this.level.getCraftServer().getPluginManager().callEvent(event); + this.level().getCraftServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/food/FoodData.java diff --git a/patches/unapplied/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 100% rename from patches/unapplied/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to patches/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch diff --git a/patches/unapplied/server/Handle-Item-Meta-Inconsistencies.patch b/patches/server/Handle-Item-Meta-Inconsistencies.patch similarity index 100% rename from patches/unapplied/server/Handle-Item-Meta-Inconsistencies.patch rename to patches/server/Handle-Item-Meta-Inconsistencies.patch diff --git a/patches/unapplied/server/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch similarity index 100% rename from patches/unapplied/server/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to patches/server/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch diff --git a/patches/unapplied/server/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 100% rename from patches/unapplied/server/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to patches/server/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch diff --git a/patches/unapplied/server/Optimize-DataBits.patch b/patches/server/Optimize-DataBits.patch similarity index 100% rename from patches/unapplied/server/Optimize-DataBits.patch rename to patches/server/Optimize-DataBits.patch diff --git a/patches/unapplied/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch similarity index 99% rename from patches/unapplied/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch rename to patches/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch index cf327b7ac5..6ab9647327 100644 --- a/patches/unapplied/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -129,9 +129,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -0,0 +0,0 @@ public class LevelChunkSection { + public static final int SECTION_HEIGHT = 16; public static final int SECTION_SIZE = 4096; public static final int BIOME_CONTAINER_BITS = 2; - private final int bottomBlockY; - private short nonEmptyBlockCount; + short nonEmptyBlockCount; // Paper - package-private private short tickingBlockCount; diff --git a/patches/unapplied/server/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 100% rename from patches/unapplied/server/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to patches/server/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch diff --git a/patches/unapplied/server/Remove-Metadata-on-reload.patch b/patches/server/Remove-Metadata-on-reload.patch similarity index 100% rename from patches/unapplied/server/Remove-Metadata-on-reload.patch rename to patches/server/Remove-Metadata-on-reload.patch diff --git a/patches/unapplied/server/Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch similarity index 97% rename from patches/unapplied/server/Sanitise-RegionFileCache-and-make-configurable.patch rename to patches/server/Sanitise-RegionFileCache-and-make-configurable.patch index 5d38773204..6dc02058ac 100644 --- a/patches/unapplied/server/Sanitise-RegionFileCache-and-make-configurable.patch +++ b/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java @@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { - // Paper end + if (regionfile != null) { return regionfile; } else { - if (this.regionCache.size() >= 256) { diff --git a/patches/unapplied/server/Use-a-Shared-Random-for-Entities.patch b/patches/server/Use-a-Shared-Random-for-Entities.patch similarity index 100% rename from patches/unapplied/server/Use-a-Shared-Random-for-Entities.patch rename to patches/server/Use-a-Shared-Random-for-Entities.patch diff --git a/patches/unapplied/server/handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 96% rename from patches/unapplied/server/handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to patches/server/handle-NaN-health-absorb-values-and-repair-bad-data.patch index f54940ccfa..3893921e36 100644 --- a/patches/unapplied/server/handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + this.setAbsorptionAmount(absorptionAmount); + // Paper end - if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) { + if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); } @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/unapplied/server/remove-null-possibility-for-getServer-singleton.patch b/patches/server/remove-null-possibility-for-getServer-singleton.patch similarity index 100% rename from patches/unapplied/server/remove-null-possibility-for-getServer-singleton.patch rename to patches/server/remove-null-possibility-for-getServer-singleton.patch