quick fix : C-style array declaration

This commit is contained in:
Alexdoru committed 2023-01-25 21:05:22 +01:00
1 parent ea3ec429c1
commit 00117a7596
45 files changed
+47 -47

No files matched your search

@@ -21,7 +21,7 @@ public class ModAntiSpider extends ItemModTypeFilter {
if (matchingAmount(input) > max) return false;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= keyPair[1]) return true;
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
else return false;
@@ -63,7 +63,7 @@ public class ModAttack extends ItemModTypeFilter {
NBTTagCompound tags = tool.getTagCompound().getCompoundTag(toolItem.getBaseTagName());
if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= keyPair[1]) return true;
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
}
@@ -26,7 +26,7 @@ public class ModBlaze extends ItemModTypeFilter {
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= keyPair[1]) return true;
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
}
@@ -29,7 +29,7 @@ public class ModLapis extends ItemModTypeFilter {
if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= max) return true;
}
return false;
@@ -52,7 +52,7 @@ public class ModLapis extends ItemModTypeFilter {
}
int increase = matchingAmount(input);
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
keyPair[0] += increase;
tags.setIntArray(key, keyPair);
ToolCore toolcore = (ToolCore) tool.getItem();
@@ -81,7 +81,7 @@ public class ModLapis extends ItemModTypeFilter {
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key)) return;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] == max) return;
if (random.nextInt(50) == 0) {
@@ -25,7 +25,7 @@ public class ModPiston extends ItemModTypeFilter {
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= keyPair[1]) return true;
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
}
@@ -26,7 +26,7 @@ public class ModRedstone extends ItemModTypeFilter {
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= keyPair[1]) return true;
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
@@ -21,7 +21,7 @@ public class ModSmite extends ItemModTypeFilter {
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
if (!tags.hasKey(key)) return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;
int keyPair[] = tags.getIntArray(key);
int[] keyPair = tags.getIntArray(key);
if (keyPair[0] + matchingAmount(input) <= keyPair[1]) return true;
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
else return false;