diff --git a/common/src/main/java/net/mehvahdjukaar/moonlight/api/set/BlockTypeRegistry.java b/common/src/main/java/net/mehvahdjukaar/moonlight/api/set/BlockTypeRegistry.java index ab02af00..36153f97 100644 --- a/common/src/main/java/net/mehvahdjukaar/moonlight/api/set/BlockTypeRegistry.java +++ b/common/src/main/java/net/mehvahdjukaar/moonlight/api/set/BlockTypeRegistry.java @@ -166,7 +166,7 @@ public T getBlockTypeOf(ItemLike itemLike) { if (itemLike instanceof Block b) { Item item = b.asItem(); if (item == Items.AIR) { - throw new IllegalStateException("Block " + b + " has no item. This likely means getBlockTypeOf was called too early. This is a bug"); + return null; } return childrenToType.get(item); }