Finish moving patches back and improving compilable state

This commit is contained in:
Nassim Jahnke 2024-01-25 10:54:46 +01:00
parent 1831240d1c
commit b03f255532
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
163 changed files with 466 additions and 411 deletions

View file

@ -7,12 +7,12 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
and cloning it when one is needed.
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index a009fca54665cbc3f11cad776256fbf1fbbb18c7..7e4264f87a0f81db71d49dbede32a1bad87f7ca8 100644
index b6d3f9f9520e410526cfeabcdeb9720dbe30e4bf..6f60622f2dad5f82fb24505612e7e3a32722ab93 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -876,6 +876,14 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -875,6 +875,14 @@ public abstract class BlockBehaviour implements FeatureElement {
this.instrument = blockbase_info.instrument;
this.replaceable = blockbase_info.replaceable;
this.conditionallyFullOpaque = this.canOcclude & this.useShapeForLightOcclusion; // Paper
}
+ // Paper start - Perf: impl cached craft block data, lazy load to fix issue with loading at the wrong time
+ private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData;