aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/api/objects/minecraft
diff options
context:
space:
mode:
authorAlexdoru <57050655+Alexdoru@users.noreply.github.com>2024-09-28 13:25:01 +0200
committerGitHub <noreply@github.com>2024-09-28 11:25:01 +0000
commit86f1765b171f4cc6f163b8027d1330f4e5094e2d (patch)
treeb6e293bd3c976558fc4e4b7190e4d342c2ddc555 /src/main/java/gtPlusPlus/api/objects/minecraft
parent6b1f145f5028f1bc92cf478e5963224e7d94b5cd (diff)
downloadGT5-Unofficial-86f1765b171f4cc6f163b8027d1330f4e5094e2d.tar.gz
GT5-Unofficial-86f1765b171f4cc6f163b8027d1330f4e5094e2d.tar.bz2
GT5-Unofficial-86f1765b171f4cc6f163b8027d1330f4e5094e2d.zip
Remove more reflection + reorganize mixin accessors packages (#3260)
Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/api/objects/minecraft')
-rw-r--r--src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java
index 6852c93f05..867f247b6e 100644
--- a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java
+++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java
@@ -6,7 +6,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.ShapedOreRecipe;
-import gregtech.api.interfaces.IRecipeMutableAccess;
+import gregtech.mixin.interfaces.accessors.IRecipeMutableAccess;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.core.util.minecraft.ItemUtils;
@@ -25,14 +25,11 @@ public class ShapedRecipe implements IRecipeMutableAccess {
}
public ShapedRecipe(Object[] aInputs, ItemStack aOutput) {
- String aGridWhole = "";
- String aGrid[] = new String[3];
+ StringBuilder aGridWhole = new StringBuilder();
+ String[] aGrid = new String[3];
char[] aChar = new char[9];
String[] aLoggingInfo = new String[9];
-
- if (mBlackList == null) {
- mBlackList = new ItemStack[] {};
- }
+ mBlackList = new ItemStack[] {};
// Just to be safe
try {
@@ -68,7 +65,7 @@ public class ShapedRecipe implements IRecipeMutableAccess {
Object[] mVarags2 = null;
Logger.RECIPE("Generating Shaped Crafting Recipe for " + aOutput.getDisplayName());
- if (aInputs.length < 9 || aInputs.length > 9) {
+ if (aInputs.length != 9) {
Logger.RECIPE(
"[Fix] Recipe for " + aOutput.getDisplayName()
+ " has incorrect number of inputs. Size: "
@@ -118,7 +115,7 @@ public class ShapedRecipe implements IRecipeMutableAccess {
for (Pair<Character, Object> h : aRecipePairs) {
if (h.getKey() != null) {
- aGridWhole += String.valueOf(h.getKey());
+ aGridWhole.append(String.valueOf(h.getKey()));
Logger.RECIPE("Adding '" + String.valueOf(h.getKey()) + "' to aGridWhole.");
}
}