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 ff03efcab..63fd98561 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 @@ -20,6 +20,7 @@ package com.seibel.distanthorizons.common.wrappers.block; import java.io.IOException; +import java.util.HashSet; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -74,6 +75,9 @@ public class BiomeWrapper implements IBiomeWrapper public static final String EMPTY_STRING = "EMPTY"; 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 BrokenResourceLocationStrings = new HashSet<>(); + // properties // @@ -266,7 +270,11 @@ public class BiomeWrapper implements IBiomeWrapper if (!success) { - LOGGER.warn("Unable to deserialize biome from string: [" + resourceLocationString + "]"); + if (!BrokenResourceLocationStrings.contains(resourceLocationString)) + { + BrokenResourceLocationStrings.add(resourceLocationString); + LOGGER.warn("Unable to deserialize biome from string: [" + resourceLocationString + "]"); + } return EMPTY_WRAPPER; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java index 87fcfc854..ccd1e4fe2 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java @@ -67,9 +67,11 @@ public class BlockStateWrapper implements IBlockStateWrapper // TODO: Make this changeable through the config public static final String[] RENDERER_IGNORED_BLOCKS_RESOURCE_LOCATIONS = { AIR_STRING, "minecraft:barrier", "minecraft:structure_void", "minecraft:light", "minecraft:tripwire" }; - public static HashSet rendererIgnoredBlocks = null; + /** keep track of broken blocks so we don't log every time */ + private static final HashSet BrokenResourceLocations = new HashSet<>(); + // properties // @@ -347,7 +349,11 @@ public class BlockStateWrapper implements IBlockStateWrapper if (block == null) { // shouldn't normally happen, but here to make the compiler happy - LOGGER.warn("Unable to find BlockState with the resourceLocation [" + resourceLocation + "] and properties: [" + blockStatePropertiesString + "]. Air will be used instead, some data may be lost."); + if (!BrokenResourceLocations.contains(resourceLocation)) + { + BrokenResourceLocations.add(resourceLocation); + LOGGER.warn("Unable to find BlockState with the resourceLocation [" + resourceLocation + "] and properties: [" + blockStatePropertiesString + "]. Air will be used instead, some data may be lost."); + } return AIR; } @@ -374,7 +380,11 @@ public class BlockStateWrapper implements IBlockStateWrapper if (blockStatePropertiesString != null) { // we should have found a blockstate, but didn't - LOGGER.warn("Unable to find BlockState for Block [" + resourceLocation + "] with properties: [" + blockStatePropertiesString + "]. Using the default block state."); + if (!BrokenResourceLocations.contains(resourceLocation)) + { + BrokenResourceLocations.add(resourceLocation); + LOGGER.warn("Unable to find BlockState for Block [" + resourceLocation + "] with properties: [" + blockStatePropertiesString + "]. Using the default block state."); + } } foundState = block.defaultBlockState(); diff --git a/coreSubProjects b/coreSubProjects index 0b3958eb5..d07a28532 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 0b3958eb58386e76fd380e161cc22e251ad113b0 +Subproject commit d07a2853239e4ff1a9e04793a9a4fc054248cd42