Skip to content

Commit 7f2f97a

Browse files
committed
Fix some bug, can't remember which one
1 parent 3595aa0 commit 7f2f97a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/net/irisshaders/iris/shaderpack/materialmap/BlockMaterialMapping.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public static Map<Holder.Reference<Block>, ChunkRenderTypeSet> createBlockTypeMa
4242
blockPropertiesMap.forEach((id, blockType) -> {
4343
ResourceLocation resourceLocation = new ResourceLocation(id.getNamespace(), id.getName());
4444

45-
Holder.Reference<Block> block = ForgeRegistries.BLOCKS.getDelegateOrThrow(resourceLocation);
46-
47-
blockTypeIds.put(block, ChunkRenderTypeSet.of(convertBlockToRenderType(blockType)));
45+
ForgeRegistries.BLOCKS.getDelegate(resourceLocation).ifPresent(
46+
block -> blockTypeIds.put(block, ChunkRenderTypeSet.of(convertBlockToRenderType(blockType)))
47+
);
4848
});
4949

5050
return blockTypeIds;

0 commit comments

Comments
 (0)