Remove debug disable lighting engine configs

This commit is contained in:
James Seibel
2023-08-31 21:43:17 -05:00
parent c28ec12983
commit 9ba1b18fac
3 changed files with 11 additions and 35 deletions
@@ -1111,20 +1111,6 @@ public class Config
.set(ExampleConfigScreen.class)
.build();
public static ConfigEntry<Boolean> disableDhLightingEngine = new ConfigEntry.Builder<Boolean>()
.set(false)
.comment(""
+ "Temporary, only for testing."
+ "")
.build();
public static ConfigEntry<Boolean> disableChunkWrapperLightBaking = new ConfigEntry.Builder<Boolean>()
.set(false)
.comment(""
+ "Temporary, only for testing."
+ "")
.build();
/** This class is used to debug the different features of the config GUI */
// FIXME: WARNING: Some of the options in this class dont get show n in the default UI
@@ -39,13 +39,6 @@ public class DhLightingEngine
*/
public void lightChunk(IChunkWrapper centerChunk, List<IChunkWrapper> nearbyChunkList, int maxSkyLight)
{
if (Config.Client.Advanced.Debugging.disableDhLightingEngine.get())
{
centerChunk.setIsDhLightCorrect(true);
return;
}
DhChunkPos centerChunkPos = centerChunk.getChunkPos();
AdjacentChunkHolder adjacentChunkHolder = new AdjacentChunkHolder(centerChunk);
@@ -75,23 +75,20 @@ public interface IChunkWrapper extends IBindable
*/
default void bakeDhLightingUsingMcLightingEngine() throws IllegalStateException
{
if (!Config.Client.Advanced.Debugging.disableChunkWrapperLightBaking.get())
if (!this.isLightCorrect())
{
if (!this.isLightCorrect())
throw new IllegalStateException("Unable to bake lighting for for chunk [" + this.getChunkPos() + "], Minecraft lighting not valid.");
}
// get the lighting for every relative block pos
for (int relX = 0; relX < LodUtil.CHUNK_WIDTH; relX++)
{
for (int relZ = 0; relZ < LodUtil.CHUNK_WIDTH; relZ++)
{
throw new IllegalStateException("Unable to bake lighting for for chunk [" + this.getChunkPos() + "], Minecraft lighting not valid.");
}
// get the lighting for every relative block pos
for (int relX = 0; relX < LodUtil.CHUNK_WIDTH; relX++)
{
for (int relZ = 0; relZ < LodUtil.CHUNK_WIDTH; relZ++)
for (int y = this.getMinBuildHeight(); y < this.getMaxBuildHeight(); y++)
{
for (int y = this.getMinBuildHeight(); y < this.getMaxBuildHeight(); y++)
{
this.setDhSkyLight(relX, y, relZ, this.getSkyLight(relX, y, relZ));
this.setDhBlockLight(relX, y, relZ, this.getBlockLight(relX, y, relZ));
}
this.setDhSkyLight(relX, y, relZ, this.getSkyLight(relX, y, relZ));
this.setDhBlockLight(relX, y, relZ, this.getBlockLight(relX, y, relZ));
}
}
}