From 00abfb735ab65e5b653480f97e898409f1fea17a Mon Sep 17 00:00:00 2001 From: James Seibel Date: Wed, 28 Jan 2026 07:47:35 -0600 Subject: [PATCH] Remove several TODOs --- .../common/commonMixins/MixinChunkMapCommon.java | 4 ---- .../common/wrappers/block/BiomeWrapper.java | 1 - .../common/wrappers/block/ClientBlockStateColorCache.java | 2 +- .../common/wrappers/chunk/ChunkWrapper.java | 7 ++++--- .../common/wrappers/gui/updater/ChangelogScreen.java | 2 -- .../common/wrappers/misc/LightMapWrapper.java | 8 ++++---- .../worldGeneration/mimicObject/DhLitWorldGenRegion.java | 7 ------- 7 files changed, 9 insertions(+), 22 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/commonMixins/MixinChunkMapCommon.java b/common/src/main/java/com/seibel/distanthorizons/common/commonMixins/MixinChunkMapCommon.java index 25634c1e5..1a9f2d0ec 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/commonMixins/MixinChunkMapCommon.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/commonMixins/MixinChunkMapCommon.java @@ -29,10 +29,6 @@ public class MixinChunkMapCommon return; } - // TODO are the following validations necessary since we are checking above if - // the callback return value should state if the chunk was actually saved or not? - // Do we trust it to always be correct? - // corrupt/incomplete chunk validation // diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java index b843805de..1253f9131 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java @@ -258,7 +258,6 @@ public class BiomeWrapper implements IBiomeWrapper return this.serialString; } - // TODO would it be worth while to cache these objects in a ConcurrentHashMap? public static IBiomeWrapper deserialize(String resourceLocationString, ILevelWrapper levelWrapper) throws IOException { // we need the final string for the concurrent hash map later diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/ClientBlockStateColorCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/ClientBlockStateColorCache.java index 0e5b58d8a..6f0108895 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/ClientBlockStateColorCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/ClientBlockStateColorCache.java @@ -322,7 +322,7 @@ public class ClientBlockStateColorCache return quads; } - //TODO: Perhaps make this not just use the first frame? + /** if multiple frames are present, just the first one will be used */ private static int calculateColorFromTexture(TextureAtlasSprite texture, EColorMode colorMode) { int count = 0; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java index 0d6b86b6c..6825f5236 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java @@ -371,7 +371,6 @@ public class ChunkWrapper implements IChunkWrapper blockPos.setY(relY); blockPos.setZ(relZ); - // TODO copy into pooled array, this isn't thread safe and can cause MC to throw errors if the chunk is loaded return BlockStateWrapper.fromBlockState(this.chunk.getBlockState(blockPos), this.wrappedLevel); } @@ -413,8 +412,10 @@ public class ChunkWrapper implements IChunkWrapper LevelChunkSection section = sections[i]; if (section != null) { - // TODO implement section cloning for older MC versions, only 1.21.4 MC (and maybe other semi recent versions) have a clean way to handle this - // TODO we probably want a wrapper object instead + // Implementation notes: + // implement section cloning for older MC versions, only 1.21.4 MC (and maybe other semi recent versions) have a clean way to handle this + // we probably want a wrapper object instead + #if MC_VER < MC_1_21_4 this.levelChunkSections[i] = section; #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java index 448285ed4..d234b960c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java @@ -37,8 +37,6 @@ import java.util.*; * * @author coolGi */ -// TODO: After finishing the config, rewrite this in openGL as well -// TODO: Make this public class ChangelogScreen extends DhScreen { private static final DhLogger LOGGER = new DhLoggerBuilder().build(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java index 838494d4c..8ed914f54 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java @@ -52,7 +52,7 @@ public class LightMapWrapper implements ILightMapWrapper public void uploadLightmap(NativeImage image) { - #if MC_VER < MC_1_21_5 + #if MC_VER < MC_1_21_3 int currentTexture = GLMC.getActiveTexture(); if (this.textureId == 0) { @@ -71,18 +71,18 @@ public class LightMapWrapper implements ILightMapWrapper GLMC.glBindTexture(currentTexture); } #else - throw new UnsupportedOperationException("setLightmapId should be used for MC versions after 1.21.5"); // TODO that MC version number is wrong, when did we actually start using setLightmapId()? + throw new UnsupportedOperationException("setLightmapId should be used for MC versions after 1.21.3"); #endif } private void createLightmap(NativeImage image) { - #if MC_VER < MC_1_21_5 + #if MC_VER < MC_1_21_3 this.textureId = GLMC.glGenTextures(); GLMC.glBindTexture(this.textureId); GL32.glTexImage2D(GL32.GL_TEXTURE_2D, 0, image.format().glFormat(), image.getWidth(), image.getHeight(), 0, image.format().glFormat(), GL32.GL_UNSIGNED_BYTE, (ByteBuffer) null); #else - throw new UnsupportedOperationException("setLightmapId should be used for MC versions after 1.21.5"); // TODO that MC version number is wrong, when did we actually start using setLightmapId()? + throw new UnsupportedOperationException("setLightmapId should be used for MC versions after 1.21.3"); #endif } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java index edbc927ef..5b77e85e6 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java @@ -216,13 +216,6 @@ public class DhLitWorldGenRegion extends WorldGenRegion public LevelTickAccess getFluidTicks() { return BlackholeTickAccess.emptyLevelList(); } #endif - // TODO Check this -// @Override -// public List> startsForFeature(SectionPos sectionPos, -// StructureFeature structureFeature) { -// return structFeat.startsForFeature(sectionPos, structureFeature); -// } - // Skip updating the related tile entities @Override public boolean setBlock(BlockPos blockPos, BlockState blockState, int i, int j)