From 22d959276548b527fe7b55261efab0ff8a338f2d Mon Sep 17 00:00:00 2001 From: MehVahdJukaar Date: Thu, 23 Jan 2025 01:13:48 +0100 Subject: [PATCH] Update BlockTypeRegistry.java --- .../net/mehvahdjukaar/moonlight/api/set/BlockTypeRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }