From 7f2f97aa2c41b57e1759a23deccb4d4c2ad695ea Mon Sep 17 00:00:00 2001 From: dima_dencep Date: Mon, 10 Jun 2024 10:41:26 +0700 Subject: [PATCH] Fix some bug, can't remember which one --- .../iris/shaderpack/materialmap/BlockMaterialMapping.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/irisshaders/iris/shaderpack/materialmap/BlockMaterialMapping.java b/src/main/java/net/irisshaders/iris/shaderpack/materialmap/BlockMaterialMapping.java index c80d8f3cc4..1ee4ba3da3 100644 --- a/src/main/java/net/irisshaders/iris/shaderpack/materialmap/BlockMaterialMapping.java +++ b/src/main/java/net/irisshaders/iris/shaderpack/materialmap/BlockMaterialMapping.java @@ -42,9 +42,9 @@ public static Map, ChunkRenderTypeSet> createBlockTypeMa blockPropertiesMap.forEach((id, blockType) -> { ResourceLocation resourceLocation = new ResourceLocation(id.getNamespace(), id.getName()); - Holder.Reference block = ForgeRegistries.BLOCKS.getDelegateOrThrow(resourceLocation); - - blockTypeIds.put(block, ChunkRenderTypeSet.of(convertBlockToRenderType(blockType))); + ForgeRegistries.BLOCKS.getDelegate(resourceLocation).ifPresent( + block -> blockTypeIds.put(block, ChunkRenderTypeSet.of(convertBlockToRenderType(blockType))) + ); }); return blockTypeIds;