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/server/LightEngineBlock.java b/src/main/java/net/minecraft/server/LightEngineBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/LightEngineBlock.java +++ b/src/main/java/net/minecraft/server/LightEngineBlock.java @@ -0,0 +0,0 @@ public final class LightEngineBlock extends LightEngineLayer= 15) { diff --git a/src/main/java/net/minecraft/server/LightEngineSky.java b/src/main/java/net/minecraft/server/LightEngineSky.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/LightEngineSky.java +++ b/src/main/java/net/minecraft/server/LightEngineSky.java @@ -0,0 +0,0 @@ public final class LightEngineSky extends LightEngineLayer= 15) { return k; } else { - MutableInt mutableint = new MutableInt(); + //MutableInt mutableint = new MutableInt(); // Paper - share mutableint, single threaded IBlockData iblockdata = this.a(j, mutableint); if (mutableint.getValue() >= 15) {