diff --git a/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java b/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java index ab5886e37..213ba80bf 100644 --- a/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java +++ b/src/main/java/com/seibel/lod/core/api/internal/ClientApi.java @@ -78,7 +78,7 @@ public class ClientApi private static final EventApi EVENT_API = EventApi.INSTANCE; public static final boolean ENABLE_LAG_SPIKE_LOGGING = false; - public static final long LAG_SPIKE_THRESOLD_NS = TimeUnit.NANOSECONDS.convert(16, TimeUnit.MILLISECONDS); + public static final long LAG_SPIKE_THRESHOLD_NS = TimeUnit.NANOSECONDS.convert(16, TimeUnit.MILLISECONDS); public static final long SPAM_LOGGER_FLUSH_NS = TimeUnit.NANOSECONDS.convert(1, TimeUnit.SECONDS); @@ -91,7 +91,7 @@ public class ClientApi public void end(String source) { if (!ENABLE_LAG_SPIKE_LOGGING) return; timer = System.nanoTime() - timer; - if (timer > LAG_SPIKE_THRESOLD_NS) { + if (timer > LAG_SPIKE_THRESHOLD_NS) { LOGGER.info("LagSpikeCatcher: "+source+" took "+Duration.ofNanos(timer)+"!"); } } @@ -217,7 +217,7 @@ public class ClientApi LagSpikeCatcher updateToBeLoadedChunk = new LagSpikeCatcher(); for (long pos : toBeLoaded) { if (generating.size() >= 1) { - //ApiShared.LOGGER.info("Lod Generating Full! Remining: "+toBeLoaded.size()); + //ApiShared.LOGGER.info("Lod Generating Full! Remaining: "+toBeLoaded.size()); break; } IChunkWrapper chunk = world.tryGetChunk(FACTORY.createChunkPos(pos)); @@ -230,7 +230,7 @@ public class ClientApi if (!chunk.doesNearbyChunksExist()) continue; toBeLoaded.remove(pos); generating.add(pos); - //ApiShared.LOGGER.info("Lod Generation trying "+pos+". Remining: " +toBeLoaded.size()); + //ApiShared.LOGGER.info("Lod Generation trying "+pos+". Remaining: " +toBeLoaded.size()); InternalApiShared.lodBuilder.generateLodNodeAsync(chunk, InternalApiShared.lodWorld, world.getDimensionType(), DistanceGenerationMode.FULL, true, true, () -> { generating.remove(pos); @@ -281,7 +281,7 @@ public class ClientApi try { MC.sendChatMessage("\u00A74\u00A7l\u00A7uERROR: Distant Horizons" + " renderer has encountered an exception!"); - MC.sendChatMessage("\u00A74Renderer is now disabled to prevent futher issues."); + MC.sendChatMessage("\u00A74Renderer is now disabled to prevent further issues."); MC.sendChatMessage("\u00A74Exception detail: "+e.toString()); } catch (RuntimeException ignored) {} } @@ -338,7 +338,7 @@ public class ClientApi } //=================// - // DUBUG USE // + // DEBUG USE // //=================// // Trigger once on key press, with CLIENT PLAYER. diff --git a/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java b/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java index 7e985b039..7c9e7c7fe 100644 --- a/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java +++ b/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java @@ -223,7 +223,7 @@ public class LodBuilder try { if (region.getMinDetailLevel()!= 0) { if (!LodUtil.checkRamUsage(0.05, 16)) { - EVENT_LOGGER.debug("LodBuilder: Not enough RAM avalible for loading files to build lods! Returning..."); + EVENT_LOGGER.debug("LodBuilder: Not enough RAM available for loading files to build lods! Returning..."); return false; } @@ -458,7 +458,7 @@ public class LodBuilder if (chunk.blockPosInsideChunk(x, y+1, z)) { IBlockDetailWrapper blockAbove = chunk.getBlockDetail(x, y+1, z); if (blockAbove != null && config.client().worldGenerator().getTintWithAvoidedBlocks() && !blockAbove.shouldRender(config.client().worldGenerator().getBlocksToAvoid())) - { // The above block is skipped. Lets use its skipped color for currrent block + { // The above block is skipped. Lets use its skipped color for current block colorInt = blockAbove.getAndResolveFaceColor(null, chunk, FACTORY.createBlockPos(x, y+1, z)); } } diff --git a/src/main/java/com/seibel/lod/core/builders/lodBuilding/bufferBuilding/BufferQuad.java b/src/main/java/com/seibel/lod/core/builders/lodBuilding/bufferBuilding/BufferQuad.java index 8aed301e1..9ad3f8621 100644 --- a/src/main/java/com/seibel/lod/core/builders/lodBuilding/bufferBuilding/BufferQuad.java +++ b/src/main/java/com/seibel/lod/core/builders/lodBuilding/bufferBuilding/BufferQuad.java @@ -125,7 +125,7 @@ public final class BufferQuad /** * Attempts to merge the given quad into this one. - * @returns true if the quads were merged, false otherwise. + * @return true if the quads were merged, false otherwise. */ public boolean tryMerge(BufferQuad quad, BufferMergeDirectionEnum mergeDirection) { diff --git a/src/main/java/com/seibel/lod/core/builders/worldGeneration/BatchGenerator.java b/src/main/java/com/seibel/lod/core/builders/worldGeneration/BatchGenerator.java index 83b6db277..2f5ef71c3 100644 --- a/src/main/java/com/seibel/lod/core/builders/worldGeneration/BatchGenerator.java +++ b/src/main/java/com/seibel/lod/core/builders/worldGeneration/BatchGenerator.java @@ -121,9 +121,8 @@ public class BatchGenerator // ApiShared.LOGGER.info("PosToGenerate: {}", posToGenerate); // Find the max number of iterations we need to go though. - // We are checking one FarPos, and one NearPos per iterations. This ensure we - // aren't just - // always picking one or the other. + // We are checking one FarPos, and one NearPos per iterations. + // This ensures we aren't just always picking one or the other. Steps targetStep; switch (mode) { case NONE: @@ -248,17 +247,17 @@ public class BatchGenerator if (estimatedSampleNeeded > 32768) estimatedSampleNeeded = 32768; if (ENABLE_GENERATOR_STATS_LOGGING) - LOGGER.info("WorldGenerator: Increasing estimatedSampleNeeeded to " + estimatedSampleNeeded); + LOGGER.info("WorldGenerator: Increasing estimatedSampleNeeded to " + estimatedSampleNeeded); } else if (toGenerate <= 0 && positionGoneThough * 1.5 < posToGenerate.getNumberOfPos()) { - // We haven't gone though half of them and it's already enough. - // Let's shink the estimatedSampleNeeded. + // We haven't gone through half of them, and it's already enough. + // Let's shrink the estimatedSampleNeeded. estimatedSampleNeeded /= 1.2; - // Ensure we don't go to near zero. + // Ensure we don't go near zero. if (estimatedSampleNeeded < 4) estimatedSampleNeeded = 4; if (ENABLE_GENERATOR_STATS_LOGGING) - LOGGER.info("WorldGenerator: Decreasing estimatedSampleNeeeded to " + estimatedSampleNeeded); + LOGGER.info("WorldGenerator: Decreasing estimatedSampleNeeded to " + estimatedSampleNeeded); } } diff --git a/src/main/java/com/seibel/lod/core/config/ConfigBase.java b/src/main/java/com/seibel/lod/core/config/ConfigBase.java index 6a587c838..97f6d62f2 100644 --- a/src/main/java/com/seibel/lod/core/config/ConfigBase.java +++ b/src/main/java/com/seibel/lod/core/config/ConfigBase.java @@ -52,7 +52,7 @@ public class ConfigBase { public static final int configVersion = 1; public static void init(Class config) { - addAcceptableInputs(); // Add all of the acceptable stuff to the acceptableInputs list + addAcceptableInputs(); // Add all the acceptable stuff to the acceptableInputs list initNestedClass(config, ""); // Init root category // File handling (load from file) diff --git a/src/main/java/com/seibel/lod/core/config/file/ConfigTypeConverters.java b/src/main/java/com/seibel/lod/core/config/file/ConfigTypeConverters.java index 0fc325609..874982fdf 100644 --- a/src/main/java/com/seibel/lod/core/config/file/ConfigTypeConverters.java +++ b/src/main/java/com/seibel/lod/core/config/file/ConfigTypeConverters.java @@ -17,7 +17,7 @@ public class ConfigTypeConverters { try { return convertObjects.get(clazz).convertToString(value); } catch (Exception e) { - System.out.println("Type [" + clazz.toString() + "] isnt a convertable value in the config file handler"); + System.out.println("Type [" + clazz.toString() + "] isnt a convertible value in the config file handler"); return null; } } @@ -25,7 +25,7 @@ public class ConfigTypeConverters { try { return convertObjects.get(clazz).convertFromString(value); } catch (Exception e) { - System.out.println("Type [" + clazz.toString() + "] isnt a convertable value in the config file handler"); + System.out.println("Type [" + clazz.toString() + "] isnt a convertible value in the config file handler"); return null; } } diff --git a/src/main/java/com/seibel/lod/core/enums/config/DistanceGenerationMode.java b/src/main/java/com/seibel/lod/core/enums/config/DistanceGenerationMode.java index 3df34fa9c..6dc3e042f 100644 --- a/src/main/java/com/seibel/lod/core/enums/config/DistanceGenerationMode.java +++ b/src/main/java/com/seibel/lod/core/enums/config/DistanceGenerationMode.java @@ -78,7 +78,7 @@ public enum DistanceGenerationMode * This is the most compatible, but causes server/simulation lag. * This will also show player made structures if you * are adding the mod on a pre-existing world. - * Singlethreaded - Slow (15-50 ms, with spikes up to 200 ms) + * Single-threaded - Slow (15-50 ms, with spikes up to 200 ms) */ FULL((byte) 6); diff --git a/src/main/java/com/seibel/lod/core/enums/config/ShadingMode.java b/src/main/java/com/seibel/lod/core/enums/config/ShadingMode.java index 9bd74f201..7859e85b7 100644 --- a/src/main/java/com/seibel/lod/core/enums/config/ShadingMode.java +++ b/src/main/java/com/seibel/lod/core/enums/config/ShadingMode.java @@ -34,7 +34,7 @@ public enum ShadingMode GAME_SHADING, /** - * LODs will use ambient occlusion to mimic Minecarft's + * LODs will use ambient occlusion to mimic Minecraft's * Fancy lighting. */ AMBIENT_OCCLUSION diff --git a/src/main/java/com/seibel/lod/core/handlers/IReflectionHandler.java b/src/main/java/com/seibel/lod/core/handlers/IReflectionHandler.java index b79a8d8a4..210dcd47f 100644 --- a/src/main/java/com/seibel/lod/core/handlers/IReflectionHandler.java +++ b/src/main/java/com/seibel/lod/core/handlers/IReflectionHandler.java @@ -39,13 +39,13 @@ import com.seibel.lod.core.handlers.dependencyInjection.IBindable; */ public interface IReflectionHandler extends IBindable { - /** @returns Whether Optifine is set to render fog or not. */ + /** @return Whether Optifine is set to render fog or not. */ FogDrawMode getFogDrawMode(); - /** @returns if Vivecraft is present. Attempts to find the "VRRenderer" class. */ + /** @return if Vivecraft is present. Attempts to find the "VRRenderer" class. */ boolean vivecraftPresent(); - /** @returns if Sodium (or a sodium like) mod is present. Attempts to find the "SodiumWorldRenderer" class. */ + /** @return if Sodium (or a sodium like) mod is present. Attempts to find the "SodiumWorldRenderer" class. */ boolean sodiumPresent(); boolean optifinePresent(); diff --git a/src/main/java/com/seibel/lod/core/handlers/LodDimensionFileHandler.java b/src/main/java/com/seibel/lod/core/handlers/LodDimensionFileHandler.java index b729ae487..9c42bdb30 100644 --- a/src/main/java/com/seibel/lod/core/handlers/LodDimensionFileHandler.java +++ b/src/main/java/com/seibel/lod/core/handlers/LodDimensionFileHandler.java @@ -257,6 +257,7 @@ public class LodDimensionFileHandler + " version found: " + fileVersion + ", version requested: " + LOD_SAVE_FILE_VERSION + ". File has been deleted."); + //TODO: fix comment // This should not break, but be continue to see whether other detail levels can be loaded or updated region.addLevelContainer(new VerticalLevelContainer(tempDetailLevel)); } @@ -481,7 +482,7 @@ public class LodDimensionFileHandler boolean isStarted = isFileWritingThreadRunning.get(); if (!isStarted) - throw new ConcurrentModificationException("WriterMain Triggered but the thead state is not started!?"); + throw new ConcurrentModificationException("WriterMain Triggered but the thread state is not started!?"); if (ENABLE_SAVE_THREAD_LOGGING) LOGGER.info("Lod File Writer started. To-be-written-regions: " + regionToSave.size()); @@ -498,7 +499,7 @@ public class LodDimensionFileHandler { if (r.isWriting.getAndIncrement() > 0) continue; - //Check if the data has been swapped out right under me. Otherwise remove it from the entry + //Check if the data has been swapped out right under me. Otherwise, remove it from the entry if (!regionToSave.remove(r.getRegionPos(), r)) continue; r.needSaving = false; diff --git a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/DependencyHandler.java b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/DependencyHandler.java index a2be32bd7..caebf60ad 100644 --- a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/DependencyHandler.java +++ b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/DependencyHandler.java @@ -35,37 +35,37 @@ public class DependencyHandler /** - * Links the given implementation object to an interface so it can be referenced later. + * Links the given implementation object to an interface, so it can be referenced later. * - * @param depenencyInterface The interface the implementation object should implement. - * @param dependencyImplementation A object that implements the depenencyInterface interface. + * @param dependencyInterface The interface the implementation object should implement. + * @param dependencyImplementation An object that implements the dependencyInterface interface. * @throws IllegalStateException if the implementation object doesn't implement * the interface or the interface has already been bound. */ - public void bind(Class depenencyInterface, Object dependencyImplementation) throws IllegalStateException + public void bind(Class dependencyInterface, Object dependencyImplementation) throws IllegalStateException { // only allow binding before the finishBinding method is called if (bindingFinished) { - throw new IllegalStateException("The dependency [" + depenencyInterface.getSimpleName() + "] cannot be bound, Binding is finished for [" + this.getClass().getSimpleName() + "]. Make sure your bindings are happening before the [bindingFinished] method is being called."); + throw new IllegalStateException("The dependency [" + dependencyInterface.getSimpleName() + "] cannot be bound, Binding is finished for [" + this.getClass().getSimpleName() + "]. Make sure your bindings are happening before the [bindingFinished] method is being called."); } // make sure we haven't already bound this dependency - if (dependencies.containsKey(depenencyInterface)) + if (dependencies.containsKey(dependencyInterface)) { - throw new IllegalStateException("The dependency [" + depenencyInterface.getSimpleName() + "] has already been bound."); + throw new IllegalStateException("The dependency [" + dependencyInterface.getSimpleName() + "] has already been bound."); } // make sure the given dependency implements the necessary interfaces - boolean implementsInterface = checkIfClassImplements(dependencyImplementation.getClass(), depenencyInterface); + boolean implementsInterface = checkIfClassImplements(dependencyImplementation.getClass(), dependencyInterface); boolean implementsBindable = checkIfClassImplements(dependencyImplementation.getClass(), IBindable.class); // display any errors if (!implementsInterface) { - throw new IllegalStateException("The dependency [" + dependencyImplementation.getClass().getSimpleName() + "] doesn't implement the interface [" + depenencyInterface.getSimpleName() + "]."); + throw new IllegalStateException("The dependency [" + dependencyImplementation.getClass().getSimpleName() + "] doesn't implement the interface [" + dependencyInterface.getSimpleName() + "]."); } if (!implementsBindable) { @@ -73,7 +73,7 @@ public class DependencyHandler } - dependencies.put(depenencyInterface, dependencyImplementation); + dependencies.put(dependencyInterface, dependencyImplementation); } /** * Checks if classToTest (or one of its ancestors) diff --git a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/IBindable.java b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/IBindable.java index 2857f0bb1..601e54b72 100644 --- a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/IBindable.java +++ b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/IBindable.java @@ -30,7 +30,7 @@ public interface IBindable /** * Finish initializing this object.

* - * Generally this should just used for getting other objects through + * Generally this should just be used for getting other objects through * dependency injection and is specifically designed to allow * for circular references.

* diff --git a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/ModAccessorHandler.java b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/ModAccessorHandler.java index ce1a9b936..0564b4752 100644 --- a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/ModAccessorHandler.java +++ b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/ModAccessorHandler.java @@ -45,7 +45,7 @@ public class ModAccessorHandler /** - * Links the given mod accessor to an interface so it can be referenced later. + * Links the given mod accessor to an interface, so it can be referenced later. * * @param interfaceClass The interface the mod accessor should implement. * @param modAccessor An object that implements the interfaceClass interface. @@ -56,7 +56,7 @@ public class ModAccessorHandler throws IllegalStateException { dependencyHandler.bind(interfaceClass, modAccessor); - LOGGER.info("Registored mod comatibility accessor for " + modAccessor.getModName()); + LOGGER.info("Registered mod compatibility accessor for " + modAccessor.getModName()); } /** diff --git a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/SingletonHandler.java b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/SingletonHandler.java index ead00ae42..4e4188ca8 100644 --- a/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/SingletonHandler.java +++ b/src/main/java/com/seibel/lod/core/handlers/dependencyInjection/SingletonHandler.java @@ -30,12 +30,14 @@ public class SingletonHandler { private static final DependencyHandler dependencyHandler = new DependencyHandler(); - + // TODO: FIX Javadoc + // This is the exact same javadoc as in DependencyHandler.java + // Ths method doesnt even use dependencyInterface or dependencyImplementation /** - * Links the given implementation object to an interface so it can be referenced later. + * Links the given implementation object to an interface, so it can be referenced later. * - * @param depenencyInterface The interface the implementation object should implement. - * @param dependencyImplementation A object that implements the depenencyInterface interface. + * @param dependencyInterface The interface the implementation object should implement. + * @param dependencyImplementation An object that implements the dependencyInterface interface. * @throws IllegalStateException if the implementation object doesn't implement * the interface or the interface has already been bound. */ diff --git a/src/main/java/com/seibel/lod/core/objects/BlockBiomeCouple.java b/src/main/java/com/seibel/lod/core/objects/BlockBiomeCouple.java index f3f9c838b..922293ef0 100644 --- a/src/main/java/com/seibel/lod/core/objects/BlockBiomeCouple.java +++ b/src/main/java/com/seibel/lod/core/objects/BlockBiomeCouple.java @@ -29,8 +29,8 @@ import java.util.concurrent.ConcurrentMap; public class BlockBiomeCouple { - public static final ConcurrentMap noBiomeIstanceCache = new ConcurrentHashMap<>(); - public static ConcurrentMap> withBiomeIstanceCache = new ConcurrentHashMap<>(); + public static final ConcurrentMap noBiomeInstanceCache = new ConcurrentHashMap<>(); + public static ConcurrentMap> withBiomeInstanceCache = new ConcurrentHashMap<>(); String blockName; String biomeName; @@ -43,14 +43,14 @@ public class BlockBiomeCouple } public static BlockBiomeCouple getBlockBiomeCouple(IBlockColorWrapper blockColor){ - if(noBiomeIstanceCache.containsKey(blockColor)) + if(noBiomeInstanceCache.containsKey(blockColor)) { - return noBiomeIstanceCache.get(blockColor); + return noBiomeInstanceCache.get(blockColor); } else { BlockBiomeCouple couple = new BlockBiomeCouple(blockColor); - noBiomeIstanceCache.put(blockColor,couple); + noBiomeInstanceCache.put(blockColor,couple); return couple; } } @@ -62,9 +62,9 @@ public class BlockBiomeCouple } else { - if(withBiomeIstanceCache.containsKey(biomeColor)) + if(withBiomeInstanceCache.containsKey(biomeColor)) { - withBiomeIstanceCache.put(biomeColor, new ConcurrentHashMap<>()); + withBiomeInstanceCache.put(biomeColor, new ConcurrentHashMap<>()); } ConcurrentMap blockToCoupleMap = withBiomeIstanceCache.get(biomeColor); if(blockToCoupleMap.containsKey(blockColor)) diff --git a/src/main/java/com/seibel/lod/core/objects/PosToRenderContainer.java b/src/main/java/com/seibel/lod/core/objects/PosToRenderContainer.java index 16a453281..3e94795af 100644 --- a/src/main/java/com/seibel/lod/core/objects/PosToRenderContainer.java +++ b/src/main/java/com/seibel/lod/core/objects/PosToRenderContainer.java @@ -144,7 +144,7 @@ public class PosToRenderContainer public int getNthPosZ(int n) { return lodPosList[n].posZ; - //eturn posToRender[n * 3 + 2]; + //return posToRender[n * 3 + 2]; } public void sort() { diff --git a/src/main/java/com/seibel/lod/core/objects/lod/LodDimension.java b/src/main/java/com/seibel/lod/core/objects/lod/LodDimension.java index 79e2b8851..6ceab899a 100644 --- a/src/main/java/com/seibel/lod/core/objects/lod/LodDimension.java +++ b/src/main/java/com/seibel/lod/core/objects/lod/LodDimension.java @@ -19,7 +19,6 @@ package com.seibel.lod.core.objects.lod; -import com.seibel.lod.core.api.internal.InternalApiShared; import com.seibel.lod.core.api.internal.ClientApi; import com.seibel.lod.core.enums.config.DistanceGenerationMode; import com.seibel.lod.core.enums.config.DropoffQuality; @@ -232,11 +231,11 @@ public class LodDimension regions[xIndex][zIndex] = newRegion; }*/ - public interface PosComsumer { + public interface PosConsumer { void run(int x, int z); } - public void iterateWithSpiral(PosComsumer r) { + public void iterateWithSpiral(PosConsumer r) { int ox,oy,dx,dy; ox = oy = dx = 0; dy = -1; @@ -258,7 +257,7 @@ public class LodDimension oy += dy; } } - public void iterateByDistance(PosComsumer r) { + public void iterateByDistance(PosConsumer r) { if (iteratorList==null) return; for (RegionPos relativePos : iteratorList) { r.run(relativePos.x+halfWidth, relativePos.z+halfWidth); @@ -468,7 +467,7 @@ public class LodDimension posToGenerate = new PosToGenerateContainer(maxDataToGenerate, playerBlockPosX, playerBlockPosZ); - // This ensures that we don't spawn way too much regions without finish flushing them first. + // This ensures that we don't spawn way too many regions without finish flushing them first. //if (dirtiedRegionsRoughCount > 16) return posToGenerate; GenerationPriority allowedPriority = dirtiedRegionsRoughCount>12 ? GenerationPriority.NEAR_FIRST : priority; Pos2D minPos = regions.getMinInRange(); diff --git a/src/main/java/com/seibel/lod/core/objects/lod/LodRegion.java b/src/main/java/com/seibel/lod/core/objects/lod/LodRegion.java index d91c883e6..0becd2634 100644 --- a/src/main/java/com/seibel/lod/core/objects/lod/LodRegion.java +++ b/src/main/java/com/seibel/lod/core/objects/lod/LodRegion.java @@ -111,7 +111,7 @@ public class LodRegion { * @return true if the data was added successfully */ public boolean addData(byte detailLevel, int posX, int posZ, int verticalIndex, long data) { - if(isWriting.get()<=0) throw new ConcurrentModificationException("isWriting counter lock should have been aquired!"); + if(isWriting.get()<=0) throw new ConcurrentModificationException("isWriting counter lock should have been acquired!"); posX = LevelPosUtil.getRegionModule(detailLevel, posX); posZ = LevelPosUtil.getRegionModule(detailLevel, posZ); @@ -132,7 +132,7 @@ public class LodRegion { * @return true if the data was added successfully */ public boolean addVerticalData(byte detailLevel, int posX, int posZ, long[] data, boolean override) { - if(isWriting.get()<=0) throw new ConcurrentModificationException("isWriting counter lock should have been aquired!"); + if(isWriting.get()<=0) throw new ConcurrentModificationException("isWriting counter lock should have been acquired!"); posX = LevelPosUtil.getRegionModule(detailLevel, posX); posZ = LevelPosUtil.getRegionModule(detailLevel, posZ); @@ -156,7 +156,7 @@ public class LodRegion { * @return true if the data was added successfully */ public boolean addChunkOfData(byte detailLevel, int posX, int posZ, int widthX, int widthZ, long[] data, int verticalSize, boolean override) { - if(isWriting.get()<=0) throw new ConcurrentModificationException("isWriting counter lock should have been aquired!"); + if(isWriting.get()<=0) throw new ConcurrentModificationException("isWriting counter lock should have been acquired!"); posX = LevelPosUtil.getRegionModule(detailLevel, posX); posZ = LevelPosUtil.getRegionModule(detailLevel, posZ); @@ -183,7 +183,7 @@ public class LodRegion { );*/ } - if (!doesDataExist(detailLevel, posX, posZ, DistanceGenerationMode.values()[DataPointUtil.getGenerationMode(data[0]) - 1])) { //FIXME: -1 casue NONE has value of 1 but slot of 0 + if (!doesDataExist(detailLevel, posX, posZ, DistanceGenerationMode.values()[DataPointUtil.getGenerationMode(data[0]) - 1])) { //FIXME: -1 case NONE has value of 1 but slot of 0 throw new RuntimeException("Data still doesn't exist after addChunkOfData!"); } @@ -419,8 +419,8 @@ public class LodRegion { } /** - * This method will fill the posToRender array with all levelPos that are - * render-able. But the entire region try use the same detail level. + * This method will fill the posToRender array with all levelPos that are render-able, + * but the entire region try to use the same detail level. */ private void getPosToRenderFlat(PosToRenderContainer posToRender, byte detailLevel, int offsetPosX, int offsetPosZ, byte targetLevel, byte farModeSwitchLevel) { diff --git a/src/main/java/com/seibel/lod/core/objects/lod/VerticalLevelContainer.java b/src/main/java/com/seibel/lod/core/objects/lod/VerticalLevelContainer.java index ee775ad70..3d2a839bd 100644 --- a/src/main/java/com/seibel/lod/core/objects/lod/VerticalLevelContainer.java +++ b/src/main/java/com/seibel/lod/core/objects/lod/VerticalLevelContainer.java @@ -47,7 +47,7 @@ public class VerticalLevelContainer implements LevelContainer public final long[] dataContainer; - //Currently these variable are not used. We are going to use them in the new data format + //Currently, these variable are not used. We are going to use them in the new data format public final int[] verticalDataContainer = null; public final int[] colorDataContainer = null; public final byte[] lightDataContainer = null; diff --git a/src/main/java/com/seibel/lod/core/objects/math/Mat4f.java b/src/main/java/com/seibel/lod/core/objects/math/Mat4f.java index 2c15739a6..035734ef3 100644 --- a/src/main/java/com/seibel/lod/core/objects/math/Mat4f.java +++ b/src/main/java/com/seibel/lod/core/objects/math/Mat4f.java @@ -215,8 +215,8 @@ public class Mat4f this.m33 = 1.0F; } - /** adjugate and determinate */ - public float adjugateAndDet() + /** adjudicate and determinate */ + public float adjudicateAndDet() { float f = this.m00 * this.m11 - this.m01 * this.m10; float f1 = this.m00 * this.m12 - this.m02 * this.m10; @@ -289,7 +289,7 @@ public class Mat4f public boolean invert() { - float det = this.adjugateAndDet(); + float det = this.adjudicateAndDet(); if (Math.abs(det) > 1.0E-6F) { this.multiply(det); diff --git a/src/main/java/com/seibel/lod/core/objects/opengl/LodBox.java b/src/main/java/com/seibel/lod/core/objects/opengl/LodBox.java index c309403f3..6574cf231 100644 --- a/src/main/java/com/seibel/lod/core/objects/opengl/LodBox.java +++ b/src/main/java/com/seibel/lod/core/objects/opengl/LodBox.java @@ -177,7 +177,7 @@ public class LodBox short height = DataPointUtil.getHeight(adjPoint); short depth = DataPointUtil.getDepth(adjPoint); - // If the depth of said block is higher then our max Y, continue + // If the depth of said block is higher than our max Y, continue // Basically: y < maxY <= _____ height // _______&&: y < maxY <= depth if (y + wy <= depth) diff --git a/src/main/java/com/seibel/lod/core/objects/opengl/LodVertexFormat.java b/src/main/java/com/seibel/lod/core/objects/opengl/LodVertexFormat.java index fb3021c32..7287a2846 100644 --- a/src/main/java/com/seibel/lod/core/objects/opengl/LodVertexFormat.java +++ b/src/main/java/com/seibel/lod/core/objects/opengl/LodVertexFormat.java @@ -92,8 +92,8 @@ public class LodVertexFormat } else if (obj != null && this.getClass() == obj.getClass()) { - LodVertexFormat vertexformat = (LodVertexFormat) obj; - return this.byteSize == vertexformat.byteSize && this.elements.equals(vertexformat.elements); + LodVertexFormat vertexFormat = (LodVertexFormat) obj; + return this.byteSize == vertexFormat.byteSize && this.elements.equals(vertexFormat.elements); } else { diff --git a/src/main/java/com/seibel/lod/core/objects/opengl/RenderBuffer.java b/src/main/java/com/seibel/lod/core/objects/opengl/RenderBuffer.java index 0842cf8ce..c37f2ceff 100644 --- a/src/main/java/com/seibel/lod/core/objects/opengl/RenderBuffer.java +++ b/src/main/java/com/seibel/lod/core/objects/opengl/RenderBuffer.java @@ -91,7 +91,7 @@ public abstract class RenderBuffer implements AutoCloseable /* Called on being reused after the object is swapped to the back * and a new build event is triggered. Used for cleaning up non * reusable objects sooner. - * Note: This is ran on BUILDER thread, and does not have access to + * Note: This is run on BUILDER thread, and does not have access to * GL Context, Use GLProxy.recordOpenGlCall() to access GL Context * instead! */ public void onReuse() {} @@ -111,11 +111,11 @@ public abstract class RenderBuffer implements AutoCloseable /* Called on buffer no longer being used. (Life ended) * Return false if current object cannot be reused. - * Note: This should not do too much stuff as it is ran on render thread! + * Note: This should not do too much stuff as it is run on render thread! * The corresponding cleanups should be done using the onReuse() to prevent * lag spikes! If you want this buffer to not be reused, but cleanup is * expensive, use onReuse() instead! - * Note 2: This may not be triggered on some siturations like renderer being + * Note 2: This may not be triggered on some situations like renderer being * terminated, or dimension changed. So implementation should NEVER assume * that onSwapToFront() will link to a call of onSwapToBack()! */ public boolean onSwapToBack() {return true;} diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/IVersionConstants.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/IVersionConstants.java index 3e40b7bb0..2eb8a58ec 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/IVersionConstants.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/IVersionConstants.java @@ -32,10 +32,10 @@ import com.seibel.lod.core.handlers.dependencyInjection.IBindable; */ public interface IVersionConstants extends IBindable { - /** @returns the minimum height blocks can be generated */ + /** @return the minimum height blocks can be generated */ int getMinimumWorldHeight(); - /** @Returns the number of generations call per thread. */ + /** @return the number of generations call per thread. */ default int getWorldGenerationCountPerThread() { return 8; } diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftClientWrapper.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftClientWrapper.java index ed5923d5c..bd135af69 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftClientWrapper.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftClientWrapper.java @@ -84,7 +84,7 @@ public interface IMinecraftClientWrapper extends IBindable /** * Attempts to get the ServerWorld for the dimension * the user is currently in. - * @returns null if no ServerWorld is available + * @return null if no ServerWorld is available */ IWorldWrapper getWrappedServerWorld();