diff --git a/src/main/java/com/shnupbups/extrapieces/register/ModConfigs.java b/src/main/java/com/shnupbups/extrapieces/register/ModConfigs.java index d1bc80ac..3a7b5d00 100644 --- a/src/main/java/com/shnupbups/extrapieces/register/ModConfigs.java +++ b/src/main/java/com/shnupbups/extrapieces/register/ModConfigs.java @@ -9,6 +9,7 @@ import com.shnupbups.extrapieces.core.PieceSet; import com.shnupbups.extrapieces.core.PieceSets; import net.fabricmc.loader.api.FabricLoader; +import net.fabricmc.loader.api.metadata.CustomValue; import net.minecraft.util.Identifier; import java.io.File; @@ -50,12 +51,12 @@ public static void init() { public static void findAndCopyPiecePacks() { FabricLoader.getInstance().getAllMods().stream().map(modContainer -> { - com.google.gson.JsonElement je = modContainer.getMetadata().getCustomElement(ExtraPieces.mod_id + ":piecepack"); Path path = null; - if (je != null) { + if (modContainer.getMetadata().containsCustomValue(ExtraPieces.mod_id + ":piecepack")) { ExtraPieces.log("Found Piece Pack in " + modContainer.getMetadata().getName() + " (" + modContainer.getMetadata().getId() + ")"); - path = modContainer.getPath(je.getAsString()); + CustomValue pp = modContainer.getMetadata().getCustomValue(ExtraPieces.mod_id + ":piecepack"); + path = modContainer.getPath(pp.getAsString()); } return path; diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b5f4c95d..77dfccf5 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "extrapieces", - "version": "2.6.0", + "version": "2.6.1", "name": "Extra Pieces", "description": "Adds more block shapes to Minecraft!", @@ -33,7 +33,7 @@ ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.6.1", "fabric": "*" }, "suggests": {