Skip to content

Commit

Permalink
Skip TGS recipes with null sapling (GTNewHorizons#3912)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Feb 7, 2025
1 parent cb7a1dd commit fb23af9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,10 @@ public static void registerTreeProducts(ItemStack sapling, ItemStack log, ItemSt
*/
public static void registerTreeProducts(ItemStack saplingIn, ItemStack log, ItemStack saplingOut, ItemStack leaves,
ItemStack fruit) {
if (saplingIn == null) {
Logger.ERROR("Null sapling passed for registerTreeProducts()");
return;
}
String key = Item.itemRegistry.getNameForObject(saplingIn.getItem()) + ":" + saplingIn.getItemDamage();
EnumMap<Mode, ItemStack> map = new EnumMap<>(Mode.class);
if (log != null) map.put(Mode.LOG, log);
Expand Down

0 comments on commit fb23af9

Please sign in to comment.