diff --git a/build.gradle b/build.gradle index 959ba3683..b56f1e137 100644 --- a/build.gradle +++ b/build.gradle @@ -234,7 +234,7 @@ subprojects { p -> forgeShadowMe("io.netty:netty-all:${rootProject.netty_version}") // Remember, for lwjgl dependencies that arent included in Minecraft, you need to also need to add it to the ShadowJar thing - forgeShadowMe("org.lwjgl:lwjgl-jawt:3.2.2") { + forgeShadowMe("org.lwjgl:lwjgl-jawt:${rootProject.lwjgl_version}") { exclude group: "org.lwjgl", module: "lwjgl" // This module is imported by Minecraft so exclude it } 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 f43e3913a..2e762bc17 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 91e47ab14..8faa8af9c 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 // @@ -345,7 +347,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; } @@ -372,7 +378,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 880abd012..9cfcf37fb 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 880abd012498c932ea5f74b3063bc4270be78a66 +Subproject commit 9cfcf37fb327bcaca4f4b350d9a9a600128d227b diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java index 30f106ffd..90c39bfcd 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java @@ -47,8 +47,6 @@ import net.minecraftforge.event.level.LevelEvent; #if POST_MC_1_18_2 import net.minecraftforge.client.event.RenderLevelStageEvent; -#else -import net.minecraftforge.client.event.RenderBlockOverlayEvent; #endif import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraft.world.level.chunk.ChunkAccess; @@ -304,7 +302,7 @@ public class ForgeClientProxy #if POST_MC_1_18_2 public void afterLevelRenderEvent(RenderLevelStageEvent event) #else - public void afterLevelRenderEvent(RenderBlockOverlayEvent event) + public void afterLevelRenderEvent(TickEvent.RenderTickEvent event) #endif { #if POST_MC_1_20_1 @@ -314,7 +312,7 @@ public class ForgeClientProxy #else // FIXME: Is this the correct location for 1.16 & 1.17??? // I couldnt find anything for rendering after the level, so is rendering after overlays ok? - if (event.getOverlayType() == RenderBlockOverlayEvent.OverlayType.BLOCK) + if (event.type.equals(TickEvent.RenderTickEvent.Type.WORLD)) #endif { try diff --git a/gradle.properties b/gradle.properties index d03773735..74344b113 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,7 +27,7 @@ sqlite_jdbc_version=3.43.0.0 # Minecraft related libaries (included in MC's jar) log4j_version=2.20.0 netty_version=4.1.94.Final -lwjgl_version=3.2.3 +lwjgl_version=3.3.1 joml_version=1.10.2