Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -20,81 +20,75 @@ import java.util.Random;
|
|||
|
||||
public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockIndustrialSawmill(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialsawmill");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileIndustrialSawmill();
|
||||
}
|
||||
|
||||
@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.sawMillID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockIndustrialSawmill(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialsawmill");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_sawmill_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_sawmill_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileIndustrialSawmill tileIndustrialSawmill = (TileIndustrialSawmill) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileIndustrialSawmill.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileIndustrialSawmill();
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.sawMillID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_sawmill_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_sawmill_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileIndustrialSawmill tileIndustrialSawmill = (TileIndustrialSawmill) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileIndustrialSawmill.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue