From a1defb77127d937ce4de12a559c07cecb893cbf9 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Mon, 14 Aug 2023 22:53:34 -0600 Subject: [PATCH] Fix a crash with Farmer's Delight --- .../pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java | 2 +- .../pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java b/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java index 95a28bfcf..a77c39437 100644 --- a/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java +++ b/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java @@ -29,7 +29,7 @@ public void generateTags() { stoves.addAll(IronStoveBlock.streamIronStoves().map(FurnitureBlock::getBlock).toList()); stoves.add(PaladinFurnitureModBlocksItems.KITCHEN_STOVETOP); PFMTagProvider.getOrCreateTagBuilder(HEAT_SOURCES) - .add(stoves.stream().map(block -> Registries.BLOCK.getKey(block).or(null).get()).toArray(RegistryKey[]::new)); + .add(stoves.toArray(new Block[0])); } @Override diff --git a/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java b/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java index ddbe15669..48da74bcd 100644 --- a/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java +++ b/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java @@ -29,7 +29,7 @@ public void generateTags() { stoves.addAll(IronStoveBlock.streamIronStoves().map(FurnitureBlock::getBlock).toList()); stoves.add(PaladinFurnitureModBlocksItems.KITCHEN_STOVETOP); PFMTagProvider.getOrCreateTagBuilder(HEAT_SOURCES) - .add(stoves.stream().map(block -> Registries.BLOCK.getKey(block).or(null).get()).toArray(RegistryKey[]::new)); + .add(stoves.toArray(new Block[0])); } @Override