minor biome/block wrapper changes

This commit is contained in:
James Seibel
2024-03-23 16:23:40 -05:00
parent 9cd48fb5d7
commit 734bb4afb8
@@ -56,8 +56,10 @@ import net.minecraft.world.level.biome.Biomes;
/** This class wraps the minecraft BlockPos.Mutable (and BlockPos) class */
public class BiomeWrapper implements IBiomeWrapper
{
// must be defined before AIR, otherwise a null pointer will be thrown
private static final Logger LOGGER = LogManager.getLogger();
#if MC_VER < MC_1_18_2
public static final ConcurrentMap<Biome, BiomeWrapper> WRAPPER_BY_BIOME = new ConcurrentHashMap<>();
#else
@@ -65,7 +67,7 @@ public class BiomeWrapper implements IBiomeWrapper
#endif
public static final String EMPTY_STRING = "EMPTY";
public static final BiomeWrapper EMPTY_WRAPPER = new BiomeWrapper();
public static final BiomeWrapper EMPTY_WRAPPER = new BiomeWrapper(null, null);
/** keep track of broken biomes so we don't log every time */
private static final HashSet<String> brokenResourceLocationStrings = new HashSet<>();
@@ -89,7 +91,7 @@ public class BiomeWrapper implements IBiomeWrapper
/** technically final, but since it requires a method call to generate it can't be marked as such */
private String serialString;
private int hashCode;
private final int hashCode;