diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt index b8740198d8..b818b96e27 100644 --- a/build-data/dev-imports.txt +++ b/build-data/dev-imports.txt @@ -8,5 +8,3 @@ # To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId: # minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter # minecraft net/minecraft/world/level/entity/LevelEntityGetter.java - -minecraft net.minecraft.network.protocol.game.ClientboundLoginPacket diff --git a/patches/unapplied/api/Add-API-methods-to-control-if-armour-stands-can-move.patch b/patches/api/Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 100% rename from patches/unapplied/api/Add-API-methods-to-control-if-armour-stands-can-move.patch rename to patches/api/Add-API-methods-to-control-if-armour-stands-can-move.patch diff --git a/patches/unapplied/api/Add-EntityZapEvent.patch b/patches/api/Add-EntityZapEvent.patch similarity index 100% rename from patches/unapplied/api/Add-EntityZapEvent.patch rename to patches/api/Add-EntityZapEvent.patch diff --git a/patches/unapplied/api/Add-PlayerUseUnknownEntityEvent.patch b/patches/api/Add-PlayerUseUnknownEntityEvent.patch similarity index 100% rename from patches/unapplied/api/Add-PlayerUseUnknownEntityEvent.patch rename to patches/api/Add-PlayerUseUnknownEntityEvent.patch diff --git a/patches/unapplied/api/Add-ProjectileCollideEvent.patch b/patches/api/Add-ProjectileCollideEvent.patch similarity index 100% rename from patches/unapplied/api/Add-ProjectileCollideEvent.patch rename to patches/api/Add-ProjectileCollideEvent.patch diff --git a/patches/unapplied/api/Add-String-based-Action-Bar-API.patch b/patches/api/Add-String-based-Action-Bar-API.patch similarity index 100% rename from patches/unapplied/api/Add-String-based-Action-Bar-API.patch rename to patches/api/Add-String-based-Action-Bar-API.patch diff --git a/patches/unapplied/api/Add-configuration-option-to-prevent-player-names-fro.patch b/patches/api/Add-configuration-option-to-prevent-player-names-fro.patch similarity index 100% rename from patches/unapplied/api/Add-configuration-option-to-prevent-player-names-fro.patch rename to patches/api/Add-configuration-option-to-prevent-player-names-fro.patch diff --git a/patches/unapplied/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 100% rename from patches/unapplied/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to patches/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch diff --git a/patches/unapplied/api/Add-source-to-PlayerExpChangeEvent.patch b/patches/api/Add-source-to-PlayerExpChangeEvent.patch similarity index 100% rename from patches/unapplied/api/Add-source-to-PlayerExpChangeEvent.patch rename to patches/api/Add-source-to-PlayerExpChangeEvent.patch diff --git a/patches/unapplied/api/Allow-Reloading-of-Command-Aliases.patch b/patches/api/Allow-Reloading-of-Command-Aliases.patch similarity index 100% rename from patches/unapplied/api/Allow-Reloading-of-Command-Aliases.patch rename to patches/api/Allow-Reloading-of-Command-Aliases.patch diff --git a/patches/unapplied/api/Arrow-pickup-rule-API.patch b/patches/api/Arrow-pickup-rule-API.patch similarity index 100% rename from patches/unapplied/api/Arrow-pickup-rule-API.patch rename to patches/api/Arrow-pickup-rule-API.patch diff --git a/patches/unapplied/api/EntityRegainHealthEvent-isFastRegen-API.patch b/patches/api/EntityRegainHealthEvent-isFastRegen-API.patch similarity index 100% rename from patches/unapplied/api/EntityRegainHealthEvent-isFastRegen-API.patch rename to patches/api/EntityRegainHealthEvent-isFastRegen-API.patch diff --git a/patches/unapplied/api/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/api/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 100% rename from patches/unapplied/api/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to patches/api/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch diff --git a/patches/unapplied/api/Expose-WorldBorder-isInBounds-Location-check.patch b/patches/api/Expose-WorldBorder-isInBounds-Location-check.patch similarity index 100% rename from patches/unapplied/api/Expose-WorldBorder-isInBounds-Location-check.patch rename to patches/api/Expose-WorldBorder-isInBounds-Location-check.patch diff --git a/patches/unapplied/api/Fireworks-API-s.patch b/patches/api/Fireworks-API-s.patch similarity index 100% rename from patches/unapplied/api/Fireworks-API-s.patch rename to patches/api/Fireworks-API-s.patch diff --git a/patches/unapplied/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch similarity index 100% rename from patches/unapplied/api/Fix-upstream-javadocs.patch rename to patches/api/Fix-upstream-javadocs.patch diff --git a/patches/unapplied/api/IllegalPacketEvent.patch b/patches/api/IllegalPacketEvent.patch similarity index 100% rename from patches/unapplied/api/IllegalPacketEvent.patch rename to patches/api/IllegalPacketEvent.patch diff --git a/patches/unapplied/api/Item-canEntityPickup.patch b/patches/api/Item-canEntityPickup.patch similarity index 100% rename from patches/unapplied/api/Item-canEntityPickup.patch rename to patches/api/Item-canEntityPickup.patch diff --git a/patches/unapplied/api/LootTable-API.patch b/patches/api/LootTable-API.patch similarity index 100% rename from patches/unapplied/api/LootTable-API.patch rename to patches/api/LootTable-API.patch diff --git a/patches/unapplied/api/Misc-Utils.patch b/patches/api/Misc-Utils.patch similarity index 100% rename from patches/unapplied/api/Misc-Utils.patch rename to patches/api/Misc-Utils.patch diff --git a/patches/unapplied/api/PlayerTeleportEndGatewayEvent.patch b/patches/api/PlayerTeleportEndGatewayEvent.patch similarity index 100% rename from patches/unapplied/api/PlayerTeleportEndGatewayEvent.patch rename to patches/api/PlayerTeleportEndGatewayEvent.patch diff --git a/patches/unapplied/api/Provide-E-TE-Chunk-count-stat-methods.patch b/patches/api/Provide-E-TE-Chunk-count-stat-methods.patch similarity index 100% rename from patches/unapplied/api/Provide-E-TE-Chunk-count-stat-methods.patch rename to patches/api/Provide-E-TE-Chunk-count-stat-methods.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 99% rename from patches/unapplied/server/Add-EntityZapEvent.patch rename to patches/server/Add-EntityZapEvent.patch index d471a04c35..f79637be38 100644 --- a/patches/unapplied/server/Add-EntityZapEvent.patch +++ b/patches/server/Add-EntityZapEvent.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (world.getDifficulty() != Difficulty.PEACEFUL) { - Villager.LOGGER.info("Villager {} was struck by lightning {}.", this, lightning); + // Paper - move log down, event can cancel - Witch entitywitch = (Witch) EntityType.WITCH.create((Level) world); + Witch entitywitch = (Witch) EntityType.WITCH.create(world); + // Paper start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, lightning, entitywitch).isCancelled()) { 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-ProjectileCollideEvent.patch b/patches/server/Add-ProjectileCollideEvent.patch similarity index 99% rename from patches/unapplied/server/Add-ProjectileCollideEvent.patch rename to patches/server/Add-ProjectileCollideEvent.patch index e0beced62f..535a741ee1 100644 --- a/patches/unapplied/server/Add-ProjectileCollideEvent.patch +++ b/patches/server/Add-ProjectileCollideEvent.patch @@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit @@ -0,0 +0,0 @@ public abstract class AbstractHurtingProjectile extends Projectile { - HitResult movingobjectposition = ProjectileUtil.getHitResult((Entity) this, this::canHitEntity); + HitResult movingobjectposition = ProjectileUtil.getHitResult(this, this::canHitEntity); - if (movingobjectposition.getType() != HitResult.Type.MISS) { + // Paper start - Call ProjectileCollideEvent 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 81% 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 index ed71800121..51d0c06724 100644 --- a/patches/unapplied/server/Add-ability-to-configure-frosted_ice-properties.patch +++ b/patches/server/Add-ability-to-configure-frosted_ice-properties.patch @@ -39,14 +39,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 mutableBlockPos.setWithOffset(pos, direction); BlockState blockState = world.getBlockState(mutableBlockPos); if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) { -- world.getBlockTicks().scheduleTick(mutableBlockPos, this, Mth.nextInt(random, 20, 40)); -+ world.getBlockTicks().scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay +- world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, 20, 40)); ++ world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay } } } else { -- world.getBlockTicks().scheduleTick(pos, this, Mth.nextInt(random, 20, 40)); -+ world.getBlockTicks().scheduleTick(pos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay +- world.scheduleTick(pos, this, Mth.nextInt(random, 20, 40)); ++ world.scheduleTick(pos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay } } 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-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/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 100% 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 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/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 80% rename from patches/unapplied/server/Bound-Treasure-Maps-to-World-Border.patch rename to patches/server/Bound-Treasure-Maps-to-World-Border.patch index c5c06f1818..a95a7bdcce 100644 --- a/patches/unapplied/server/Bound-Treasure-Maps-to-World-Border.patch +++ b/patches/server/Bound-Treasure-Maps-to-World-Border.patch @@ -37,11 +37,11 @@ diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureF index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java +++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java -@@ -0,0 +0,0 @@ public abstract class StructureFeature { +@@ -0,0 +0,0 @@ public class StructureFeature { int o = j + i * m; int p = k + i * n; - ChunkPos chunkPos = this.getPotentialFeatureChunk(config, worldSeed, worldgenRandom, o, p); -+ if (!world.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper - boolean bl3 = world.getBiomeManager().getPrimaryBiomeAtChunk(chunkPos).getGenerationSettings().isValidStart(this); - if (bl3) { - ChunkAccess chunkAccess = world.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS); + ChunkPos chunkPos = this.getPotentialFeatureChunk(config, worldSeed, o, p); ++ if (!levelReader.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper + StructureCheckResult structureCheckResult = structureAccessor.checkStructurePresence(chunkPos, this, skipExistingChunks); + if (structureCheckResult != StructureCheckResult.START_NOT_PRESENT) { + if (!skipExistingChunks && structureCheckResult == StructureCheckResult.START_PRESENT) { 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 98% rename from patches/unapplied/server/Cap-Entity-Collisions.patch rename to patches/server/Cap-Entity-Collisions.patch index 05e8aa4c03..97829847e8 100644 --- a/patches/unapplied/server/Cap-Entity-Collisions.patch +++ b/patches/server/Cap-Entity-Collisions.patch @@ -30,7 +30,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; diff --git a/patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch b/patches/server/Configurable-Cartographer-Treasure-Maps.patch similarity index 100% rename from patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch rename to patches/server/Configurable-Cartographer-Treasure-Maps.patch diff --git a/patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/Configurable-Grass-Spread-Tick-Rate.patch similarity index 93% rename from patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch rename to patches/server/Configurable-Grass-Spread-Tick-Rate.patch index e4a89bc4f1..db20a3050b 100644 --- a/patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch +++ b/patches/server/Configurable-Grass-Spread-Tick-Rate.patch @@ -35,7 +35,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { +- if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) { + if (this instanceof GrassBlock && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper - if (!SpreadingSnowyDirtBlock.canBeGrass(state, (LevelReader) world, pos)) { ++ if (!SpreadingSnowyDirtBlock.canBeGrass(state, (LevelReader) world, pos)) { // CraftBukkit start if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) { + return; 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-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/Do-not-load-chunks-for-Pathfinding.patch b/patches/server/Do-not-load-chunks-for-Pathfinding.patch similarity index 100% rename from patches/unapplied/server/Do-not-load-chunks-for-Pathfinding.patch rename to patches/server/Do-not-load-chunks-for-Pathfinding.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 96% 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 index 71c5377469..b95fb60e47 100644 --- 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 @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/patches/unapplied/server/Don-t-let-fishinghooks-use-portals.patch b/patches/server/Don-t-let-fishinghooks-use-portals.patch similarity index 100% rename from patches/unapplied/server/Don-t-let-fishinghooks-use-portals.patch rename to patches/server/Don-t-let-fishinghooks-use-portals.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/EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/EntityRegainHealthEvent-isFastRegen-API.patch similarity index 90% rename from patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch rename to patches/server/EntityRegainHealthEvent-isFastRegen-API.patch index 11d235352e..776c53512f 100644 --- a/patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch +++ b/patches/server/EntityRegainHealthEvent-isFastRegen-API.patch @@ -37,6 +37,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason + player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED, true); // CraftBukkit - added RegainReason // Paper - This is fast regen - // this.a(f); CraftBukkit - EntityExhaustionEvent - player.applyExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent + // this.addExhaustion(f); CraftBukkit - EntityExhaustionEvent + player.causeFoodExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent this.tickTimer = 0; 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 97% 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 d8de743523..9327621721 100644 --- a/patches/unapplied/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -263,8 +263,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) { context.execute((world, blockposition) -> { if (world instanceof ServerLevel) { -- ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf((Vec3i) blockposition), this.getExperienceAmount(world)); -+ ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf((Vec3i) blockposition), this.getExperienceAmount(world), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player); // Paper +- ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf(blockposition), this.getExperienceAmount(world)); ++ ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf(blockposition), this.getExperienceAmount(world), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player); // Paper } world.levelEvent(1042, blockposition, 0); @@ -282,8 +282,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void popExperience(ServerLevel world, BlockPos pos, int size, net.minecraft.server.level.ServerPlayer player) { + // Paper end - add player parameter if (world.getGameRules().getBoolean(GameRules.RULE_DOBLOCKDROPS)) { -- ExperienceOrb.award(world, Vec3.atCenterOf((Vec3i) pos), size); -+ ExperienceOrb.award(world, Vec3.atCenterOf((Vec3i) pos), size, org.bukkit.entity.ExperienceOrb.SpawnReason.BLOCK_BREAK, player); // Paper +- ExperienceOrb.award(world, Vec3.atCenterOf(pos), size); ++ ExperienceOrb.award(world, Vec3.atCenterOf(pos), size, org.bukkit.entity.ExperienceOrb.SpawnReason.BLOCK_BREAK, player); // Paper } } 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 98% rename from patches/unapplied/server/Faster-redstone-torch-rapid-clock-removal.patch rename to patches/server/Faster-redstone-torch-rapid-clock-removal.patch index 94603f383f..a5832cf68b 100644 --- a/patches/unapplied/server/Faster-redstone-torch-rapid-clock-removal.patch +++ b/patches/server/Faster-redstone-torch-rapid-clock-removal.patch @@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class RedstoneTorchBlock extends TorchBlock { @Override public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) { - boolean flag = this.hasNeighborSignal((Level) world, pos, state); + boolean flag = this.hasNeighborSignal(world, pos, state); - List list = (List) RedstoneTorchBlock.RECENT_TOGGLES.get(world); - - while (list != null && !list.isEmpty() && world.getGameTime() - ((RedstoneTorchBlock.Toggle) list.get(0)).when > 60L) { diff --git a/patches/unapplied/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/patches/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch similarity index 100% rename from patches/unapplied/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch rename to patches/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.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/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/Fix-Old-Sign-Conversion.patch b/patches/server/Fix-Old-Sign-Conversion.patch similarity index 97% rename from patches/unapplied/server/Fix-Old-Sign-Conversion.patch rename to patches/server/Fix-Old-Sign-Conversion.patch index 522623fbbe..8470853e5f 100644 --- a/patches/unapplied/server/Fix-Old-Sign-Conversion.patch +++ b/patches/server/Fix-Old-Sign-Conversion.patch @@ -12,7 +12,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.ja 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 implements net.minecraft.server.KeyedObject { +@@ -0,0 +0,0 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject { public CraftPersistentDataContainer persistentDataContainer; // CraftBukkit end private static final Logger LOGGER = LogManager.getLogger(); 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/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 99% rename from patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch rename to patches/server/LootTable-API-Replenishable-Lootables-Feature.patch index 9ad1a3a1cf..1fddde8f27 100644 --- a/patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch @@ -518,7 +518,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i }; // Paper end diff --git a/patches/unapplied/server/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/patches/server/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch similarity index 86% rename from patches/unapplied/server/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch rename to patches/server/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index e7fe5a3b28..c4a1defa45 100644 --- a/patches/unapplied/server/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/patches/server/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -28,11 +28,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob if (!this.isSilent()) { // CraftBukkit start - Use relative location for far away sounds - // this.world.b(1023, new BlockPosition(this), 0); + // this.world.globalLevelEvent(1023, new BlockPosition(this), 0); - int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; -- for (ServerPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { -+ //int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API -+ for (ServerPlayer player : (List)this.level.players()) { ++ //int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API + for (ServerPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { + final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch double deltaX = this.getX() - player.getX(); double deltaZ = this.getZ() - player.getZ(); diff --git a/patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch b/patches/server/Optimise-BlockState-s-hashCode-equals.patch similarity index 93% rename from patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch rename to patches/server/Optimise-BlockState-s-hashCode-equals.patch index 0e4c1cd8d5..663ab12b16 100644 --- a/patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch +++ b/patches/server/Optimise-BlockState-s-hashCode-equals.patch @@ -55,18 +55,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java +++ b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java @@ -0,0 +0,0 @@ public abstract class Property> { + } - @Override public boolean equals(Object object) { - if (this == object) { - return true; - } else if (!(object instanceof Property)) { - return false; - } else { -- Property property = (Property)object; -- return this.clazz.equals(property.clazz) && this.name.equals(property.name); +- Property iblockstate = (Property) object; +- +- return this.clazz.equals(iblockstate.clazz) && this.name.equals(iblockstate.name); - } -+ return this == object; ++ return this == object; // Paper } - @Override + public final int hashCode() { diff --git a/patches/unapplied/server/Optimize-DataBits.patch b/patches/server/Optimize-DataBits.patch similarity index 77% rename from patches/unapplied/server/Optimize-DataBits.patch rename to patches/server/Optimize-DataBits.patch index 3f951cda5b..80885a6984 100644 --- a/patches/unapplied/server/Optimize-DataBits.patch +++ b/patches/server/Optimize-DataBits.patch @@ -10,11 +10,11 @@ After: http://i.imgur.com/nJ46crB.png Optimize redundant converting of static fields into an unsigned long each call by precomputing it in ctor -diff --git a/src/main/java/net/minecraft/util/BitStorage.java b/src/main/java/net/minecraft/util/BitStorage.java +diff --git a/src/main/java/net/minecraft/util/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/util/BitStorage.java -+++ b/src/main/java/net/minecraft/util/BitStorage.java -@@ -0,0 +0,0 @@ public class BitStorage { +--- a/src/main/java/net/minecraft/util/SimpleBitStorage.java ++++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java +@@ -0,0 +0,0 @@ public class SimpleBitStorage implements BitStorage { private final long mask; private final int size; private final int valuesPerLong; @@ -24,19 +24,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private final int divideAdd; private final long divideAddUnsigned; // Paper private final int divideShift; - public BitStorage(int elementBits, int size) { -@@ -0,0 +0,0 @@ public class BitStorage { + public SimpleBitStorage(int elementBits, int size, int[] is) { +@@ -0,0 +0,0 @@ public class SimpleBitStorage implements BitStorage { this.mask = (1L << elementBits) - 1L; this.valuesPerLong = (char)(64 / elementBits); int i = 3 * (this.valuesPerLong - 1); - this.divideMul = MAGIC[i + 0]; - this.divideAdd = MAGIC[i + 1]; -+ this.divideMul = BitStorage.MAGIC[i + 0]; this.divideMulUnsigned = Integer.toUnsignedLong(this.divideMul); // Paper -+ this.divideAdd = BitStorage.MAGIC[i + 1]; this.divideAddUnsigned = Integer.toUnsignedLong(this.divideAdd); // Paper ++ this.divideMul = MAGIC[i + 0]; this.divideMulUnsigned = Integer.toUnsignedLong(this.divideMul); // Paper ++ this.divideAdd = MAGIC[i + 1]; this.divideAddUnsigned = Integer.toUnsignedLong(this.divideAdd); // Paper this.divideShift = MAGIC[i + 2]; int j = (size + this.valuesPerLong - 1) / this.valuesPerLong; - if (storage != null) { -@@ -0,0 +0,0 @@ public class BitStorage { + if (data != null) { +@@ -0,0 +0,0 @@ public class SimpleBitStorage implements BitStorage { } private int cellIndex(int index) { @@ -48,6 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return (int) ((long) index * this.divideMulUnsigned + this.divideAddUnsigned >> 32 >> this.divideShift); // Paper } + @Override - public int getAndSet(int index, int value) { - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); - Validate.inclusiveBetween(0L, this.mask, (long)value); @@ -57,10 +58,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 int i = this.cellIndex(index); long l = this.data[i]; int j = (index - i * this.valuesPerLong) * this.bits; -@@ -0,0 +0,0 @@ public class BitStorage { - return k; +@@ -0,0 +0,0 @@ public class SimpleBitStorage implements BitStorage { } + @Override - public void set(int index, int value) { - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); - Validate.inclusiveBetween(0L, this.mask, (long)value); @@ -70,9 +71,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 int i = this.cellIndex(index); long l = this.data[i]; int j = (index - i * this.valuesPerLong) * this.bits; - this.data[i] = l & ~(this.mask << j) | ((long)value & this.mask) << j; +@@ -0,0 +0,0 @@ public class SimpleBitStorage implements BitStorage { } + @Override - public int get(int index) { - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); + public final int get(int index) { // Paper - make final for inline diff --git a/patches/unapplied/server/Optimize-ItemStack.isEmpty.patch b/patches/server/Optimize-ItemStack.isEmpty.patch similarity index 100% rename from patches/unapplied/server/Optimize-ItemStack.isEmpty.patch rename to patches/server/Optimize-ItemStack.isEmpty.patch diff --git a/patches/unapplied/server/Optimize-UserCache-Thread-Safe.patch b/patches/server/Optimize-UserCache-Thread-Safe.patch similarity index 100% rename from patches/unapplied/server/Optimize-UserCache-Thread-Safe.patch rename to patches/server/Optimize-UserCache-Thread-Safe.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/Option-to-remove-corrupt-tile-entities.patch b/patches/server/Option-to-remove-corrupt-tile-entities.patch similarity index 83% rename from patches/unapplied/server/Option-to-remove-corrupt-tile-entities.patch rename to patches/server/Option-to-remove-corrupt-tile-entities.patch index ff061abdb6..5788fcc99d 100644 --- a/patches/unapplied/server/Option-to-remove-corrupt-tile-entities.patch +++ b/patches/server/Option-to-remove-corrupt-tile-entities.patch @@ -22,14 +22,23 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -0,0 +0,0 @@ public class LevelChunk implements ChunkAccess { +@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { + } + + this.setLightCorrect(protoChunk.isLightCorrect()); +- this.unsaved = true; ++ this.setUnsaved(true); + this.needsDecoration = true; // CraftBukkit + } + +@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { "Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); + + if (this.level.paperConfig.removeCorruptTEs) { + this.removeBlockEntity(blockEntity.getBlockPos()); -+ this.markUnsaved(); ++ this.setUnsaved(true); + org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity"); + } // Paper end 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/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/PlayerTeleportEndGatewayEvent.patch b/patches/server/PlayerTeleportEndGatewayEvent.patch similarity index 96% rename from patches/unapplied/server/PlayerTeleportEndGatewayEvent.patch rename to patches/server/PlayerTeleportEndGatewayEvent.patch index bc397f8ce6..093e85d160 100644 --- a/patches/unapplied/server/PlayerTeleportEndGatewayEvent.patch +++ b/patches/server/PlayerTeleportEndGatewayEvent.patch @@ -9,7 +9,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayB index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -0,0 +0,0 @@ import net.minecraft.data.worldgen.Features; +@@ -0,0 +0,0 @@ import net.minecraft.data.worldgen.features.EndFeatures; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; 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/Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/patches/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch similarity index 100% rename from patches/unapplied/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch rename to patches/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch diff --git a/patches/unapplied/server/Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch similarity index 100% rename from patches/unapplied/server/Sanitise-RegionFileCache-and-make-configurable.patch rename to patches/server/Sanitise-RegionFileCache-and-make-configurable.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 100% rename from patches/unapplied/server/System-property-for-disabling-watchdoge.patch rename to patches/server/System-property-for-disabling-watchdoge.patch diff --git a/patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 99% rename from patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch rename to patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch index d0c55bdede..d71b31a481 100644 --- a/patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -39,8 +39,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1") + // Paper end implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") // Paper - implementation("org.apache.logging.log4j:log4j-api:2.14.1") // Paper implementation("org.ow2.asm:asm:9.2") + implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 @@ -121,12 +121,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import com.mojang.datafixers.DataFixer; +import io.papermc.paper.adventure.PaperAdventure; // Paper import it.unimi.dsi.fastutil.longs.LongIterator; - import java.awt.GraphicsEnvironment; import java.awt.image.BufferedImage; + import java.io.BufferedWriter; @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; + // CraftBukkit start import com.mojang.serialization.DynamicOps; import com.mojang.serialization.Lifecycle; - import com.google.common.collect.ImmutableSet; -import jline.console.ConsoleReader; +// import jline.console.ConsoleReader; // Paper import joptsimple.OptionSet; @@ -247,9 +247,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/ja index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -0,0 +0,0 @@ import java.util.function.Consumer; - import java.util.logging.Level; +@@ -0,0 +0,0 @@ import java.util.logging.Level; import java.util.logging.Logger; + import java.util.stream.Collectors; import javax.imageio.ImageIO; -import jline.console.ConsoleReader; import net.minecraft.advancements.Advancement; diff --git a/patches/unapplied/server/Workaround-for-setting-passengers-on-players.patch b/patches/server/Workaround-for-setting-passengers-on-players.patch similarity index 100% rename from patches/unapplied/server/Workaround-for-setting-passengers-on-players.patch rename to patches/server/Workaround-for-setting-passengers-on-players.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 100% 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 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 94% rename from patches/unapplied/server/remove-null-possibility-for-getServer-singleton.patch rename to patches/server/remove-null-possibility-for-getServer-singleton.patch index 0d649f0cb8..58417f320e 100644 --- a/patches/unapplied/server/remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/remove-null-possibility-for-getServer-singleton.patch @@ -11,12 +11,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.spigotmc.SlackActivityAccountant; // Spigot - public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements SnooperPopulator, CommandSource, AutoCloseable { + public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements CommandSource, AutoCloseable { + private static MinecraftServer SERVER; // Paper public static final Logger LOGGER = LogManager.getLogger(); + public static final String VANILLA_BRAND = "vanilla"; private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F; - private static final int TICK_STATS_SPAN = 100; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop