Auto formatted, and cleaned imports
This commit is contained in:
parent
c001231216
commit
8e7d6b011e
64 changed files with 2268 additions and 2587 deletions
|
@ -11,7 +11,7 @@ import techreborn.tiles.TileCentrifuge;
|
|||
|
||||
public class BlockCentrifuge extends BlockContainer {
|
||||
|
||||
public BlockCentrifuge(){
|
||||
public BlockCentrifuge() {
|
||||
super(Material.piston);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class BlockCentrifuge extends BlockContainer {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -13,76 +12,67 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockOre extends Block{
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{
|
||||
"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar", "Sphalerite",
|
||||
"Tungston","Sheldonite", "Olivine", "Sodalite"
|
||||
};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockOre(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.ore");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
public class BlockOre extends Block {
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
//TODO RubyOre Returns Rubys
|
||||
return metaData;
|
||||
}
|
||||
public static final String[] types = new String[]
|
||||
{
|
||||
"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar", "Sphalerite",
|
||||
"Tungston", "Sheldonite", "Olivine", "Sodalite"
|
||||
};
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.textures = new IIcon[types.length];
|
||||
private IIcon[] textures;
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "ore/ore"+types[i]);
|
||||
}
|
||||
}
|
||||
public BlockOre(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.ore");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData) {
|
||||
//TODO RubyOre Returns Rubys
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "ore/ore" + types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -10,8 +12,6 @@ import net.minecraft.world.World;
|
|||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileQuantumChest;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
public class BlockQuantumChest extends BlockContainer {
|
||||
|
@ -33,7 +33,7 @@ public class BlockQuantumChest extends BlockContainer {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.quantumChestID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -10,8 +12,6 @@ import net.minecraft.world.World;
|
|||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileQuantumTank;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockQuantumTank extends BlockContainer {
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class BlockQuantumTank extends BlockContainer {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.quantumTankID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,11 +2,6 @@ package techreborn.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileRollingMachine;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -14,47 +9,47 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileRollingMachine;
|
||||
|
||||
public class BlockRollingMachine extends BlockContainer{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class BlockRollingMachine extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon other;
|
||||
|
||||
public BlockRollingMachine(Material material)
|
||||
{
|
||||
super(material.piston);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setBlockName("techreborn.rollingmachine");
|
||||
public BlockRollingMachine(Material material) {
|
||||
super(material.piston);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setBlockName("techreborn.rollingmachine");
|
||||
setHardness(2f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileRollingMachine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileRollingMachine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
top = icon.registerIcon("techreborn:machine/rollingmachine_top");
|
||||
other = icon.registerIcon("techreborn:machine/rollingmachine_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int currentSide, int meta)
|
||||
{
|
||||
public IIcon getIcon(int currentSide, int meta) {
|
||||
if (currentSide == 1) {
|
||||
return top;
|
||||
} else {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -13,74 +12,66 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStorage extends Block{
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{
|
||||
"Silver", "Aluminium", "Titanium", "Sapphire", "Ruby", "GreenSapphire", "Chrome", "Electrum", "Tungsten",
|
||||
"Lead", "Zinc", "Brass", "Steel", "Platinum", "Nickel", "Invar",
|
||||
};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockStorage(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random random, int par2)
|
||||
{
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
public class BlockStorage extends Block {
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
public static final String[] types = new String[]
|
||||
{
|
||||
"Silver", "Aluminium", "Titanium", "Sapphire", "Ruby", "GreenSapphire", "Chrome", "Electrum", "Tungsten",
|
||||
"Lead", "Zinc", "Brass", "Steel", "Platinum", "Nickel", "Invar",
|
||||
};
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.textures = new IIcon[types.length];
|
||||
private IIcon[] textures;
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "storage/storage"+types[i]);
|
||||
}
|
||||
}
|
||||
public BlockStorage(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random random, int par2) {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData) {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "storage/storage" + types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -14,8 +14,8 @@ import net.minecraft.world.World;
|
|||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileThermalGenerator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
public class BlockThermalGenerator extends BlockContainer {
|
||||
|
@ -55,7 +55,7 @@ public class BlockThermalGenerator extends BlockContainer {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.thermalGeneratorID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue