diff --git a/src/main/java/xyz/bluspring/kilt/forgeinjects/world/item/alchemy/PotionBrewingInject.java b/src/main/java/xyz/bluspring/kilt/forgeinjects/world/item/alchemy/PotionBrewingInject.java index da57c1e0..7d58b141 100644 --- a/src/main/java/xyz/bluspring/kilt/forgeinjects/world/item/alchemy/PotionBrewingInject.java +++ b/src/main/java/xyz/bluspring/kilt/forgeinjects/world/item/alchemy/PotionBrewingInject.java @@ -72,11 +72,11 @@ public static abstract class MixInject implements PotionBrewingMixInjection) ForgeRegistries.POTIONS.getDelegateOrThrow(fromPotion); - this.kilt$to = (Holder.Reference) ForgeRegistries.POTIONS.getDelegateOrThrow(toPotion); + ForgeRegistries.POTIONS.getDelegate(fromPotion).ifPresent(potion -> this.kilt$from = (Holder.Reference) potion); + ForgeRegistries.POTIONS.getDelegate(toPotion).ifPresent(potion -> this.kilt$to = (Holder.Reference) potion); } else if (from instanceof Item fromItem && to instanceof Item toItem) { - this.kilt$from = (Holder.Reference) ForgeRegistries.ITEMS.getDelegateOrThrow(fromItem); - this.kilt$to = (Holder.Reference) ForgeRegistries.ITEMS.getDelegateOrThrow(toItem); + ForgeRegistries.ITEMS.getDelegate(fromItem).ifPresent(item -> this.kilt$from = (Holder.Reference) item); + ForgeRegistries.ITEMS.getDelegate(toItem).ifPresent(item -> this.kilt$to = (Holder.Reference) item); } }