From 5d25a5667543fa14cad412dfed13efea9c246a4d Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Sun, 24 Dec 2023 14:24:52 -0600 Subject: [PATCH] fix weird item group crash --- .../unlikepaladin/pfm/fabric/PaladinFurnitureModFabric.java | 3 ++- .../pfm/registry/forge/ItemGroupRegistryForge.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fabric/src/main/java/com/unlikepaladin/pfm/fabric/PaladinFurnitureModFabric.java b/fabric/src/main/java/com/unlikepaladin/pfm/fabric/PaladinFurnitureModFabric.java index 4a099b015..87d0bfda7 100644 --- a/fabric/src/main/java/com/unlikepaladin/pfm/fabric/PaladinFurnitureModFabric.java +++ b/fabric/src/main/java/com/unlikepaladin/pfm/fabric/PaladinFurnitureModFabric.java @@ -9,6 +9,7 @@ import com.unlikepaladin.pfm.config.PaladinFurnitureModConfig; import com.unlikepaladin.pfm.config.option.AbstractConfigOption; import com.unlikepaladin.pfm.data.materials.DynamicBlockRegistry; +import com.unlikepaladin.pfm.data.materials.WoodVariantRegistry; import com.unlikepaladin.pfm.mixin.PFMMixinPointOfInterestTypeFactory; import com.unlikepaladin.pfm.registry.*; import com.unlikepaladin.pfm.registry.dynamic.LateBlockRegistry; @@ -119,7 +120,7 @@ public static void onServerJoin(ServerPlayNetworkHandler handler, PacketSender s public static void initializeItemGroup() { PaladinFurnitureMod.FURNITURE_GROUP = FabricItemGroupBuilder.build( new Identifier(MOD_ID, "furniture"), - () -> PaladinFurnitureModBlocksItems.furnitureEntryMap.get(BasicChairBlock.class).getFromVanillaWoodType(BoatEntity.Type.OAK, true).asItem().getDefaultStack()); + () -> PaladinFurnitureModBlocksItems.furnitureEntryMap.get(BasicChairBlock.class).getVariantToBlockMap().get(WoodVariantRegistry.OAK).asItem().getDefaultStack()); } public static void replaceHomePOI() { diff --git a/forge/src/main/java/com/unlikepaladin/pfm/registry/forge/ItemGroupRegistryForge.java b/forge/src/main/java/com/unlikepaladin/pfm/registry/forge/ItemGroupRegistryForge.java index e4e338514..026a4ca82 100644 --- a/forge/src/main/java/com/unlikepaladin/pfm/registry/forge/ItemGroupRegistryForge.java +++ b/forge/src/main/java/com/unlikepaladin/pfm/registry/forge/ItemGroupRegistryForge.java @@ -3,6 +3,8 @@ import com.unlikepaladin.pfm.PaladinFurnitureMod; import com.unlikepaladin.pfm.blocks.BasicChairBlock; +import com.unlikepaladin.pfm.data.materials.WoodVariant; +import com.unlikepaladin.pfm.data.materials.WoodVariantRegistry; import com.unlikepaladin.pfm.registry.PaladinFurnitureModBlocksItems; import net.minecraft.entity.vehicle.BoatEntity; import net.minecraft.item.ItemGroup; @@ -19,7 +21,7 @@ public static void registerItemGroups(){ PaladinFurnitureMod.FURNITURE_GROUP = new ItemGroup(MOD_ID + ".furniture") { @Override public ItemStack createIcon() { - return PaladinFurnitureModBlocksItems.furnitureEntryMap.get(BasicChairBlock.class).getFromVanillaWoodType(BoatEntity.Type.OAK, true).asItem().getDefaultStack(); + return PaladinFurnitureModBlocksItems.furnitureEntryMap.get(BasicChairBlock.class).getVariantToBlockMap().get(WoodVariantRegistry.OAK).asItem().getDefaultStack(); } }; PaladinFurnitureMod.DYE_KITS = new ItemGroup(MOD_ID + ".dye_kits") {