diff --git a/gradle.properties b/gradle.properties index 02859ad1a4..d695afd48c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ group=io.papermc.paper version=1.19-R0.1-SNAPSHOT - mcVersion=1.19 org.gradle.caching=true diff --git a/patches/unapplied/server/Add-API-methods-to-control-if-armour-stands-can-move.patch b/patches/server/Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 100% rename from patches/unapplied/server/Add-API-methods-to-control-if-armour-stands-can-move.patch rename to patches/server/Add-API-methods-to-control-if-armour-stands-can-move.patch diff --git a/patches/unapplied/server/Add-EntityZapEvent.patch b/patches/server/Add-EntityZapEvent.patch similarity index 100% rename from patches/unapplied/server/Add-EntityZapEvent.patch rename to patches/server/Add-EntityZapEvent.patch diff --git a/patches/unapplied/server/Add-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 100% rename from patches/unapplied/server/Add-ProjectileCollideEvent.patch rename to patches/server/Add-ProjectileCollideEvent.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 99% 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 51d0c06724..447da7b16a 100644 --- a/patches/unapplied/server/Add-ability-to-configure-frosted_ice-properties.patch +++ b/patches/server/Add-ability-to-configure-frosted_ice-properties.patch @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class FrostedIceBlock extends IceBlock { @Override - public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { + if (!world.paperConfig.frostedIceEnabled) return; // Paper - add ability to disable frosted ice if ((random.nextInt(3) == 0 || this.fewerNeigboursThan(world, pos, 4)) && world.getMaxLocalRawBrightness(pos) > 11 - state.getValue(AGE) - state.getLightBlock(world, pos) && this.slightlyMelt(state, world, pos)) { BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); 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 98% 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 index 062cc2a5a1..8e96df3f30 100644 --- 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 @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL - this.connection.disconnect(chatmessage); + this.connection.disconnect(ichatmutablecomponent); } else { this.connection.setListener(new ServerLoginPacketListenerImpl(this.server, this.connection)); + // Paper start - handshake event 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/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/Async-GameProfileCache-saving.patch b/patches/server/Async-GameProfileCache-saving.patch similarity index 100% rename from patches/unapplied/server/Async-GameProfileCache-saving.patch rename to patches/server/Async-GameProfileCache-saving.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 44d31c9011..695f2ef34d 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/chunk/ChunkGenerator.java b index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -0,0 +0,0 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource { - int l1 = i + i1 * j1; - int i2 = j + i1 * k1; - ChunkPos chunkcoordintpair = randomspreadstructureplacement.getPotentialFeatureChunk(l, l1, i2); -+ if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper - Iterator iterator = set.iterator(); +@@ -0,0 +0,0 @@ public abstract class ChunkGenerator { - while (iterator.hasNext()) { + while (iterator.hasNext()) { + ChunkPos chunkcoordintpair = (ChunkPos) iterator.next(); ++ if (!world.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper + + blockposition_mutableblockposition.set(SectionPos.sectionToBlockCoord(chunkcoordintpair.x, 8), 32, SectionPos.sectionToBlockCoord(chunkcoordintpair.z, 8)); + double d1 = blockposition_mutableblockposition.distSqr(center); diff --git a/patches/unapplied/server/Cache-user-authenticator-threads.patch b/patches/server/Cache-user-authenticator-threads.patch similarity index 80% rename from patches/unapplied/server/Cache-user-authenticator-threads.patch rename to patches/server/Cache-user-authenticator-threads.patch index 398cfbf342..70c8888a0f 100644 --- a/patches/unapplied/server/Cache-user-authenticator-threads.patch +++ b/patches/server/Cache-user-authenticator-threads.patch @@ -28,25 +28,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void initUUID() { @@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener - this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); - } else { - // Spigot start -- new Thread("User Authenticator #" + ServerLoginPacketListenerImpl.UNIQUE_THREAD_ID.incrementAndGet()) { + this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); + } else { + // Spigot start +- new Thread("User Authenticator #" + ServerLoginPacketListenerImpl.UNIQUE_THREAD_ID.incrementAndGet()) { - + // Paper start - Cache authenticator threads + authenticatorPool.execute(new Runnable() { - @Override - public void run() { - try { + @Override + public void run() { + try { @@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener - server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex); + server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex); + } } - } -- }.start(); +- }.start(); + }); + // Paper end - // Spigot end - } + // Spigot end + } @@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener throw new IllegalStateException("Protocol error", cryptographyexception); diff --git a/patches/unapplied/server/Complete-resource-pack-API.patch b/patches/server/Complete-resource-pack-API.patch similarity index 97% rename from patches/unapplied/server/Complete-resource-pack-API.patch rename to patches/server/Complete-resource-pack-API.patch index 66829dd41e..36d5a08d04 100644 --- a/patches/unapplied/server/Complete-resource-pack-API.patch +++ b/patches/server/Complete-resource-pack-API.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); - this.disconnect(new TranslatableComponent("multiplayer.requiredTexturePrompt.disconnect")); + this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect")); } - this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()])); // CraftBukkit - diff --git a/patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch b/patches/server/Configurable-Cartographer-Treasure-Maps.patch similarity index 86% rename from patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch rename to patches/server/Configurable-Cartographer-Treasure-Maps.patch index f593bbdb38..91557b3cb8 100644 --- a/patches/unapplied/server/Configurable-Cartographer-Treasure-Maps.patch +++ b/patches/server/Configurable-Cartographer-Treasure-Maps.patch @@ -58,9 +58,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return null; } else { ServerLevel serverLevel = (ServerLevel)entity.level; -- BlockPos blockPos = serverLevel.findNearestMapFeature(this.destination, entity.blockPosition(), 100, true); +- BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, entity.blockPosition(), 100, true); + if (!serverLevel.paperConfig.enableTreasureMaps) return null; // Paper -+ BlockPos blockPos = serverLevel.findNearestMapFeature(this.destination, entity.blockPosition(), 100, !serverLevel.paperConfig.treasureMapsAlreadyDiscoveredVillager); // Paper ++ BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, entity.blockPosition(), 100, !serverLevel.paperConfig.treasureMapsAlreadyDiscoveredVillager); // Paper if (blockPos != null) { ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true); MapItem.renderBiomePreviewMap(serverLevel, itemStack); @@ -72,7 +72,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN); if (vec3 != null) { ServerLevel serverLevel = context.getLevel(); -- BlockPos blockPos = serverLevel.findNearestMapFeature(this.destination, new BlockPos(vec3), this.searchRadius, this.skipKnownStructures); +- BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, new BlockPos(vec3), this.searchRadius, this.skipKnownStructures); + // Paper start + if (!serverLevel.paperConfig.enableTreasureMaps) { + /* @@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return stack; + } + // Paper end -+ BlockPos blockPos = serverLevel.findNearestMapFeature(this.destination, new BlockPos(vec3), this.searchRadius, serverLevel.paperConfig.treasureMapsAlreadyDiscoveredLootTable == null ? this.skipKnownStructures : serverLevel.paperConfig.treasureMapsAlreadyDiscoveredLootTable); // Paper ++ BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, new BlockPos(vec3), this.searchRadius, serverLevel.paperConfig.treasureMapsAlreadyDiscoveredLootTable == null ? this.skipKnownStructures : serverLevel.paperConfig.treasureMapsAlreadyDiscoveredLootTable); // Paper if (blockPos != null) { ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), this.zoom, true, true); MapItem.renderBiomePreviewMap(serverLevel, itemStack); diff --git a/patches/unapplied/server/Configurable-Chunk-Inhabited-Time.patch b/patches/server/Configurable-Chunk-Inhabited-Time.patch similarity index 95% rename from patches/unapplied/server/Configurable-Chunk-Inhabited-Time.patch rename to patches/server/Configurable-Chunk-Inhabited-Time.patch index 95a932460d..ec5be6804e 100644 --- a/patches/unapplied/server/Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/Configurable-Chunk-Inhabited-Time.patch @@ -46,4 +46,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Override public GameEventDispatcher getEventDispatcher(int ySectionCoord) { - return (GameEventDispatcher) this.gameEventDispatcherSections.computeIfAbsent(ySectionCoord, (j) -> { + Level world = this.level; diff --git a/patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/Configurable-Grass-Spread-Tick-Rate.patch similarity index 95% rename from patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch rename to patches/server/Configurable-Grass-Spread-Tick-Rate.patch index b4c694f0b8..74d966e439 100644 --- a/patches/unapplied/server/Configurable-Grass-Spread-Tick-Rate.patch +++ b/patches/server/Configurable-Grass-Spread-Tick-Rate.patch @@ -24,17 +24,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java @@ -0,0 +0,0 @@ package net.minecraft.world.level.block; - import java.util.Random; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.tags.FluidTags; - import net.minecraft.world.level.LevelReader; + import net.minecraft.util.RandomSource; @@ -0,0 +0,0 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { @Override - public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { + 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, world, pos)) { // CraftBukkit start 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 100% rename from patches/unapplied/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to patches/server/Configurable-Non-Player-Arrow-Despawn-Rate.patch 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 87% rename from patches/unapplied/server/Configurable-RCON-IP-address.patch rename to patches/server/Configurable-RCON-IP-address.patch index 305b9c7cbf..2d46f42818 100644 --- a/patches/unapplied/server/Configurable-RCON-IP-address.patch +++ b/patches/server/Configurable-RCON-IP-address.patch @@ -19,9 +19,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public DedicatedServerProperties(Properties properties, OptionSet optionset) { super(properties, optionset); @@ -0,0 +0,0 @@ public class DedicatedServerProperties extends Settings { return s.toLowerCase(Locale.ROOT); - }, "default")); + }, WorldPresets.NORMAL.location().toString())); + this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", "")); + // Paper start - Configurable rcon ip + final String rconIp = this.getStringRaw("rcon.ip"); + this.rconIp = rconIp == null ? this.serverIp : rconIp; diff --git a/patches/unapplied/server/Configurable-flying-kick-messages.patch b/patches/server/Configurable-flying-kick-messages.patch similarity index 93% rename from patches/unapplied/server/Configurable-flying-kick-messages.patch rename to patches/server/Configurable-flying-kick-messages.patch index 9cfcec2944..840788ede9 100644 --- a/patches/unapplied/server/Configurable-flying-kick-messages.patch +++ b/patches/server/Configurable-flying-kick-messages.patch @@ -28,7 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) { if (++this.aboveGroundTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); -- this.disconnect(new TranslatableComponent("multiplayer.disconnect.flying")); +- this.disconnect(Component.translatable("multiplayer.disconnect.flying")); + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message return; } @@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); -- this.disconnect(new TranslatableComponent("multiplayer.disconnect.flying")); +- this.disconnect(Component.translatable("multiplayer.disconnect.flying")); + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message return; } 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/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 100% rename from patches/unapplied/server/Custom-replacement-for-eaten-items.patch rename to patches/server/Custom-replacement-for-eaten-items.patch 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 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-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 92% 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 index 33b905a82c..69c0107a46 100644 --- 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 @@ -14,6 +14,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (!GameProfileCache.usesAuthentication() && gameprofile == null) { + if (!GameProfileCache.usesAuthentication() && gameprofile == null && !org.apache.commons.lang3.StringUtils.isBlank(name)) { // Paper - Don't lookup a profile with a blank name - UUID uuid = Player.createPlayerUUID(new GameProfile((UUID) null, name)); + UUID uuid = UUIDUtil.getOrCreatePlayerUUID(new GameProfile((UUID) null, name)); return Optional.of(new GameProfile(uuid, name)); 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/Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/Entity-AddTo-RemoveFrom-World-Events.patch similarity index 95% rename from patches/unapplied/server/Entity-AddTo-RemoveFrom-World-Events.patch rename to patches/server/Entity-AddTo-RemoveFrom-World-Events.patch index ae68640e33..4e21acbb4f 100644 --- a/patches/unapplied/server/Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/Entity-AddTo-RemoveFrom-World-Events.patch @@ -22,5 +22,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end + new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } - } - } + + public void onSectionChange(Entity entity) { diff --git a/patches/unapplied/server/EntityPathfindEvent.patch b/patches/server/EntityPathfindEvent.patch similarity index 100% rename from patches/unapplied/server/EntityPathfindEvent.patch rename to patches/server/EntityPathfindEvent.patch diff --git a/patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/EntityRegainHealthEvent-isFastRegen-API.patch similarity index 100% rename from patches/unapplied/server/EntityRegainHealthEvent-isFastRegen-API.patch rename to patches/server/EntityRegainHealthEvent-isFastRegen-API.patch 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 99% rename from patches/unapplied/server/Faster-redstone-torch-rapid-clock-removal.patch rename to patches/server/Faster-redstone-torch-rapid-clock-removal.patch index a5832cf68b..6a7e2258d7 100644 --- a/patches/unapplied/server/Faster-redstone-torch-rapid-clock-removal.patch +++ b/patches/server/Faster-redstone-torch-rapid-clock-removal.patch @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public static final int RESTART_DELAY = 160; @@ -0,0 +0,0 @@ public class RedstoneTorchBlock extends TorchBlock { @Override - public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { boolean flag = this.hasNeighborSignal(world, pos, state); - List list = (List) RedstoneTorchBlock.RECENT_TOGGLES.get(world); - 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/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch new file mode 100644 index 0000000000..9db7869c5d --- /dev/null +++ b/patches/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 3 Apr 2016 17:48:50 -0400 +Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics + + +diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/level/ServerLevel.java ++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { + + @Override + public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { ++ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement + this.neighborUpdater.updateNeighborsAtExceptFromFacing(pos, sourceBlock, (Direction) null); + } + diff --git a/patches/unapplied/server/Fix-Old-Sign-Conversion.patch b/patches/server/Fix-Old-Sign-Conversion.patch similarity index 100% rename from patches/unapplied/server/Fix-Old-Sign-Conversion.patch rename to patches/server/Fix-Old-Sign-Conversion.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/LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch similarity index 92% rename from patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch rename to patches/server/LootTable-API-Replenishable-Lootables-Feature.patch index f7e1fea68d..bc68495982 100644 --- a/patches/unapplied/server/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch @@ -519,7 +519,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- 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 { - }; + } // Paper end + public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper @@ -542,49 +542,58 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override protected void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); -+ this.lootableData.saveNbt(nbt); // Paper - if (this.lootTable != null) { - nbt.putString("LootTable", this.lootTable.toString()); - if (this.lootTableSeed != 0L) { - nbt.putLong("LootTableSeed", this.lootTableSeed); - } -- } else { -+ } if (true) { // Paper - Always save the items, Table may stick around - ContainerHelper.saveAllItems(nbt, this.itemStacks); - } ++ this.lootableData.loadNbt(nbt); // Paper + this.addChestVehicleSaveData(nbt); + } -@@ -0,0 +0,0 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme @Override protected void readAdditionalSaveData(CompoundTag nbt) { super.readAdditionalSaveData(nbt); + this.lootableData.loadNbt(nbt); // Paper - this.itemStacks = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); - if (nbt.contains("LootTable", 8)) { - this.lootTable = new ResourceLocation(nbt.getString("LootTable")); - this.lootTableSeed = nbt.getLong("LootTableSeed"); -- } else { -+ } if (true) { // Paper - always load the items, table may still remain - ContainerHelper.loadAllItems(nbt, this.itemStacks); - } - -@@ -0,0 +0,0 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme + this.readChestVehicleSaveData(nbt); } - public void unpackLootTable(@Nullable Player player) { -- if (this.lootTable != null && this.level.getServer() != null) { -+ if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper - LootTable loottable = this.level.getServer().getLootTables().get(this.lootTable); +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +@@ -0,0 +0,0 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain + @Override + protected void addAdditionalSaveData(CompoundTag nbt) { + super.addAdditionalSaveData(nbt); ++ this.lootableData.loadNbt(nbt); // Paper + this.addChestVehicleSaveData(nbt); + } - if (player instanceof ServerPlayer) { - CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer) player, this.lootTable); + @Override + protected void readAdditionalSaveData(CompoundTag nbt) { + super.readAdditionalSaveData(nbt); ++ this.lootableData.loadNbt(nbt); // Paper + this.readChestVehicleSaveData(nbt); + } + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java +@@ -0,0 +0,0 @@ public interface ContainerEntity extends Container, MenuProvider { + if (this.getLootTableSeed() != 0L) { + nbt.putLong("LootTableSeed", this.getLootTableSeed()); } +- } else { ++ } else if (true) { // Paper - always load the items, table may still remain + ContainerHelper.saveAllItems(nbt, this.getItemStacks()); + } -- this.lootTable = null; -+ //this.lootTable = null; // Paper -+ this.lootableData.processRefill(player); // Paper - LootContext.Builder loottableinfo_builder = (new LootContext.Builder((ServerLevel) this.level)).withParameter(LootContextParams.ORIGIN, this.position()).withOptionalRandomSeed(this.lootTableSeed); +@@ -0,0 +0,0 @@ public interface ContainerEntity extends Container, MenuProvider { + if (nbt.contains("LootTable", 8)) { + this.setLootTable(new ResourceLocation(nbt.getString("LootTable"))); + this.setLootTableSeed(nbt.getLong("LootTableSeed")); +- } else { ++ } else if (true) { // Paper - always load the items, table may still remain + ContainerHelper.loadAllItems(nbt, this.getItemStacks()); + } - if (player != null) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java 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 88% 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 index 754d45a1df..b387ae98d4 100644 --- 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 @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { - private int tickPosition; + // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; + public boolean hasPhysicsEvent = true; // Paper @@ -42,15 +42,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata)); this.getCraftServer().getPluginManager().callEvent(event); -@@ -0,0 +0,0 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - try { - // CraftBukkit start - CraftWorld world = ((ServerLevel) this).getWorld(); -- if (world != null) { -+ if (world != null && ((ServerLevel)this).hasPhysicsEvent) { // Paper - BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(pos.getX(), pos.getY(), pos.getZ()), CraftBlockData.fromData(iblockdata), world.getBlockAt(neighborPos.getX(), neighborPos.getY(), neighborPos.getZ())); - this.getCraftServer().getPluginManager().callEvent(event); - diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/BushBlock.java 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 100% 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 diff --git a/patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch b/patches/server/Optimise-BlockState-s-hashCode-equals.patch similarity index 100% rename from patches/unapplied/server/Optimise-BlockState-s-hashCode-equals.patch rename to patches/server/Optimise-BlockState-s-hashCode-equals.patch diff --git a/patches/unapplied/server/Optimize-DataBits.patch b/patches/server/Optimize-DataBits.patch similarity index 98% rename from patches/unapplied/server/Optimize-DataBits.patch rename to patches/server/Optimize-DataBits.patch index 8780f08583..084ba363dd 100644 --- a/patches/unapplied/server/Optimize-DataBits.patch +++ b/patches/server/Optimize-DataBits.patch @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private final int divideAdd; private final long divideAddUnsigned; // Paper private final int divideShift; - public SimpleBitStorage(int elementBits, int size, int[] is) { + public SimpleBitStorage(int elementBits, int size, int[] data) { @@ -0,0 +0,0 @@ public class SimpleBitStorage implements BitStorage { this.mask = (1L << elementBits) - 1L; this.valuesPerLong = (char)(64 / elementBits); 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-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/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 8955dc9959..60b695f7a7 100644 --- a/patches/unapplied/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- 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 extends ChunkAccess { - }); + } } + // Paper start - Optimize getBlockData to reduce instructions 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/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/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 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/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-a-Shared-Random-for-Entities.patch b/patches/server/Use-a-Shared-Random-for-Entities.patch similarity index 66% rename from patches/unapplied/server/Use-a-Shared-Random-for-Entities.patch rename to patches/server/Use-a-Shared-Random-for-Entities.patch index a65280b07c..922f4e02b5 100644 --- a/patches/unapplied/server/Use-a-Shared-Random-for-Entities.patch +++ b/patches/server/Use-a-Shared-Random-for-Entities.patch @@ -9,13 +9,23 @@ 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 @@ import net.minecraft.world.level.entity.EntityInLevelCallback; + import net.minecraft.world.level.gameevent.DynamicGameEventListener; + import net.minecraft.world.level.gameevent.GameEvent; + import net.minecraft.world.level.levelgen.Heightmap; ++import net.minecraft.world.level.levelgen.PositionalRandomFactory; + import net.minecraft.world.level.material.Fluid; + import net.minecraft.world.level.material.FluidState; + import net.minecraft.world.level.material.PushReaction; @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } + // Paper start -+ public static Random SHARED_RANDOM = new Random() { ++ public static RandomSource SHARED_RANDOM = new RandomRandomSource(); ++ private static final class RandomRandomSource extends java.util.Random implements RandomSource { + private boolean locked = false; ++ + @Override + public synchronized void setSeed(long seed) { + if (locked) { @@ -25,7 +35,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + locked = true; + } + } -+ }; ++ ++ @Override ++ public RandomSource fork() { ++ return new net.minecraft.world.level.levelgen.LegacyRandomSource(this.nextLong()); ++ } ++ ++ @Override ++ public PositionalRandomFactory forkPositional() { ++ return new net.minecraft.world.level.levelgen.LegacyRandomSource.LegacyPositionalRandomFactory(this.nextLong()); ++ } ++ ++ @Override ++ public int nextInt(int origin, int bound) { ++ return RandomSource.super.nextInt(origin, bound); ++ } ++ } + // Paper end + private CraftEntity bukkitEntity; @@ -35,7 +60,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; -- this.random = new Random(); +- this.random = RandomSource.create(); + this.random = SHARED_RANDOM; // Paper this.remainingFireTicks = -this.getFireImmuneTicks(); this.fluidHeight = new Object2DoubleArrayMap(2); 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 100% 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 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 89% rename from patches/unapplied/server/remove-null-possibility-for-getServer-singleton.patch rename to patches/server/remove-null-possibility-for-getServer-singleton.patch index f9d59ac4b2..c681830b29 100644 --- a/patches/unapplied/server/remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/remove-null-possibility-for-getServer-singleton.patch @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) { + public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, DynamicOps registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) { super("Server"); + SERVER = this; // Paper - better singleton this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; diff --git a/patches/unapplied/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/unapplied/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch deleted file mode 100644 index eccc29fc0e..0000000000 --- a/patches/unapplied/server/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sun, 3 Apr 2016 17:48:50 -0400 -Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics - - -diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/Level.java -+++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -0,0 +0,0 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - public void setBlocksDirty(BlockPos pos, BlockState old, BlockState updated) {} - - public void updateNeighborsAt(BlockPos pos, Block block) { -+ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement - this.neighborChanged(pos.west(), block, pos); - this.neighborChanged(pos.east(), block, pos); - this.neighborChanged(pos.below(), block, pos);