From c720ef617e52ff3abc382abad5ebdf591550a2c5 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 7 Jun 2023 15:58:10 -0700 Subject: [PATCH] even moar patches --- ...n-for-console-having-all-permissions.patch | 0 .../server/Add-villager-reputation-API.patch | 0 ...ktraces-in-log-messages-crash-report.patch | 8 +-- ...der-respects-game-and-entity-rules-f.patch | 0 .../server/Ensure-safe-gateway-teleport.patch | 0 .../server/ExperienceOrbMergeEvent.patch | 0 .../server/Expose-game-version.patch | 0 .../Fix-PotionEffect-ignores-icon-flag.patch | 0 ...ix-villager-trading-demand-MC-163962.patch | 0 .../server/Implement-Mob-Goal-API.patch | 4 +- .../server/Maps-shouldn-t-load-chunks.patch | 2 +- .../server/Optimize-Voxel-Shape-Merging.patch | 0 ...-brigadier-child-sorting-performance.patch | 0 ...-maximum-exp-value-when-merging-orbs.patch | 0 .../server/Potential-bed-API.patch | 0 .../Prevent-teleporting-dead-entities.patch | 0 ...and-End-Portal-Frames-from-being-des.patch | 30 +++++------ ...llocation-of-Vec3D-by-entity-tracker.patch | 2 +- ...-per-thread-native-byte-buffer-cache.patch | 0 ...ookup-for-Treasure-Maps-Fixes-lag-fr.patch | 0 ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- .../server/Villager-Restocks-API.patch | 0 ...Wait-for-Async-Tasks-during-shutdown.patch | 0 .../server/misc-debugging-dumps.patch | 0 ...bleInt-allocations-from-light-engine.patch | 50 ------------------- 25 files changed, 24 insertions(+), 74 deletions(-) rename patches/{unapplied => }/server/Add-option-for-console-having-all-permissions.patch (100%) rename patches/{unapplied => }/server/Add-villager-reputation-API.patch (100%) rename patches/{unapplied => }/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch (99%) rename patches/{unapplied => }/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch (100%) rename patches/{unapplied => }/server/Ensure-safe-gateway-teleport.patch (100%) rename patches/{unapplied => }/server/ExperienceOrbMergeEvent.patch (100%) rename patches/{unapplied => }/server/Expose-game-version.patch (100%) rename patches/{unapplied => }/server/Fix-PotionEffect-ignores-icon-flag.patch (100%) rename patches/{unapplied => }/server/Fix-villager-trading-demand-MC-163962.patch (100%) rename patches/{unapplied => }/server/Implement-Mob-Goal-API.patch (99%) rename patches/{unapplied => }/server/Maps-shouldn-t-load-chunks.patch (95%) rename patches/{unapplied => }/server/Optimize-Voxel-Shape-Merging.patch (100%) rename patches/{unapplied => }/server/Optimize-brigadier-child-sorting-performance.patch (100%) rename patches/{unapplied => }/server/Option-for-maximum-exp-value-when-merging-orbs.patch (100%) rename patches/{unapplied => }/server/Potential-bed-API.patch (100%) rename patches/{unapplied => }/server/Prevent-teleporting-dead-entities.patch (100%) rename patches/{unapplied => }/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch (88%) rename patches/{unapplied => }/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch (96%) rename patches/{unapplied => }/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch (100%) rename patches/{unapplied => }/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch (100%) rename patches/{unapplied => }/server/Validate-PickItem-Packet-and-kick-for-invalid.patch (98%) rename patches/{unapplied => }/server/Villager-Restocks-API.patch (100%) rename patches/{unapplied => }/server/Wait-for-Async-Tasks-during-shutdown.patch (100%) rename patches/{unapplied => }/server/misc-debugging-dumps.patch (100%) delete mode 100644 patches/unapplied/server/Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/patches/unapplied/server/Add-option-for-console-having-all-permissions.patch b/patches/server/Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/Add-option-for-console-having-all-permissions.patch rename to patches/server/Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/Add-villager-reputation-API.patch b/patches/server/Add-villager-reputation-API.patch similarity index 100% rename from patches/unapplied/server/Add-villager-reputation-API.patch rename to patches/server/Add-villager-reputation-API.patch diff --git a/patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch similarity index 99% rename from patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch rename to patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 6af5df1a8a..746bc083b8 100644 --- a/patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -22,8 +22,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files implementation("commons-lang:commons-lang:2.6") + implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation - runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") - runtimeOnly("com.mysql:mysql-connector-j:8.0.32") + runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0") + runtimeOnly("com.mysql:mysql-connector-j:8.0.33") runtimeOnly("com.lmax:disruptor:3.4.4") // Paper @@ -0,0 +0,0 @@ tasks.check { } @@ -624,7 +624,7 @@ diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -0,0 +0,0 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -0,0 +0,0 @@ public class WatchdogThread extends Thread log.log( Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity" ); log.log( Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated" ); log.log( Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage()); @@ -633,7 +633,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 { log.log( Level.SEVERE, "\t\t" + stack ); } -@@ -0,0 +0,0 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -0,0 +0,0 @@ public class WatchdogThread extends Thread } log.log( Level.SEVERE, "\tStack:" ); // diff --git a/patches/unapplied/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from patches/unapplied/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/patches/unapplied/server/Ensure-safe-gateway-teleport.patch b/patches/server/Ensure-safe-gateway-teleport.patch similarity index 100% rename from patches/unapplied/server/Ensure-safe-gateway-teleport.patch rename to patches/server/Ensure-safe-gateway-teleport.patch diff --git a/patches/unapplied/server/ExperienceOrbMergeEvent.patch b/patches/server/ExperienceOrbMergeEvent.patch similarity index 100% rename from patches/unapplied/server/ExperienceOrbMergeEvent.patch rename to patches/server/ExperienceOrbMergeEvent.patch diff --git a/patches/unapplied/server/Expose-game-version.patch b/patches/server/Expose-game-version.patch similarity index 100% rename from patches/unapplied/server/Expose-game-version.patch rename to patches/server/Expose-game-version.patch diff --git a/patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch b/patches/server/Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch rename to patches/server/Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/unapplied/server/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch similarity index 99% rename from patches/unapplied/server/Implement-Mob-Goal-API.patch rename to patches/server/Implement-Mob-Goal-API.patch index 8f8ea1f9e2..00b608e915 100644 --- a/patches/unapplied/server/Implement-Mob-Goal-API.patch +++ b/patches/server/Implement-Mob-Goal-API.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -0,0 +0,0 @@ dependencies { - runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") - runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") + runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10") + runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10") + testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test testImplementation("junit:junit:4.13.2") diff --git a/patches/unapplied/server/Maps-shouldn-t-load-chunks.patch b/patches/server/Maps-shouldn-t-load-chunks.patch similarity index 95% rename from patches/unapplied/server/Maps-shouldn-t-load-chunks.patch rename to patches/server/Maps-shouldn-t-load-chunks.patch index 1b8e6fbcce..0f38337ba6 100644 --- a/patches/unapplied/server/Maps-shouldn-t-load-chunks.patch +++ b/patches/server/Maps-shouldn-t-load-chunks.patch @@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class MapItem extends ComplexItem { int j2 = (j / i + k1 - 64) * i; int k2 = (k / i + l1 - 64) * i; - Multiset multiset = LinkedHashMultiset.create(); + Multiset multiset = LinkedHashMultiset.create(); - LevelChunk chunk = world.getChunk(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); + LevelChunk chunk = world.getChunkIfLoaded(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); // Paper - Maps shouldn't load chunks diff --git a/patches/unapplied/server/Optimize-Voxel-Shape-Merging.patch b/patches/server/Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/unapplied/server/Optimize-Voxel-Shape-Merging.patch rename to patches/server/Optimize-Voxel-Shape-Merging.patch diff --git a/patches/unapplied/server/Optimize-brigadier-child-sorting-performance.patch b/patches/server/Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/unapplied/server/Optimize-brigadier-child-sorting-performance.patch rename to patches/server/Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/unapplied/server/Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 100% rename from patches/unapplied/server/Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/Option-for-maximum-exp-value-when-merging-orbs.patch diff --git a/patches/unapplied/server/Potential-bed-API.patch b/patches/server/Potential-bed-API.patch similarity index 100% rename from patches/unapplied/server/Potential-bed-API.patch rename to patches/server/Potential-bed-API.patch diff --git a/patches/unapplied/server/Prevent-teleporting-dead-entities.patch b/patches/server/Prevent-teleporting-dead-entities.patch similarity index 100% rename from patches/unapplied/server/Prevent-teleporting-dead-entities.patch rename to patches/server/Prevent-teleporting-dead-entities.patch diff --git a/patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 88% rename from patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index a8e7dda0e7..59a7b34c5e 100644 --- a/patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -86,17 +86,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return false; + } + // Paper end - prevent retracting when we're facing the wrong way + BlockState iblockdata1 = (BlockState) state.setValue(PistonBaseBlock.EXTENDED, true); if (!world.isClientSide) { - boolean flag = this.getNeighborSignal(world, pos, enumdirection); @@ -0,0 +0,0 @@ public class PistonBaseBlock extends DirectionalBlock { - BlockState iblockdata1 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); + BlockState iblockdata2 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); - world.setBlock(pos, iblockdata1, 20); -- world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata1, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); -+ world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata1, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); // Paper - diff on change - world.blockUpdated(pos, iblockdata1.getBlock()); - iblockdata1.updateNeighbourShapes(world, pos, 2); + world.setBlock(pos, iblockdata2, 20); +- world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata2, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); ++ world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata2, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); // Paper - diff on change + world.blockUpdated(pos, iblockdata2.getBlock()); + iblockdata2.updateNeighbourShapes(world, pos, 2); if (this.isSticky) { @@ -0,0 +0,0 @@ public class PistonBaseBlock extends DirectionalBlock { } @@ -122,13 +122,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @deprecated */ @Deprecated public boolean canBeReplaced(BlockState state, BlockPlaceContext context) { -- return this.material.isReplaceable() && (context.getItemInHand().isEmpty() || !context.getItemInHand().is(this.asItem())); -+ return this.material.isReplaceable() && (context.getItemInHand().isEmpty() || !context.getItemInHand().is(this.asItem())) && (state.isDestroyable() || (context.getPlayer() != null && context.getPlayer().getAbilities().instabuild)); // Paper +- return state.canBeReplaced() && (context.getItemInHand().isEmpty() || !context.getItemInHand().is(this.asItem())); ++ return state.canBeReplaced() && (context.getItemInHand().isEmpty() || !context.getItemInHand().is(this.asItem())) && (state.isDestroyable() || (context.getPlayer() != null && context.getPlayer().getAbilities().instabuild)); // Paper; } /** @deprecated */ @@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { - return ((Block) this.owner).builtInRegistryHolder(); + return this.legacySolid; } + // Paper start @@ -137,15 +137,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end + - public Material getMaterial() { - return this.material; + public boolean isValidSpawn(BlockGetter world, BlockPos pos, EntityType type) { + return this.getBlock().properties.isValidSpawn.test(this.asState(), world, pos, type); } @@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { } public PushReaction getPistonPushReaction() { -- return this.getBlock().getPistonPushReaction(this.asState()); -+ return !isDestroyable() ? PushReaction.BLOCK : this.getBlock().getPistonPushReaction(this.asState()); // Paper +- return this.pushReaction; ++ return !this.isDestroyable() ? PushReaction.BLOCK : this.pushReaction; // Paper } public boolean isSolidRender(BlockGetter world, BlockPos pos) { @@ -164,6 +164,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + // Paper end - prevent destroying unbreakable blocks - if (k < 0 && !this.level.getBlockState(temp).getMaterial().isSolid()) { + if (k < 0 && !this.level.getBlockState(temp).isSolid()) { return false; } diff --git a/patches/unapplied/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 96% rename from patches/unapplied/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch index acb545eaf1..dd8f85cb59 100644 --- a/patches/unapplied/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + double vec3d_dx = player.getX() - this.entity.getX(); + double vec3d_dz = player.getZ() - this.entity.getZ(); + // Paper end - remove allocation of Vec3D here - double d0 = (double) Math.min(this.getEffectiveRange(), io.papermc.paper.chunk.PlayerChunkLoader.getSendViewDistance(player) * 16); // Paper - per player view distance + double d0 = (double) Math.min(this.getEffectiveRange(), ChunkMap.this.viewDistance * 16); - double d1 = vec3d.x * vec3d.x + vec3d.z * vec3d.z; + double d1 = vec3d_dx * vec3d_dx + vec3d_dz * vec3d_dz; // Paper double d2 = d0 * d0; diff --git a/patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 98% rename from patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch index e917c68d9b..cf9556c84a 100644 --- a/patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePickItem(ServerboundPickItemPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); - this.player.getInventory().pickSlot(packet.getSlot()); + // Paper start - validate pick item position + if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) { diff --git a/patches/unapplied/server/Villager-Restocks-API.patch b/patches/server/Villager-Restocks-API.patch similarity index 100% rename from patches/unapplied/server/Villager-Restocks-API.patch rename to patches/server/Villager-Restocks-API.patch diff --git a/patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/Wait-for-Async-Tasks-during-shutdown.patch diff --git a/patches/unapplied/server/misc-debugging-dumps.patch b/patches/server/misc-debugging-dumps.patch similarity index 100% rename from patches/unapplied/server/misc-debugging-dumps.patch rename to patches/server/misc-debugging-dumps.patch diff --git a/patches/unapplied/server/Reduce-MutableInt-allocations-from-light-engine.patch b/patches/unapplied/server/Reduce-MutableInt-allocations-from-light-engine.patch deleted file mode 100644 index 786cba55fa..0000000000 --- a/patches/unapplied/server/Reduce-MutableInt-allocations-from-light-engine.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Mon, 27 Apr 2020 02:48:06 -0700 -Subject: [PATCH] Reduce MutableInt allocations from light engine - -We can abuse the fact light is single threaded and share an instance -per light engine instance - -diff --git a/src/main/java/net/minecraft/world/level/lighting/BlockLightEngine.java b/src/main/java/net/minecraft/world/level/lighting/BlockLightEngine.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/lighting/BlockLightEngine.java -+++ b/src/main/java/net/minecraft/world/level/lighting/BlockLightEngine.java -@@ -0,0 +0,0 @@ import org.apache.commons.lang3.mutable.MutableInt; - public final class BlockLightEngine extends LayerLightEngine { - private static final Direction[] DIRECTIONS = Direction.values(); - private final BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(); -+ private final MutableInt mutableInt = new MutableInt(); // Paper - - public BlockLightEngine(LightChunkGetter chunkProvider) { - super(chunkProvider, LightLayer.BLOCK, new BlockLightSectionStorage(chunkProvider)); -@@ -0,0 +0,0 @@ public final class BlockLightEngine extends LayerLightEngine= 15) { - return 15; -diff --git a/src/main/java/net/minecraft/world/level/lighting/SkyLightEngine.java b/src/main/java/net/minecraft/world/level/lighting/SkyLightEngine.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/lighting/SkyLightEngine.java -+++ b/src/main/java/net/minecraft/world/level/lighting/SkyLightEngine.java -@@ -0,0 +0,0 @@ import org.apache.commons.lang3.mutable.MutableInt; - public final class SkyLightEngine extends LayerLightEngine { - private static final Direction[] DIRECTIONS = Direction.values(); - private static final Direction[] HORIZONTALS = new Direction[]{Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST}; -+ private final MutableInt mutableInt = new MutableInt(); // Paper - - public SkyLightEngine(LightChunkGetter chunkProvider) { - super(chunkProvider, LightLayer.SKY, new SkyLightSectionStorage(chunkProvider)); -@@ -0,0 +0,0 @@ public final class SkyLightEngine extends LayerLightEngine= 15) { - return level; - } else { -- MutableInt mutableInt = new MutableInt(); -+ //MutableInt mutableint = new MutableInt(); // Paper - share mutableint, single threaded - BlockState blockState = this.getStateAndOpacity(targetId, mutableInt); - if (mutableInt.getValue() >= 15) { - return 15;