From dee9fa793dcbf3a43f4d1c2f2ad8bd7d6f9cc0c9 Mon Sep 17 00:00:00 2001 From: cola98765 Date: Sat, 30 Oct 2021 17:45:32 +0200 Subject: [PATCH] cleanup --- .../bufferBuilding/lodTemplates/Box.java | 14 ++++---- .../com/seibel/lod/enums/BlockToAvoid.java | 4 +-- .../seibel/lod/mixin/MixinWorldRenderer.java | 1 - .../com/seibel/lod/objects/LodDimension.java | 18 +++------- .../com/seibel/lod/objects/LodRegion.java | 36 ++++++------------- .../lod/objects/PosToRenderContainer.java | 3 +- .../java/com/seibel/lod/proxy/GlProxy.java | 2 +- .../com/seibel/lod/render/LodRenderer.java | 12 ++----- .../com/seibel/lod/util/DataPointUtil.java | 27 ++++---------- .../lod/wrappers/Block/BlockColorWrapper.java | 10 +++--- .../lod/wrappers/Block/BlockPosWrapper.java | 2 +- .../lod/wrappers/Chunk/ChunkPosWrapper.java | 2 +- .../lod/wrappers/Chunk/ChunkWrapper.java | 22 ++++-------- ...thMapWrapper.java => LightMapWrapper.java} | 6 ++-- .../lod/wrappers/World/BiomeWrapper.java | 2 +- .../wrappers/World/DimensionTypeWrapper.java | 2 +- .../lod/wrappers/World/WorldWrapper.java | 2 +- 17 files changed, 54 insertions(+), 111 deletions(-) rename src/main/java/com/seibel/lod/wrappers/{LigthMapWrapper.java => LightMapWrapper.java} (70%) diff --git a/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java b/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java index 0a2b29562..90172d0a7 100644 --- a/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java +++ b/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java @@ -325,7 +325,7 @@ public class Box //Down direction case singleAdjDataPoint = adjData.get(Direction.DOWN)[0]; if(DataPointUtil.doesItExist(singleAdjDataPoint)) - skyLights.get(Direction.DOWN)[0] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); + skyLights.get(Direction.DOWN)[0] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); else skyLights.get(Direction.DOWN)[0] = skyLights.get(Direction.UP)[0]; //other sided @@ -373,12 +373,12 @@ public class Box { adjHeight.get(direction)[0] = getMaxY(); adjDepth.get(direction)[0] = getMinY(); - skyLights.get(direction)[0] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); //skyLights.get(Direction.UP)[0]; + skyLights.get(direction)[0] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); //skyLights.get(Direction.UP)[0]; } else { adjDepth.get(direction)[faceToDraw] = getMinY(); - skyLights.get(direction)[faceToDraw] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); + skyLights.get(direction)[faceToDraw] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); } faceToDraw++; toFinish = false; @@ -404,12 +404,12 @@ public class Box { adjHeight.get(direction)[0] = getMaxY(); adjDepth.get(direction)[0] = height; - skyLights.get(direction)[0] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); //skyLights.get(Direction.UP)[0]; + skyLights.get(direction)[0] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); //skyLights.get(Direction.UP)[0]; } else { adjDepth.get(direction)[faceToDraw] = height; - skyLights.get(direction)[faceToDraw] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); + skyLights.get(direction)[faceToDraw] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); } toFinish = false; faceToDraw++; @@ -437,7 +437,7 @@ public class Box } adjDepth.get(direction)[faceToDraw] = height; - skyLights.get(direction)[faceToDraw] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); + skyLights.get(direction)[faceToDraw] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); faceToDraw++; adjHeight.get(direction)[faceToDraw] = depth; firstFace = false; @@ -461,7 +461,7 @@ public class Box { singleAdjDataPoint = dataPoint[toFinishIndex]; if (DataPointUtil.doesItExist(singleAdjDataPoint)) - skyLights.get(direction)[faceToDraw] = (byte) DataPointUtil.getLightSkyAlt(singleAdjDataPoint); + skyLights.get(direction)[faceToDraw] = DataPointUtil.getLightSkyAlt(singleAdjDataPoint); else skyLights.get(direction)[faceToDraw] = skyLights.get(Direction.UP)[0]; } diff --git a/src/main/java/com/seibel/lod/enums/BlockToAvoid.java b/src/main/java/com/seibel/lod/enums/BlockToAvoid.java index a8de2c41a..a09b5d68f 100644 --- a/src/main/java/com/seibel/lod/enums/BlockToAvoid.java +++ b/src/main/java/com/seibel/lod/enums/BlockToAvoid.java @@ -36,8 +36,8 @@ public enum BlockToAvoid BOTH(true, true); - public boolean nonFull; - public boolean noCollision; + public final boolean nonFull; + public final boolean noCollision; BlockToAvoid(boolean nonFull, boolean noCollision) { diff --git a/src/main/java/com/seibel/lod/mixin/MixinWorldRenderer.java b/src/main/java/com/seibel/lod/mixin/MixinWorldRenderer.java index 998500528..23ba25de0 100644 --- a/src/main/java/com/seibel/lod/mixin/MixinWorldRenderer.java +++ b/src/main/java/com/seibel/lod/mixin/MixinWorldRenderer.java @@ -26,7 +26,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import com.mojang.blaze3d.matrix.MatrixStack; import com.seibel.lod.LodMain; -import com.seibel.lod.config.LodConfig; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.WorldRenderer; diff --git a/src/main/java/com/seibel/lod/objects/LodDimension.java b/src/main/java/com/seibel/lod/objects/LodDimension.java index 6043ae051..e6708ba4f 100644 --- a/src/main/java/com/seibel/lod/objects/LodDimension.java +++ b/src/main/java/com/seibel/lod/objects/LodDimension.java @@ -755,7 +755,7 @@ public class LodDimension */ public boolean doesRegionNeedBufferRegen(int xIndex, int zIndex) { - return regenRegionBuffer[xIndex][zIndex]; + return regenRegionBuffer[xIndex][zIndex] || recreateRegionBuffer[xIndex][zIndex]; } @@ -787,9 +787,7 @@ public class LodDimension region.updateArea(detailLevel, posX, posZ); } - /** - * Returns true if a region exists at the given LevelPos - */ + /** Returns true if a region exists at the given LevelPos */ public boolean doesDataExist(byte detailLevel, int posX, int posZ) { LodRegion region = getRegion(detailLevel, posX, posZ); @@ -806,18 +804,14 @@ public class LodDimension return fileHandler != null ? fileHandler.loadRegionFromFile(detailLevel, regionPos, generationMode, verticalQuality) : null; } - /** - * Save all dirty regions in this LodDimension to file. - */ + /** Save all dirty regions in this LodDimension to file. */ public void saveDirtyRegionsToFileAsync() { fileHandler.saveDirtyRegionsToFileAsync(); } - /** - * Return true if the chunk has been pregenerated in game - */ + /** Return true if the chunk has been pregenerated in game */ //public boolean isChunkPreGenerated(int xChunkPos, int zChunkPos) //{ // @@ -852,9 +846,7 @@ public class LodDimension return center.z; } - /** - * returns the width of the dimension in regions - */ + /** returns the width of the dimension in regions */ public int getWidth() { // we want to get the length directly from the diff --git a/src/main/java/com/seibel/lod/objects/LodRegion.java b/src/main/java/com/seibel/lod/objects/LodRegion.java index 628685cd0..f4719897e 100644 --- a/src/main/java/com/seibel/lod/objects/LodRegion.java +++ b/src/main/java/com/seibel/lod/objects/LodRegion.java @@ -39,15 +39,11 @@ import com.seibel.lod.util.LodUtil; */ public class LodRegion { - /** - * Number of detail level supported by a region - */ + /** Number of detail level supported by a region */ private static final byte POSSIBLE_LOD = 10; - /** - * Holds the lowest (least detailed) detail level in this region - */ + /** Holds the lowest (least detailed) detail level in this region */ private byte minDetailLevel; /** @@ -55,27 +51,17 @@ public class LodRegion */ private final LevelContainer[] dataContainer; - /** - * This chunk Pos has been generated - */ + /** This chunk Pos has been generated */ //private final boolean[] preGeneratedChunkPos; - /** - * the generation mode for this region - */ - private DistanceGenerationMode generationMode; - /** - * the vertical quality of this region - */ - private VerticalQuality verticalQuality; + /** the generation mode for this region */ + private final DistanceGenerationMode generationMode; + /** the vertical quality of this region */ + private final VerticalQuality verticalQuality; - /** - * this region's x RegionPos - */ + /** this region's x RegionPos */ public final int regionPosX; - /** - * this region's z RegionPos - */ + /** this region's z RegionPos */ public final int regionPosZ; public LodRegion(byte minDetailLevel, RegionPos regionPos, DistanceGenerationMode generationMode, VerticalQuality verticalQuality) @@ -152,9 +138,7 @@ public class LodRegion } - /** - * Return true if the chunk has been pregenerated in game - */ + /** Return true if the chunk has been pregenerated in game */ //public boolean isChunkPreGenerated(int xChunkPos, int zChunkPos) //{ // xChunkPos = LevelPosUtil.getRegionModule(LodUtil.CHUNK_DETAIL_LEVEL, xChunkPos); diff --git a/src/main/java/com/seibel/lod/objects/PosToRenderContainer.java b/src/main/java/com/seibel/lod/objects/PosToRenderContainer.java index 5e08bdd1d..ce01fb601 100644 --- a/src/main/java/com/seibel/lod/objects/PosToRenderContainer.java +++ b/src/main/java/com/seibel/lod/objects/PosToRenderContainer.java @@ -32,7 +32,6 @@ import com.seibel.lod.util.LodUtil; public class PosToRenderContainer { public byte minDetail; - private final int size; private int regionPosX; private int regionPosZ; private int numberOfPosToRender; @@ -47,7 +46,7 @@ public class PosToRenderContainer this.numberOfPosToRender = 0; this.regionPosX = regionPosX; this.regionPosZ = regionPosZ; - this.size = 1 << (LodUtil.REGION_DETAIL_LEVEL - minDetail); + int size = 1 << (LodUtil.REGION_DETAIL_LEVEL - minDetail); posToRender = new int[size * size * 3]; population = new byte[size][size]; } diff --git a/src/main/java/com/seibel/lod/proxy/GlProxy.java b/src/main/java/com/seibel/lod/proxy/GlProxy.java index 9418c7fda..cfecd809c 100644 --- a/src/main/java/com/seibel/lod/proxy/GlProxy.java +++ b/src/main/java/com/seibel/lod/proxy/GlProxy.java @@ -46,7 +46,7 @@ public class GlProxy { private static GlProxy instance = null; - private static MinecraftWrapper mc = MinecraftWrapper.INSTANCE; + private static final MinecraftWrapper mc = MinecraftWrapper.INSTANCE; /** Minecraft's GLFW window */ public final long minecraftGlContext; diff --git a/src/main/java/com/seibel/lod/render/LodRenderer.java b/src/main/java/com/seibel/lod/render/LodRenderer.java index 43328f970..fd8608a23 100644 --- a/src/main/java/com/seibel/lod/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/render/LodRenderer.java @@ -124,7 +124,7 @@ public class LodRenderer public boolean vanillaRenderedChunksEmptySkip = false; public int vanillaBlockRenderedDistance; - boolean vivecraftDetected = ReflectionHandler.INSTANCE.detectVivecraft(); + final boolean vivecraftDetected = ReflectionHandler.INSTANCE.detectVivecraft(); @@ -205,7 +205,7 @@ public class LodRenderer if ((partialRegen || fullRegen) && !lodBufferBuilder.generatingBuffers && !lodBufferBuilder.newBuffersAvailable()) { // generate the LODs on a separate thread to prevent stuttering or freezing - lodBufferBuilder.generateLodBuffersAsync(this, lodDim, mc.getPlayer().blockPosition(), true); + lodBufferBuilder.generateLodBuffersAsync(this, lodDim, mc.getPlayer().blockPosition(), fullRegen); // the regen process has been started, // it will be done when lodBufferBuilder.newBuffersAvailable() @@ -564,7 +564,7 @@ public class LodRenderer { Matrix4f lodPoj; float nearClipPlane = LodConfig.CLIENT.graphics.advancedGraphicsOption.useExtendedNearClipPlane.get() ? vanillaBlockRenderedDistance / 5 : 1; - float farClipPlane = farPlaneBlockDistance * LodUtil.CHUNK_WIDTH / 2; + float farClipPlane = farPlaneBlockDistance * LodUtil.CHUNK_WIDTH >> 1; if (vivecraftDetected) { @@ -886,12 +886,6 @@ public class LodRenderer prevSkyBrightness = skyBrightness; } - /*if (lightMap != lastLightMap) - { - fullRegen = true; - lastLightMap = lightMap; - }*/ - //================// // partial regens // //================// diff --git a/src/main/java/com/seibel/lod/util/DataPointUtil.java b/src/main/java/com/seibel/lod/util/DataPointUtil.java index 2d936a636..5bc568e90 100644 --- a/src/main/java/com/seibel/lod/util/DataPointUtil.java +++ b/src/main/java/com/seibel/lod/util/DataPointUtil.java @@ -23,8 +23,6 @@ import static com.seibel.lod.builders.bufferBuilding.LodBufferBuilder.skyLightPl import com.seibel.lod.enums.DistanceGenerationMode; -import net.minecraft.client.renderer.texture.NativeImage; - /** * * @author Leonardo Amato @@ -171,22 +169,22 @@ public class DataPointUtil return (short) ((dataPoint >>> BLUE_SHIFT) & BLUE_MASK); } - public static int getLightSky(long dataPoint) + public static byte getLightSky(long dataPoint) { - return (int) ((dataPoint >>> SKY_LIGHT_SHIFT) & SKY_LIGHT_MASK); + return (byte) ((dataPoint >>> SKY_LIGHT_SHIFT) & SKY_LIGHT_MASK); } - public static int getLightSkyAlt(long dataPoint) + public static byte getLightSkyAlt(long dataPoint) { if (skyLightPlayer == 0 && ((dataPoint >>> FLAG_SHIFT) & FLAG_MASK) == 1) return 0; else - return (int) ((dataPoint >>> SKY_LIGHT_SHIFT) & SKY_LIGHT_MASK); + return (byte) ((dataPoint >>> SKY_LIGHT_SHIFT) & SKY_LIGHT_MASK); } - public static int getLightBlock(long dataPoint) + public static byte getLightBlock(long dataPoint) { - return (int) ((dataPoint >>> BLOCK_LIGHT_SHIFT) & BLOCK_LIGHT_MASK); + return (byte) ((dataPoint >>> BLOCK_LIGHT_SHIFT) & BLOCK_LIGHT_MASK); } public static boolean getFlag(long dataPoint) @@ -215,19 +213,6 @@ public class DataPointUtil return (int) (((dataPoint >>> COLOR_SHIFT) & COLOR_MASK) | (/*((dataPoint >>> (ALPHA_SHIFT - ALPHA_DOWNSIZE_SHIFT)) | 0b1111)*/255 << 24)); } - /** This method apply the lightmap to the color to use */ - public static int getLightColor(long dataPoint, NativeImage lightMap) - { - int lightBlock = getLightBlock(dataPoint); - int lightSky = getLightSky(dataPoint); - int color = lightMap.getPixelRGBA(lightBlock, lightSky); - int red = ColorUtil.getBlue(color); - int green = ColorUtil.getGreen(color); - int blue = ColorUtil.getRed(color); - - return ColorUtil.multiplyRGBcolors(getColor(dataPoint), ColorUtil.rgbToInt(red, green, blue)); - } - /** This is used to convert a dataPoint to string (useful for the print function) */ @SuppressWarnings("unused") public static String toString(long dataPoint) diff --git a/src/main/java/com/seibel/lod/wrappers/Block/BlockColorWrapper.java b/src/main/java/com/seibel/lod/wrappers/Block/BlockColorWrapper.java index 66b354e60..ee082fef5 100644 --- a/src/main/java/com/seibel/lod/wrappers/Block/BlockColorWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/Block/BlockColorWrapper.java @@ -23,7 +23,7 @@ public class BlockColorWrapper public static final ConcurrentMap blockColorWrapperMap = new ConcurrentHashMap<>(); public static final ModelDataMap dataMap = new ModelDataMap.Builder().build(); public static final BlockPos blockPos = new BlockPos(0,0,0); - public static Random random = new Random(0); + public static final Random random = new Random(0); //public static BlockColourWrapper WATER_COLOR = getBlockColorWrapper(Blocks.WATER); public static final Direction[] directions = new Direction[] { Direction.UP, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.NORTH, Direction.DOWN }; @@ -31,7 +31,7 @@ public class BlockColorWrapper private int color; private boolean isColored; private boolean toTint; - private boolean folliageTint; + private boolean foliageTint; private boolean grassTint; private boolean waterTint; @@ -43,7 +43,7 @@ public class BlockColorWrapper this.color = 0; this.isColored = true; this.toTint = false; - this.folliageTint = false; + this.foliageTint = false; this.grassTint = false; this.waterTint = false; setupColorAndTint(blockState,blockPosWrapper); @@ -186,7 +186,7 @@ public class BlockColorWrapper // we check which kind of tint we need to apply this.grassTint = grassInstance() && toTint; - this.folliageTint = leavesInstance() && toTint; + this.foliageTint = leavesInstance() && toTint; this.waterTint = waterIstance() && toTint; @@ -249,7 +249,7 @@ public class BlockColorWrapper public boolean hasFolliageTint() { - return folliageTint; + return foliageTint; } public boolean hasWaterTint() diff --git a/src/main/java/com/seibel/lod/wrappers/Block/BlockPosWrapper.java b/src/main/java/com/seibel/lod/wrappers/Block/BlockPosWrapper.java index 6dd9d0f20..7332a8a22 100644 --- a/src/main/java/com/seibel/lod/wrappers/Block/BlockPosWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/Block/BlockPosWrapper.java @@ -18,7 +18,7 @@ import java.util.concurrent.ConcurrentMap; //This class wraps the minecraft BlockPos.Mutable (and BlockPos) class public class BlockPosWrapper { - private BlockPos.Mutable blockPos; + private final BlockPos.Mutable blockPos; public BlockPosWrapper() diff --git a/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkPosWrapper.java b/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkPosWrapper.java index 88ae081ac..ed93576ce 100644 --- a/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkPosWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkPosWrapper.java @@ -9,7 +9,7 @@ import java.util.Objects; //This class wraps the minecraft ChunkPos class public class ChunkPosWrapper { - private ChunkPos chunkPos; + private final ChunkPos chunkPos; public ChunkPosWrapper(ChunkPos chunkPos) { diff --git a/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkWrapper.java b/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkWrapper.java index 0a5fa6725..078778493 100644 --- a/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/Chunk/ChunkWrapper.java @@ -14,8 +14,8 @@ import net.minecraft.world.chunk.IChunk; public class ChunkWrapper { - private IChunk chunk; - private ChunkPosWrapper chunkPos; + private final IChunk chunk; + private final ChunkPosWrapper chunkPos; public int getHeight(){ return chunk.getMaxBuildHeight(); @@ -26,14 +26,9 @@ public class ChunkWrapper BlockState blockState = chunk.getBlockState(blockPos.getBlockPos()); //This type of block is always in water - if((blockState.getBlock() instanceof ILiquidContainer) && !(blockState.getBlock() instanceof IWaterLoggable)) - return true; - //This type of block could be in water - if(blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).isPresent() && blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).get()) - return true; - - return false; + return ((blockState.getBlock() instanceof ILiquidContainer) && !(blockState.getBlock() instanceof IWaterLoggable)) + || (blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).isPresent() && blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).get()); } public int getHeightMapValue(int xRel, int zRel){ @@ -78,14 +73,9 @@ public class ChunkWrapper BlockState blockState = chunk.getBlockState(blockPos.getBlockPos()); //This type of block is always in water - if((blockState.getBlock() instanceof ILiquidContainer) && !(blockState.getBlock() instanceof IWaterLoggable)) - return true; - //This type of block could be in water - if(blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).isPresent() && blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).get()) - return true; - - return false; + return ((blockState.getBlock() instanceof ILiquidContainer) && !(blockState.getBlock() instanceof IWaterLoggable)) + || (blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).isPresent() && blockState.getOptionalValue(BlockStateProperties.WATERLOGGED).get()); } public int getEmittedBrightness(BlockPosWrapper blockPos) diff --git a/src/main/java/com/seibel/lod/wrappers/LigthMapWrapper.java b/src/main/java/com/seibel/lod/wrappers/LightMapWrapper.java similarity index 70% rename from src/main/java/com/seibel/lod/wrappers/LigthMapWrapper.java rename to src/main/java/com/seibel/lod/wrappers/LightMapWrapper.java index 4647e3752..9831a5a95 100644 --- a/src/main/java/com/seibel/lod/wrappers/LigthMapWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/LightMapWrapper.java @@ -3,13 +3,13 @@ package com.seibel.lod.wrappers; import net.minecraft.client.renderer.texture.NativeImage; -public class LigthMapWrapper +public class LightMapWrapper { static NativeImage lightMap = null; - public static void setLightMap(NativeImage lightMap) + public static void setLightMap(NativeImage newlightMap) { - lightMap = lightMap; + lightMap = newlightMap; } public static int getLightValue(int skyLight, int blockLight) diff --git a/src/main/java/com/seibel/lod/wrappers/World/BiomeWrapper.java b/src/main/java/com/seibel/lod/wrappers/World/BiomeWrapper.java index 317bc5710..05d4552e3 100644 --- a/src/main/java/com/seibel/lod/wrappers/World/BiomeWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/World/BiomeWrapper.java @@ -21,7 +21,7 @@ public class BiomeWrapper { public static final ConcurrentMap biomeWrapperMap = new ConcurrentHashMap<>(); - private Biome biome; + private final Biome biome; public BiomeWrapper(Biome biome) { diff --git a/src/main/java/com/seibel/lod/wrappers/World/DimensionTypeWrapper.java b/src/main/java/com/seibel/lod/wrappers/World/DimensionTypeWrapper.java index 44965431e..32ee894b1 100644 --- a/src/main/java/com/seibel/lod/wrappers/World/DimensionTypeWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/World/DimensionTypeWrapper.java @@ -8,7 +8,7 @@ import java.util.concurrent.ConcurrentMap; public class DimensionTypeWrapper { private static final ConcurrentMap dimensionTypeWrapperMap = new ConcurrentHashMap<>(); - private DimensionType dimensionType; + private final DimensionType dimensionType; public DimensionTypeWrapper(DimensionType dimensionType) { diff --git a/src/main/java/com/seibel/lod/wrappers/World/WorldWrapper.java b/src/main/java/com/seibel/lod/wrappers/World/WorldWrapper.java index 99a57359a..c03f08344 100644 --- a/src/main/java/com/seibel/lod/wrappers/World/WorldWrapper.java +++ b/src/main/java/com/seibel/lod/wrappers/World/WorldWrapper.java @@ -9,7 +9,7 @@ import java.util.concurrent.ConcurrentMap; public class WorldWrapper { private static final ConcurrentMap worldWrapperMap = new ConcurrentHashMap<>(); - private IWorld world; + private final IWorld world; public WorldWrapper(IWorld world) {