mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 14:34:22 +00:00
quick fix : C-style array declaration
This commit is contained in:
1 parent
ea3ec429c1
commit
00117a7596
45 files changed
+47
-47
No files matched your search
@@ -27,7 +27,7 @@ public class GloveSpeed extends ItemModTypeFilter {
|
||||
if (!tags.hasKey(key))
|
||||
return tags.getInteger("Modifiers") > 0 && matchingAmount(modifiers) <= max; // This line fails?
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
if (keyPair[0] + matchingAmount(modifiers) <= keyPair[1]) return true;
|
||||
else if (keyPair[0] == keyPair[1]) return tags.getInteger("Modifiers") > 0;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.world.*;
|
||||
import tconstruct.blocks.TConstructBlock;
|
||||
|
||||
public class GlassBlock extends TConstructBlock {
|
||||
static String blockTextures[] = {"glass_clear", "soulglass", "soulglass_clear"};
|
||||
static String[] blockTextures = {"glass_clear", "soulglass", "soulglass_clear"};
|
||||
|
||||
public GlassBlock() {
|
||||
super(Material.glass, 3f, blockTextures);
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import tconstruct.blocks.TConstructBlock;
|
||||
|
||||
public class GlassBlockStained extends TConstructBlock {
|
||||
static String blockTextures[] = {
|
||||
static String[] blockTextures = {
|
||||
"white",
|
||||
"orange",
|
||||
"magenta",
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.block.material.Material;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
|
||||
public class GlassPane extends PaneBase {
|
||||
static String blockTextures[] = {"glass_clear", "soulglass", "soulglass_clear"};
|
||||
static String[] blockTextures = {"glass_clear", "soulglass", "soulglass_clear"};
|
||||
|
||||
public GlassPane() {
|
||||
super(Material.glass, "glass/", blockTextures);
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.block.material.Material;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
|
||||
public class GlassPaneStained extends PaneBase {
|
||||
static String blockTextures[] = {
|
||||
static String[] blockTextures = {
|
||||
"white",
|
||||
"orange",
|
||||
"magenta",
|
||||
|
||||
@@ -289,7 +289,7 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
}
|
||||
|
||||
protected int[] calcLiquidHeights() {
|
||||
int fluidHeights[] = new int[logic.moltenMetal.size()];
|
||||
int[] fluidHeights = new int[logic.moltenMetal.size()];
|
||||
int cap = logic.getCapacity();
|
||||
if (logic.getTotalLiquid() > cap) cap = logic.getTotalLiquid();
|
||||
for (int i = 0; i < logic.moltenMetal.size(); i++) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class CastingChannelItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"Channel"};
|
||||
public static final String[] blockTypes = {"Channel"};
|
||||
|
||||
public CastingChannelItem(Block b) {
|
||||
super(b, "Smeltery", blockTypes);
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class GlassBlockItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"pure"}; // , "soul",
|
||||
public static final String[] blockTypes = {"pure"}; // , "soul",
|
||||
// "soul.pure" };
|
||||
|
||||
public GlassBlockItem(Block b) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class GlassPaneItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"pure", "soul", "soul.pure"};
|
||||
public static final String[] blockTypes = {"pure", "soul", "soul.pure"};
|
||||
|
||||
public GlassPaneItem(Block b) {
|
||||
super(b, "block.glass", "pane", blockTypes);
|
||||
|
||||
@@ -12,7 +12,7 @@ import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import tconstruct.smeltery.logic.LavaTankLogic;
|
||||
|
||||
public class LavaTankItemBlock extends MultiItemBlock implements IFluidContainerItem {
|
||||
public static final String blockTypes[] = {"Tank", "Gague", "Window"};
|
||||
public static final String[] blockTypes = {"Tank", "Gague", "Window"};
|
||||
|
||||
public LavaTankItemBlock(Block b) {
|
||||
super(b, "LavaTank", blockTypes);
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class MetalItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Tin", "Aluminum", "AlBrass", "Alumite", "Steel", "Ender"
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class SearedSlabItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"brick", "stone", "cobble", "paver", "road", "fancy", "square", "creeper"
|
||||
public static final String[] blockTypes = {"brick", "stone", "cobble", "paver", "road", "fancy", "square", "creeper"
|
||||
};
|
||||
|
||||
public SearedSlabItem(Block b) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class SearedTableItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"Table", "Faucet", "Basin"};
|
||||
public static final String[] blockTypes = {"Table", "Faucet", "Basin"};
|
||||
|
||||
public SearedTableItemBlock(Block b) {
|
||||
super(b, "SearedBlock", blockTypes);
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.world.World;
|
||||
import tconstruct.achievements.TAchievements;
|
||||
|
||||
public class SmelteryItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"Controller",
|
||||
"Drain",
|
||||
"Brick",
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class SpeedBlockItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"brownstone.rough",
|
||||
"brownstone.rough.road",
|
||||
"brownstone.smooth",
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class SpeedSlabItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"brownstone.rough",
|
||||
"brownstone.rough.road",
|
||||
"brownstone.smooth",
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class StainedGlassClearItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"white",
|
||||
"orange",
|
||||
"magenta",
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class StainedGlassClearPaneItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"white",
|
||||
"orange",
|
||||
"magenta",
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.world.*;
|
||||
import tconstruct.blocks.TConstructBlock;
|
||||
|
||||
public class MultiBrick extends TConstructBlock {
|
||||
static String blockTextures[] = {
|
||||
static String[] blockTextures = {
|
||||
"brick_obsidian",
|
||||
"brick_sandstone",
|
||||
"brick_netherrack",
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.world.*;
|
||||
import tconstruct.blocks.TConstructBlock;
|
||||
|
||||
public class MultiBrickFancy extends TConstructBlock {
|
||||
static String blockTextures[] = {
|
||||
static String[] blockTextures = {
|
||||
"fancybrick_obsidian",
|
||||
"fancybrick_sandstone",
|
||||
"fancybrick_netherrack",
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.util.IIcon;
|
||||
import tconstruct.blocks.TConstructBlock;
|
||||
|
||||
public class MultiBrickMetal extends TConstructBlock {
|
||||
static String blockTextures[] = {
|
||||
static String[] blockTextures = {
|
||||
"brick_alumite",
|
||||
"brick_ardite",
|
||||
"brick_cobalt",
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class CraftingSlabItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"tile.CraftingStation", "Crafter", "Parts", "PatternShaper", "PatternChest", "tile.ToolForge"
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class MultiBrickFancyItem extends MultiItemBlock {
|
||||
static String blockTypes[] = {
|
||||
static String[] blockTypes = {
|
||||
"obsidian",
|
||||
"sandstone",
|
||||
"netherrack",
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class MultiBrickItem extends MultiItemBlock {
|
||||
static String blockTypes[] = {
|
||||
static String[] blockTypes = {
|
||||
"obsidian",
|
||||
"sandstone",
|
||||
"netherrack",
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class MultiBrickMetalItem extends MultiItemBlock {
|
||||
static String blockTypes[] = {
|
||||
static String[] blockTypes = {
|
||||
"brick.alumite",
|
||||
"brick.ardite",
|
||||
"brick.cobalt",
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class ToolStationItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"Crafter",
|
||||
"Parts",
|
||||
"Parts",
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BattlesignTesr extends TileEntitySpecialRenderer {
|
||||
break;
|
||||
}
|
||||
|
||||
String strings[] = te.getText();
|
||||
String[] strings = te.getText();
|
||||
|
||||
if (strings != null && strings.length > 0) {
|
||||
float lum = calcLuminance(te.getWorldObj()
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.*;
|
||||
|
||||
public class CraftedSoilItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"Slime", "Grout", "BlueSlime", "GraveyardSoil", "ConsecratedSoil", "blue", "dirt", "Grout"
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class GravelOreItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"iron", "gold", "copper", "tin", "aluminum", "cobalt"};
|
||||
public static final String[] blockTypes = {"iron", "gold", "copper", "tin", "aluminum", "cobalt"};
|
||||
|
||||
public GravelOreItem(Block b) {
|
||||
super(b, "block.ore.gravel", blockTypes);
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class MetalOreItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"NetherSlag", "Cobalt", "Ardite", "Copper", "Tin", "Aluminum", "Slag"};
|
||||
public static final String[] blockTypes = {"NetherSlag", "Cobalt", "Ardite", "Copper", "Tin", "Aluminum", "Slag"};
|
||||
|
||||
public MetalOreItemBlock(Block b) {
|
||||
super(b, "MetalOre", blockTypes);
|
||||
|
||||
@@ -15,7 +15,7 @@ import tconstruct.world.TinkerWorld;
|
||||
|
||||
public class OreberryBushItem extends MultiItemBlock {
|
||||
public Block blockB;
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin", "iron",
|
||||
"gold", "copper", "tin"
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ import tconstruct.world.TinkerWorld;
|
||||
|
||||
public class OreberryBushSecondItem extends MultiItemBlock {
|
||||
public Block blockB;
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"aluminum",
|
||||
"essence",
|
||||
"",
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class SlimeGelItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"blue", "green", "purple", "magma", "yellow", "red", "metal"};
|
||||
public static final String[] blockTypes = {"blue", "green", "purple", "magma", "yellow", "red", "metal"};
|
||||
|
||||
public SlimeGelItemBlock(Block b) {
|
||||
super(b, "block.slime.congealed", blockTypes);
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class SlimeGrassItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"blue", "dirt"};
|
||||
public static final String[] blockTypes = {"blue", "dirt"};
|
||||
|
||||
public SlimeGrassItemBlock(Block b) {
|
||||
super(b, "block.slime.grass", blockTypes);
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class SlimeLeavesItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"blue"};
|
||||
public static final String[] blockTypes = {"blue"};
|
||||
|
||||
public SlimeLeavesItemBlock(Block b) {
|
||||
super(b, "block.slime.leaves", blockTypes);
|
||||
|
||||
@@ -4,7 +4,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class SlimeSaplingItemBlock extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"bluegreen"};
|
||||
public static final String[] blockTypes = {"bluegreen"};
|
||||
|
||||
public SlimeSaplingItemBlock(Block b) {
|
||||
super(b, "block.slime.sapling", blockTypes);
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.util.*;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
public class SlimeTallGrassItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {"tallgrass", "tallgrass.fern"};
|
||||
public static final String[] blockTypes = {"tallgrass", "tallgrass.fern"};
|
||||
|
||||
public SlimeTallGrassItem(Block b) {
|
||||
super(b, "block.slime", blockTypes);
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class SoilSlabItem extends MultiItemBlock {
|
||||
public static final String blockTypes[] = {
|
||||
public static final String[] blockTypes = {
|
||||
"grass", "dirt", "mycelium", "slime", "grout", "blueslime", "graveyardsoil", "consecratedsoil"
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user