From b530fdac89f5d764613a6a69339e4324083c9895 Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Mon, 16 Sep 2024 00:53:18 +0200 Subject: Remove GT++ AutoMap (#3199) --- .../java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java') diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java index 4da6ef3a1f..6852c93f05 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java @@ -1,12 +1,13 @@ package gtPlusPlus.api.objects.minecraft; +import java.util.ArrayList; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.ShapedOreRecipe; import gregtech.api.interfaces.IRecipeMutableAccess; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.core.util.minecraft.ItemUtils; @@ -76,7 +77,7 @@ public class ShapedRecipe implements IRecipeMutableAccess { } // Build a Pair for each slot - AutoMap> aRecipePairs = new AutoMap<>(); + ArrayList> aRecipePairs = new ArrayList<>(); int aCharSlot = 0; int aMemSlot = 0; int aInfoSlot = 0; @@ -91,7 +92,7 @@ public class ShapedRecipe implements IRecipeMutableAccess { } mInfo = ((ItemStack) stack).getDisplayName(); } - aRecipePairs.put(new Pair<>(CHARS.charAt(aCharSlot), stack)); + aRecipePairs.add(new Pair<>(CHARS.charAt(aCharSlot), stack)); Logger.RECIPE( "Storing '" + CHARS.charAt(aCharSlot) + "' with an object of type " @@ -103,7 +104,7 @@ public class ShapedRecipe implements IRecipeMutableAccess { aCharSlot++; aLoggingInfo[aInfoSlot++] = mInfo; } else { - aRecipePairs.put(new Pair<>(' ', (ItemStack) null)); + aRecipePairs.add(new Pair<>(' ', (ItemStack) null)); Logger.RECIPE("Storing ' ' with an object of type null"); aChar[aMemSlot++] = ' '; aLoggingInfo[aInfoSlot++] = "Empty"; @@ -155,7 +156,7 @@ public class ShapedRecipe implements IRecipeMutableAccess { } mInfo = ((ItemStack) stack).getDisplayName(); } - aRecipePairs.put(new Pair<>(CHARS.charAt(aCharSlot), stack)); + aRecipePairs.add(new Pair<>(CHARS.charAt(aCharSlot), stack)); Logger.RECIPE( "Registering Pair of '" + CHARS.charAt(aCharSlot) + "' and a " @@ -211,7 +212,7 @@ public class ShapedRecipe implements IRecipeMutableAccess { Logger.RECIPE("+ = + = + = +"); for (int r = 0; r < 9; r++) { if (aChar[r] != ' ') { - Logger.RECIPE("" + aChar[r] + " : " + aLoggingInfo[r]); + Logger.RECIPE(aChar[r] + " : " + aLoggingInfo[r]); } } -- cgit