mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
run repo through formatter
This commit is contained in:
1 parent
5585d680a3
commit
ffaea7d4b7
140 files changed
+1050
-892
No files matched your search
@@ -19,7 +19,7 @@ public class ArmorPattern extends CraftingItem implements ItemBlocklike
|
||||
|
||||
public ArmorPattern(int id, String patternType, String folder)
|
||||
{
|
||||
super( patternName, getPatternNames(patternType), folder, "tinker", TConstructRegistry.materialTab);
|
||||
super(patternName, getPatternNames(patternType), folder, "tinker", TConstructRegistry.materialTab);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setContainerItem(this);
|
||||
|
||||
@@ -140,13 +140,16 @@ public class FilledBucket extends ItemBucket
|
||||
}
|
||||
else
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
int metadata = 0;
|
||||
if (TRepo.fluidBlocks[type] instanceof BlockFluidFinite)
|
||||
metadata = 7;
|
||||
|
||||
world.setBlock(clickX, clickY, clickZ, TRepo.fluidBlocks[type], metadata, 3); //TODO: Merge liquids
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
}
|
||||
catch (ArrayIndexOutOfBoundsException ex)
|
||||
{
|
||||
TConstruct.logger.warn("AIOBE occured when placing bucket into world; " + ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class GoldenHead extends ItemFood
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
list.add("\u00a75\u00a7o"+StatCollector.translateToLocal("goldenhead1.tooltip"));
|
||||
list.add("\u00a75\u00a7o"+StatCollector.translateToLocal("goldenhead2.tooltip"));
|
||||
list.add("\u00a75\u00a7o" + StatCollector.translateToLocal("goldenhead1.tooltip"));
|
||||
list.add("\u00a75\u00a7o" + StatCollector.translateToLocal("goldenhead2.tooltip"));
|
||||
}
|
||||
}
|
||||
@@ -29,10 +29,10 @@ public class MetalPattern extends Pattern
|
||||
private static final String[] patternName = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign",
|
||||
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead", "gem" };
|
||||
|
||||
public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_)
|
||||
public void getSubItems (Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_)
|
||||
{
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
if (!(patternName[i].equals("")))
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, i));
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, i));
|
||||
}
|
||||
}
|
||||
@@ -147,6 +147,6 @@ public class Pattern extends CraftingItem implements IPattern
|
||||
@Override
|
||||
public ItemStack getPatternOutput (ItemStack stack, ItemStack input, MaterialSet set)
|
||||
{
|
||||
return TConstructRegistry.getPartMapping((Item)this, stack.getItemDamage(), set.materialID);
|
||||
return TConstructRegistry.getPartMapping((Item) this, stack.getItemDamage(), set.materialID);
|
||||
}
|
||||
}
|
||||
@@ -17,12 +17,12 @@ public class StrangeFood extends SpecialFood
|
||||
{
|
||||
super(new int[] { 2, 2 }, new float[] { 1f, 1f }, new String[] { "edibleslime", "edibleblood" }, new String[] { "food/edibleslime", "food/edibleblood" });
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (stack.getItemDamage() == 1)
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20*15, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20 * 15, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ public class HeartCanister extends CraftingItem
|
||||
|
||||
public HeartCanister()
|
||||
{
|
||||
super(new String[] { "empty", "miniheart.red", "heart" }, new String[] { "canister_empty", "miniheart_red", "canister_heart" }, "", "tinker", TConstructRegistry.materialTab );
|
||||
super(new String[] { "empty", "miniheart.red", "heart" }, new String[] { "canister_empty", "miniheart_red", "canister_heart" }, "", "tinker", TConstructRegistry.materialTab);
|
||||
this.setMaxStackSize(10);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ public class BarricadeItem extends ItemBlock
|
||||
{
|
||||
side = 1;
|
||||
}
|
||||
else if (b != Blocks.vine && b != Blocks.tallgrass && b != Blocks.deadbush
|
||||
&& (b == null || !b.canPlaceBlockAt(world, x, y, z)))
|
||||
else if (b != Blocks.vine && b != Blocks.tallgrass && b != Blocks.deadbush && (b == null || !b.canPlaceBlockAt(world, x, y, z)))
|
||||
{
|
||||
if (side == 0)
|
||||
{
|
||||
@@ -94,8 +93,8 @@ public class BarricadeItem extends ItemBlock
|
||||
|
||||
if (placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.soundName,
|
||||
(block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.soundName, (block.stepSound.getVolume() + 1.0F) / 2.0F,
|
||||
block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class HamboneItemBlock extends ItemBlock
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
list.add("\u00A74"+StatCollector.translateToLocal("hambone1.tooltip"));
|
||||
list.add("\u00A74" + StatCollector.translateToLocal("hambone1.tooltip"));
|
||||
list.add(StatCollector.translateToLocal("hambone2.tooltip"));
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ItemBlockLandmine extends ItemBlock
|
||||
break;
|
||||
}
|
||||
|
||||
par3List.add(StatCollector.translateToLocal("landmine5.tooltip") + interaction);
|
||||
par3List.add(StatCollector.translateToLocal("landmine5.tooltip") + interaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,6 @@ package tconstruct.items.blocks;
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
|
||||
public class SlimeSaplingItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "bluegreen" };
|
||||
|
||||
@@ -14,12 +14,11 @@ public class SlimeTallGrassItem extends MultiItemBlock
|
||||
|
||||
public SlimeTallGrassItem(Block b)
|
||||
{
|
||||
super(b,"block.slime", blockTypes );
|
||||
super(b, "block.slime", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage (int meta)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,6 @@ public class SmelteryItemBlock extends MultiItemBlock
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
|
||||
@@ -16,7 +16,7 @@ public class SoilSlabItem extends MultiItemBlock
|
||||
|
||||
public SoilSlabItem(Block b)
|
||||
{
|
||||
super(b, "block.soil.slab", blockTypes );
|
||||
super(b, "block.soil.slab", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class SoilSlabItem extends MultiItemBlock
|
||||
{
|
||||
switch (stack.getItemDamage())
|
||||
{
|
||||
case 3:
|
||||
case 3:
|
||||
list.add(StatCollector.translateToLocal("craftedsoil.slab1.tooltip"));
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -10,8 +10,8 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
public class SpeedSlabItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "brownstone.rough", "brownstone.rough.road", "brownstone.smooth", "brownstone.smooth.brick", "brownstone.smooth.road",
|
||||
"brownstone.smooth.fancy", "brownstone.smooth.chiseled" };
|
||||
public static final String blockTypes[] = { "brownstone.rough", "brownstone.rough.road", "brownstone.smooth", "brownstone.smooth.brick", "brownstone.smooth.road", "brownstone.smooth.fancy",
|
||||
"brownstone.smooth.chiseled" };
|
||||
|
||||
public SpeedSlabItem(Block b)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,7 @@ import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class StainedGlassClearPaneItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan",
|
||||
"purple", "blue", "brown", "green", "red", "black" };
|
||||
public static final String blockTypes[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan", "purple", "blue", "brown", "green", "red", "black" };
|
||||
|
||||
public StainedGlassClearPaneItem(Block b)
|
||||
{
|
||||
|
||||
@@ -247,7 +247,7 @@ public class Battleaxe extends HarvestTool
|
||||
return false;
|
||||
|
||||
World world = player.worldObj;
|
||||
final Block wood = world.getBlock(x,y,z);
|
||||
final Block wood = world.getBlock(x, y, z);
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
final int meta = world.getBlockMetadata(x, y, z);
|
||||
for (int yPos = y + 1; yPos < y + 9; yPos++)
|
||||
|
||||
@@ -68,7 +68,7 @@ public class Hammer extends HarvestTool
|
||||
return materials;
|
||||
}
|
||||
|
||||
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material. anvil };
|
||||
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material.anvil };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Hatchet extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.wood, Material.leaves, Material.vine, Material.circuits, Material.cactus};//TODO find this//, Material.pumpkin };
|
||||
static Material[] materials = { Material.wood, Material.leaves, Material.vine, Material.circuits, Material.cactus };//TODO find this//, Material.pumpkin };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -63,7 +63,7 @@ public class LumberAxe extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus};//TODO find this//, Material.pumpkin };
|
||||
static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus };//TODO find this//, Material.pumpkin };
|
||||
|
||||
/* Lumber axe specific */
|
||||
|
||||
@@ -139,7 +139,8 @@ public class LumberAxe extends HarvestTool
|
||||
return false;
|
||||
|
||||
World world = player.worldObj;
|
||||
final Block wood = world.getBlock(x, y, z);;
|
||||
final Block wood = world.getBlock(x, y, z);
|
||||
;
|
||||
if (wood == null)
|
||||
{
|
||||
return super.onBlockStartBreak(stack, x, y, z, player);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Mattock extends DualHarvestTool
|
||||
return "shovel";
|
||||
}
|
||||
|
||||
static Material[] axeMaterials = { Material.wood, Material.cactus};//TODO find this//, Material.pumpkin, Material.plants, Material.vine };
|
||||
static Material[] axeMaterials = { Material.wood, Material.cactus };//TODO find this//, Material.pumpkin, Material.plants, Material.vine };
|
||||
static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay };
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Scythe extends Weapon
|
||||
return materials;
|
||||
}
|
||||
|
||||
static Material[] materials = new Material[] { Material.web, Material.cactus};//TODO find this//, Material.pumpkin, Material.plants, Material.vine, Material.leaves };
|
||||
static Material[] materials = new Material[] { Material.web, Material.cactus };//TODO find this//, Material.pumpkin, Material.plants, Material.vine, Material.leaves };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
Reference in new issue
Block a user