From 67e715ab1e8c65b8d0b1685c6e9d7d08a497111f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Tue, 7 Jun 2022 23:45:11 +0200 Subject: [PATCH] More more more more more patches --- ...t-Tile-Entities-from-a-chunk-without-sn.patch | 0 ...CraftMagicNumbers.isSupportedApiVersion.patch | 0 ...tities-option-to-debug-dupe-uuid-issues.patch | 0 .../Add-Early-Warning-Feature-to-WatchDog.patch | 6 +++--- .../server/Add-More-Creeper-API.patch | 0 .../server/Add-PhantomPreSpawnEvent.patch | 6 +++--- .../server/Add-TNTPrimeEvent.patch | 8 +++----- ...ig-to-disable-ender-dragon-legacy-check.patch | 0 .../server/Add-hand-to-bucket-events.patch | 0 .../Allow-disabling-armour-stand-ticking.patch | 2 +- ...ng-Item-entities-with-World.spawnEntity.patch | 4 ++-- .../server/AnvilDamageEvent.patch | 0 ...erge-if-stack-size-above-max-stack-size.patch | 0 ...p-and-make-tab-spam-limits-configurable.patch | 2 +- ...rable-Alternative-LootPool-Luck-Formula.patch | 0 ...rable-speed-for-water-flowing-over-lava.patch | 2 +- .../Don-t-call-getItemMeta-on-hasItemMeta.patch | 0 .../server/EnderDragon-Events.patch | 0 .../server/Expand-Explosions-API.patch | 0 .../server/Fix-CraftEntity-hashCode.patch | 0 ...-client-rendering-skulls-from-same-user.patch | 2 +- .../Implement-EntityKnockbackByEntityEvent.patch | 16 ++++++++-------- ...Implement-EntityTeleportEndGatewayEvent.patch | 0 .../Implement-Expanded-ArmorStand-API.patch | 0 .../Implement-World.getEntity-UUID-API.patch | 0 .../server/Improve-BlockPosition-inlining.patch | 0 .../server/Improve-EntityShootBowEvent.patch | 0 .../server/Inventory-removeItemAnySlot.patch | 0 .../server/InventoryCloseEvent-Reason-API.patch | 0 .../server/ItemStack-getMaxItemUseDuration.patch | 0 .../LivingEntity-Hand-Raised-Item-Use-API.patch | 0 ...5506-Experience-should-save-as-Integers.patch | 0 ...ld-loadChunk-int-int-false-load-unconve.patch | 0 ...Make-shield-blocking-delay-configurable.patch | 0 .../Optimize-BlockPosition-helper-methods.patch | 0 .../Optimize-CraftBlockData-Creation.patch | 2 +- .../server/Optimize-MappedRegistry.patch | 0 ...vent-armor-stands-from-doing-entity-loo.patch | 0 .../server/PlayerElytraBoostEvent.patch | 0 .../server/PlayerLaunchProjectileEvent.patch | 6 +++--- .../server/PlayerReadyArrowEvent.patch | 0 ...etails-when-failing-to-save-player-data.patch | 0 .../server/RangedEntity-API.patch | 0 ...r-inventory-when-cancelling-PlayerInter.patch | 0 ...la-default-mob-spawn-range-and-water-an.patch | 0 .../server/SkeletonHorse-Additions.patch | 0 .../server/Slime-Pathfinder-Events.patch | 4 ++-- ...nited-flag-on-cancel-of-Explosion-Event.patch | 0 ...nder-to-keep-logging-IO-off-main-thread.patch | 4 ++-- .../Use-ConcurrentHashMap-in-JsonList.patch | 8 ++++---- .../Use-a-Queue-for-Queueing-Commands.patch | 2 +- .../Vanished-players-don-t-have-rights.patch | 0 .../server/Vex-get-setSummoner-API.patch | 0 .../server/WitchReadyPotionEvent.patch | 0 .../server/WitchThrowPotionEvent.patch | 0 ...add-more-information-to-Entity.toString.patch | 0 56 files changed, 36 insertions(+), 38 deletions(-) rename patches/{unapplied => }/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch (100%) rename patches/{unapplied => }/server/Add-CraftMagicNumbers.isSupportedApiVersion.patch (100%) rename patches/{unapplied => }/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch (100%) rename patches/{unapplied => }/server/Add-Early-Warning-Feature-to-WatchDog.patch (98%) rename patches/{unapplied => }/server/Add-More-Creeper-API.patch (100%) rename patches/{unapplied => }/server/Add-PhantomPreSpawnEvent.patch (95%) rename patches/{unapplied => }/server/Add-TNTPrimeEvent.patch (96%) rename patches/{unapplied => }/server/Add-config-to-disable-ender-dragon-legacy-check.patch (100%) rename patches/{unapplied => }/server/Add-hand-to-bucket-events.patch (100%) rename patches/{unapplied => }/server/Allow-disabling-armour-stand-ticking.patch (97%) rename patches/{unapplied => }/server/Allow-spawning-Item-entities-with-World.spawnEntity.patch (91%) rename patches/{unapplied => }/server/AnvilDamageEvent.patch (100%) rename patches/{unapplied => }/server/Avoid-item-merge-if-stack-size-above-max-stack-size.patch (100%) rename patches/{unapplied => }/server/Break-up-and-make-tab-spam-limits-configurable.patch (97%) rename patches/{unapplied => }/server/Configurable-Alternative-LootPool-Luck-Formula.patch (100%) rename patches/{unapplied => }/server/Configurable-speed-for-water-flowing-over-lava.patch (98%) rename patches/{unapplied => }/server/Don-t-call-getItemMeta-on-hasItemMeta.patch (100%) rename patches/{unapplied => }/server/EnderDragon-Events.patch (100%) rename patches/{unapplied => }/server/Expand-Explosions-API.patch (100%) rename patches/{unapplied => }/server/Fix-CraftEntity-hashCode.patch (100%) rename patches/{unapplied => }/server/Fix-client-rendering-skulls-from-same-user.patch (99%) rename patches/{unapplied => }/server/Implement-EntityKnockbackByEntityEvent.patch (91%) rename patches/{unapplied => }/server/Implement-EntityTeleportEndGatewayEvent.patch (100%) rename patches/{unapplied => }/server/Implement-Expanded-ArmorStand-API.patch (100%) rename patches/{unapplied => }/server/Implement-World.getEntity-UUID-API.patch (100%) rename patches/{unapplied => }/server/Improve-BlockPosition-inlining.patch (100%) rename patches/{unapplied => }/server/Improve-EntityShootBowEvent.patch (100%) rename patches/{unapplied => }/server/Inventory-removeItemAnySlot.patch (100%) rename patches/{unapplied => }/server/InventoryCloseEvent-Reason-API.patch (100%) rename patches/{unapplied => }/server/ItemStack-getMaxItemUseDuration.patch (100%) rename patches/{unapplied => }/server/LivingEntity-Hand-Raised-Item-Use-API.patch (100%) rename patches/{unapplied => }/server/MC-135506-Experience-should-save-as-Integers.patch (100%) rename patches/{unapplied => }/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch (100%) rename patches/{unapplied => }/server/Make-shield-blocking-delay-configurable.patch (100%) rename patches/{unapplied => }/server/Optimize-BlockPosition-helper-methods.patch (100%) rename patches/{unapplied => }/server/Optimize-CraftBlockData-Creation.patch (96%) rename patches/{unapplied => }/server/Optimize-MappedRegistry.patch (100%) rename patches/{unapplied => }/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch (100%) rename patches/{unapplied => }/server/PlayerElytraBoostEvent.patch (100%) rename patches/{unapplied => }/server/PlayerLaunchProjectileEvent.patch (99%) rename patches/{unapplied => }/server/PlayerReadyArrowEvent.patch (100%) rename patches/{unapplied => }/server/Print-Error-details-when-failing-to-save-player-data.patch (100%) rename patches/{unapplied => }/server/RangedEntity-API.patch (100%) rename patches/{unapplied => }/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch (100%) rename patches/{unapplied => }/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch (100%) rename patches/{unapplied => }/server/SkeletonHorse-Additions.patch (100%) rename patches/{unapplied => }/server/Slime-Pathfinder-Events.patch (98%) rename patches/{unapplied => }/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch (100%) rename patches/{unapplied => }/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch (92%) rename patches/{unapplied => }/server/Use-ConcurrentHashMap-in-JsonList.patch (92%) rename patches/{unapplied => }/server/Use-a-Queue-for-Queueing-Commands.patch (96%) rename patches/{unapplied => }/server/Vanished-players-don-t-have-rights.patch (100%) rename patches/{unapplied => }/server/Vex-get-setSummoner-API.patch (100%) rename patches/{unapplied => }/server/WitchReadyPotionEvent.patch (100%) rename patches/{unapplied => }/server/WitchThrowPotionEvent.patch (100%) rename patches/{unapplied => }/server/add-more-information-to-Entity.toString.patch (100%) diff --git a/patches/unapplied/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from patches/unapplied/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to patches/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/patches/unapplied/server/Add-CraftMagicNumbers.isSupportedApiVersion.patch b/patches/server/Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from patches/unapplied/server/Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to patches/server/Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/patches/unapplied/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 100% rename from patches/unapplied/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch diff --git a/patches/unapplied/server/Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/Add-Early-Warning-Feature-to-WatchDog.patch similarity index 98% rename from patches/unapplied/server/Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/Add-Early-Warning-Feature-to-WatchDog.patch index 384813dfb..07359592d 100644 --- a/patches/unapplied/server/Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/Add-Early-Warning-Feature-to-WatchDog.patch @@ -40,11 +40,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 500 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { + if (this.chatSpamTickCount.addAndGet(com.destroystokyo.paper.PaperConfig.tabSpamIncrement) > com.destroystokyo.paper.PaperConfig.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable - server.scheduleOnMain(() -> this.disconnect(new TranslatableComponent("disconnect.spam", new Object[0]))); // Paper + server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper return; } diff --git a/patches/unapplied/server/Configurable-Alternative-LootPool-Luck-Formula.patch b/patches/server/Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from patches/unapplied/server/Configurable-Alternative-LootPool-Luck-Formula.patch rename to patches/server/Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/patches/unapplied/server/Configurable-speed-for-water-flowing-over-lava.patch b/patches/server/Configurable-speed-for-water-flowing-over-lava.patch similarity index 98% rename from patches/unapplied/server/Configurable-speed-for-water-flowing-over-lava.patch rename to patches/server/Configurable-speed-for-water-flowing-over-lava.patch index 7a06e9d1e..375572a65 100644 --- a/patches/unapplied/server/Configurable-speed-for-water-flowing-over-lava.patch +++ b/patches/server/Configurable-speed-for-water-flowing-over-lava.patch @@ -62,7 +62,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (state.getFluidState().isSource() || neighborState.getFluidState().isSource()) { @@ -0,0 +0,0 @@ public class LiquidBlock extends Block implements BucketPickup { @Override - public void neighborChanged(BlockState state, Level world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) { + public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (this.shouldSpreadLiquid(world, pos, state)) { - world.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(world)); + world.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(world, pos)); // Paper diff --git a/patches/unapplied/server/Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 100% rename from patches/unapplied/server/Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/Don-t-call-getItemMeta-on-hasItemMeta.patch diff --git a/patches/unapplied/server/EnderDragon-Events.patch b/patches/server/EnderDragon-Events.patch similarity index 100% rename from patches/unapplied/server/EnderDragon-Events.patch rename to patches/server/EnderDragon-Events.patch diff --git a/patches/unapplied/server/Expand-Explosions-API.patch b/patches/server/Expand-Explosions-API.patch similarity index 100% rename from patches/unapplied/server/Expand-Explosions-API.patch rename to patches/server/Expand-Explosions-API.patch diff --git a/patches/unapplied/server/Fix-CraftEntity-hashCode.patch b/patches/server/Fix-CraftEntity-hashCode.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftEntity-hashCode.patch rename to patches/server/Fix-CraftEntity-hashCode.patch diff --git a/patches/unapplied/server/Fix-client-rendering-skulls-from-same-user.patch b/patches/server/Fix-client-rendering-skulls-from-same-user.patch similarity index 99% rename from patches/unapplied/server/Fix-client-rendering-skulls-from-same-user.patch rename to patches/server/Fix-client-rendering-skulls-from-same-user.patch index bd2be3a31..d03ce26e2 100644 --- a/patches/unapplied/server/Fix-client-rendering-skulls-from-same-user.patch +++ b/patches/server/Fix-client-rendering-skulls-from-same-user.patch @@ -76,7 +76,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import net.minecraft.nbt.ListTag; import net.minecraft.nbt.NbtUtils; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; - import net.minecraft.server.players.GameProfileCache; + import net.minecraft.server.Services; @@ -0,0 +0,0 @@ public class SkullBlockEntity extends BlockEntity { @Override diff --git a/patches/unapplied/server/Implement-EntityKnockbackByEntityEvent.patch b/patches/server/Implement-EntityKnockbackByEntityEvent.patch similarity index 91% rename from patches/unapplied/server/Implement-EntityKnockbackByEntityEvent.patch rename to patches/server/Implement-EntityKnockbackByEntityEvent.patch index e724df28d..76ca47910 100644 --- a/patches/unapplied/server/Implement-EntityKnockbackByEntityEvent.patch +++ b/patches/server/Implement-EntityKnockbackByEntityEvent.patch @@ -72,15 +72,15 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java -@@ -0,0 +0,0 @@ public class RamTarget extends Behavior { +@@ -0,0 +0,0 @@ public class RamTarget extends Behavior { float f = 0.25F * (float)(i - j); - float g = Mth.clamp(pathfinderMob.getSpeed() * 1.65F, 0.2F, 3.0F) + f; - float h = livingEntity.isDamageSourceBlocked(DamageSource.mobAttack(pathfinderMob)) ? 0.5F : 1.0F; -- livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(pathfinderMob), this.ramDirection.x(), this.ramDirection.z()); -+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(pathfinderMob), this.ramDirection.x(), this.ramDirection.z(), pathfinderMob); // Paper - this.finishRam(serverLevel, pathfinderMob); - serverLevel.playSound((Player)null, pathfinderMob, this.getImpactSound.apply(pathfinderMob), SoundSource.HOSTILE, 1.0F, 1.0F); - } else { + float g = Mth.clamp(goat.getSpeed() * 1.65F, 0.2F, 3.0F) + f; + float h = livingEntity.isDamageSourceBlocked(DamageSource.mobAttack(goat)) ? 0.5F : 1.0F; +- livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z()); ++ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z(), pathfinderMob); // Paper + this.finishRam(serverLevel, goat); + serverLevel.playSound((Player)null, goat, this.getImpactSound.apply(goat), SoundSource.HOSTILE, 1.0F, 1.0F); + } else if (this.hasRammedHornBreakingBlock(serverLevel, goat)) { 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/patches/unapplied/server/Implement-EntityTeleportEndGatewayEvent.patch b/patches/server/Implement-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-EntityTeleportEndGatewayEvent.patch rename to patches/server/Implement-EntityTeleportEndGatewayEvent.patch diff --git a/patches/unapplied/server/Implement-Expanded-ArmorStand-API.patch b/patches/server/Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Expanded-ArmorStand-API.patch rename to patches/server/Implement-Expanded-ArmorStand-API.patch diff --git a/patches/unapplied/server/Implement-World.getEntity-UUID-API.patch b/patches/server/Implement-World.getEntity-UUID-API.patch similarity index 100% rename from patches/unapplied/server/Implement-World.getEntity-UUID-API.patch rename to patches/server/Implement-World.getEntity-UUID-API.patch diff --git a/patches/unapplied/server/Improve-BlockPosition-inlining.patch b/patches/server/Improve-BlockPosition-inlining.patch similarity index 100% rename from patches/unapplied/server/Improve-BlockPosition-inlining.patch rename to patches/server/Improve-BlockPosition-inlining.patch diff --git a/patches/unapplied/server/Improve-EntityShootBowEvent.patch b/patches/server/Improve-EntityShootBowEvent.patch similarity index 100% rename from patches/unapplied/server/Improve-EntityShootBowEvent.patch rename to patches/server/Improve-EntityShootBowEvent.patch diff --git a/patches/unapplied/server/Inventory-removeItemAnySlot.patch b/patches/server/Inventory-removeItemAnySlot.patch similarity index 100% rename from patches/unapplied/server/Inventory-removeItemAnySlot.patch rename to patches/server/Inventory-removeItemAnySlot.patch diff --git a/patches/unapplied/server/InventoryCloseEvent-Reason-API.patch b/patches/server/InventoryCloseEvent-Reason-API.patch similarity index 100% rename from patches/unapplied/server/InventoryCloseEvent-Reason-API.patch rename to patches/server/InventoryCloseEvent-Reason-API.patch diff --git a/patches/unapplied/server/ItemStack-getMaxItemUseDuration.patch b/patches/server/ItemStack-getMaxItemUseDuration.patch similarity index 100% rename from patches/unapplied/server/ItemStack-getMaxItemUseDuration.patch rename to patches/server/ItemStack-getMaxItemUseDuration.patch diff --git a/patches/unapplied/server/LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/server/LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from patches/unapplied/server/LivingEntity-Hand-Raised-Item-Use-API.patch rename to patches/server/LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/patches/unapplied/server/MC-135506-Experience-should-save-as-Integers.patch b/patches/server/MC-135506-Experience-should-save-as-Integers.patch similarity index 100% rename from patches/unapplied/server/MC-135506-Experience-should-save-as-Integers.patch rename to patches/server/MC-135506-Experience-should-save-as-Integers.patch diff --git a/patches/unapplied/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 100% rename from patches/unapplied/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to patches/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch diff --git a/patches/unapplied/server/Make-shield-blocking-delay-configurable.patch b/patches/server/Make-shield-blocking-delay-configurable.patch similarity index 100% rename from patches/unapplied/server/Make-shield-blocking-delay-configurable.patch rename to patches/server/Make-shield-blocking-delay-configurable.patch diff --git a/patches/unapplied/server/Optimize-BlockPosition-helper-methods.patch b/patches/server/Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from patches/unapplied/server/Optimize-BlockPosition-helper-methods.patch rename to patches/server/Optimize-BlockPosition-helper-methods.patch diff --git a/patches/unapplied/server/Optimize-CraftBlockData-Creation.patch b/patches/server/Optimize-CraftBlockData-Creation.patch similarity index 96% rename from patches/unapplied/server/Optimize-CraftBlockData-Creation.patch rename to patches/server/Optimize-CraftBlockData-Creation.patch index 0e46fea83..3cbb850fd 100644 --- a/patches/unapplied/server/Optimize-CraftBlockData-Creation.patch +++ b/patches/server/Optimize-CraftBlockData-Creation.patch @@ -11,8 +11,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -0,0 +0,0 @@ public abstract class BlockBehaviour { - this.hasPostProcess = blockbase_info.hasPostProcess; this.emissiveRendering = blockbase_info.emissiveRendering; + this.offsetType = (BlockBehaviour.OffsetType) blockbase_info.offsetType.apply(this.asState()); } + // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time + private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData; diff --git a/patches/unapplied/server/Optimize-MappedRegistry.patch b/patches/server/Optimize-MappedRegistry.patch similarity index 100% rename from patches/unapplied/server/Optimize-MappedRegistry.patch rename to patches/server/Optimize-MappedRegistry.patch diff --git a/patches/unapplied/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 100% rename from patches/unapplied/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch diff --git a/patches/unapplied/server/PlayerElytraBoostEvent.patch b/patches/server/PlayerElytraBoostEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerElytraBoostEvent.patch rename to patches/server/PlayerElytraBoostEvent.patch diff --git a/patches/unapplied/server/PlayerLaunchProjectileEvent.patch b/patches/server/PlayerLaunchProjectileEvent.patch similarity index 99% rename from patches/unapplied/server/PlayerLaunchProjectileEvent.patch rename to patches/server/PlayerLaunchProjectileEvent.patch index 9816ac9d4..15d76391d 100644 --- a/patches/unapplied/server/PlayerLaunchProjectileEvent.patch +++ b/patches/server/PlayerLaunchProjectileEvent.patch @@ -135,9 +135,9 @@ diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/sr index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java +++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -@@ -0,0 +0,0 @@ import net.minecraft.network.chat.Component; - import net.minecraft.network.chat.TextComponent; - import net.minecraft.network.chat.TranslatableComponent; +@@ -0,0 +0,0 @@ import net.minecraft.nbt.CompoundTag; + import net.minecraft.nbt.ListTag; + import net.minecraft.network.chat.Component; import net.minecraft.stats.Stats; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; diff --git a/patches/unapplied/server/PlayerReadyArrowEvent.patch b/patches/server/PlayerReadyArrowEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerReadyArrowEvent.patch rename to patches/server/PlayerReadyArrowEvent.patch diff --git a/patches/unapplied/server/Print-Error-details-when-failing-to-save-player-data.patch b/patches/server/Print-Error-details-when-failing-to-save-player-data.patch similarity index 100% rename from patches/unapplied/server/Print-Error-details-when-failing-to-save-player-data.patch rename to patches/server/Print-Error-details-when-failing-to-save-player-data.patch diff --git a/patches/unapplied/server/RangedEntity-API.patch b/patches/server/RangedEntity-API.patch similarity index 100% rename from patches/unapplied/server/RangedEntity-API.patch rename to patches/server/RangedEntity-API.patch diff --git a/patches/unapplied/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 100% rename from patches/unapplied/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to patches/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch diff --git a/patches/unapplied/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch b/patches/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch similarity index 100% rename from patches/unapplied/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch rename to patches/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch diff --git a/patches/unapplied/server/SkeletonHorse-Additions.patch b/patches/server/SkeletonHorse-Additions.patch similarity index 100% rename from patches/unapplied/server/SkeletonHorse-Additions.patch rename to patches/server/SkeletonHorse-Additions.patch diff --git a/patches/unapplied/server/Slime-Pathfinder-Events.patch b/patches/server/Slime-Pathfinder-Events.patch similarity index 98% rename from patches/unapplied/server/Slime-Pathfinder-Events.patch rename to patches/server/Slime-Pathfinder-Events.patch index 740aaa3ca..c9f641aa8 100644 --- a/patches/unapplied/server/Slime-Pathfinder-Events.patch +++ b/patches/server/Slime-Pathfinder-Events.patch @@ -8,9 +8,9 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -0,0 +0,0 @@ import net.minecraft.world.level.biome.Biomes; +@@ -0,0 +0,0 @@ import net.minecraft.world.level.ServerLevelAccessor; + import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.levelgen.WorldgenRandom; - import net.minecraft.world.level.storage.loot.BuiltInLootTables; import net.minecraft.world.phys.Vec3; +// Paper start +import com.destroystokyo.paper.event.entity.SlimeChangeDirectionEvent; diff --git a/patches/unapplied/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 100% rename from patches/unapplied/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch diff --git a/patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch similarity index 92% rename from patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch rename to patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index d6f389e5d..89e414dd9 100644 --- a/patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -0,0 +0,0 @@ dependencies { - implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation + implementation("commons-lang:commons-lang:2.6") runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") - runtimeOnly("mysql:mysql-connector-java:8.0.27") + runtimeOnly("mysql:mysql-connector-java:8.0.29") + runtimeOnly("com.lmax:disruptor:3.4.4") // Paper runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.4") diff --git a/patches/unapplied/server/Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch similarity index 92% rename from patches/unapplied/server/Use-ConcurrentHashMap-in-JsonList.patch rename to patches/server/Use-ConcurrentHashMap-in-JsonList.patch index a9f4bce7e..b47711e01 100644 --- a/patches/unapplied/server/Use-ConcurrentHashMap-in-JsonList.patch +++ b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch @@ -27,14 +27,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { - } else if (!this.isWhitelisted(gameprofile, event)) { // Paper - //chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper - //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted + } else if (!this.isWhiteListed(gameprofile, event)) { // Paper + //ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper + //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted - } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) { + } else if (this.getIpBans().isBanned(socketaddress) && getIpBans().get(socketaddress) != null && !this.getIpBans().get(socketaddress).hasExpired()) { // Paper - fix NPE with temp ip bans IpBanListEntry ipbanentry = this.ipBans.get(socketaddress); - chatmessage = new TranslatableComponent("multiplayer.disconnect.banned_ip.reason", new Object[]{ipbanentry.getReason()}); + ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason()); diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/players/StoredUserList.java diff --git a/patches/unapplied/server/Use-a-Queue-for-Queueing-Commands.patch b/patches/server/Use-a-Queue-for-Queueing-Commands.patch similarity index 96% rename from patches/unapplied/server/Use-a-Queue-for-Queueing-Commands.patch rename to patches/server/Use-a-Queue-for-Queueing-Commands.patch index 3b9ca3f4c..d01068c14 100644 --- a/patches/unapplied/server/Use-a-Queue-for-Queueing-Commands.patch +++ b/patches/server/Use-a-Queue-for-Queueing-Commands.patch @@ -10,9 +10,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface + static final Logger LOGGER = LogUtils.getLogger(); private static final int CONVERSION_RETRY_DELAY_MS = 5000; private static final int CONVERSION_RETRIES = 2; - private static final Pattern SHA1 = Pattern.compile("^[a-fA-F0-9]{40}$"); - private final List consoleInput = Collections.synchronizedList(Lists.newArrayList()); + private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue<>(); // Paper - use a proper queuemmands @Nullable diff --git a/patches/unapplied/server/Vanished-players-don-t-have-rights.patch b/patches/server/Vanished-players-don-t-have-rights.patch similarity index 100% rename from patches/unapplied/server/Vanished-players-don-t-have-rights.patch rename to patches/server/Vanished-players-don-t-have-rights.patch diff --git a/patches/unapplied/server/Vex-get-setSummoner-API.patch b/patches/server/Vex-get-setSummoner-API.patch similarity index 100% rename from patches/unapplied/server/Vex-get-setSummoner-API.patch rename to patches/server/Vex-get-setSummoner-API.patch diff --git a/patches/unapplied/server/WitchReadyPotionEvent.patch b/patches/server/WitchReadyPotionEvent.patch similarity index 100% rename from patches/unapplied/server/WitchReadyPotionEvent.patch rename to patches/server/WitchReadyPotionEvent.patch diff --git a/patches/unapplied/server/WitchThrowPotionEvent.patch b/patches/server/WitchThrowPotionEvent.patch similarity index 100% rename from patches/unapplied/server/WitchThrowPotionEvent.patch rename to patches/server/WitchThrowPotionEvent.patch diff --git a/patches/unapplied/server/add-more-information-to-Entity.toString.patch b/patches/server/add-more-information-to-Entity.toString.patch similarity index 100% rename from patches/unapplied/server/add-more-information-to-Entity.toString.patch rename to patches/server/add-more-information-to-Entity.toString.patch