added On textures to a load of machines
This commit is contained in:
parent
3a89b0446c
commit
2163092237
6 changed files with 68 additions and 15 deletions
|
@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.Core;
|
||||
|
@ -18,6 +19,7 @@ import techreborn.client.GuiHandler;
|
|||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
import techreborn.tiles.TileImplosionCompressor;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -26,6 +28,9 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
@ -61,13 +66,18 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@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);
|
||||
TileAlloySmelter tileAlloySmelter = (TileAlloySmelter) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileAlloySmelter.crafter.currentRecipe != null){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.Core;
|
||||
|
@ -30,6 +31,9 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
@ -46,6 +50,7 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/assembling_machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
@ -66,9 +71,13 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@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);
|
||||
TileAssemblingMachine tileAssemblingMachine = (TileAssemblingMachine) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileAssemblingMachine.crafter.currentRecipe != null){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
|
|
|
@ -25,6 +25,9 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
@ -74,6 +77,7 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.Core;
|
||||
|
@ -17,6 +18,7 @@ import techreborn.blocks.BlockMachineBase;
|
|||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
import techreborn.tiles.TileAssemblingMachine;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
import techreborn.tiles.TileChemicalReactor;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
|
@ -27,6 +29,9 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
@ -62,13 +67,18 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/chemical_reactor_side_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/chemical_reactor_side_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@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);
|
||||
TileChemicalReactor tileChemicalReactor = (TileChemicalReactor) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileChemicalReactor.crafter.currentRecipe != null){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.Core;
|
||||
|
@ -17,6 +18,7 @@ import techreborn.blocks.BlockMachineBase;
|
|||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
import techreborn.tiles.TileAssemblingMachine;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
import techreborn.tiles.TileLathe;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
|
@ -27,6 +29,9 @@ public class BlockLathe extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
@ -46,6 +51,7 @@ public class BlockLathe extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
@ -66,9 +72,13 @@ public class BlockLathe extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@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);
|
||||
TileLathe tileLathe = (TileLathe) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileLathe.crafter.currentRecipe != null){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.Core;
|
||||
|
@ -17,6 +18,7 @@ import techreborn.blocks.BlockMachineBase;
|
|||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
import techreborn.tiles.TileAssemblingMachine;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
import techreborn.tiles.TilePlateCuttingMachine;
|
||||
|
@ -27,6 +29,9 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
@ -46,6 +51,7 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
@ -66,9 +72,13 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@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);
|
||||
TilePlateCuttingMachine tilePlateCuttingMachine = (TilePlateCuttingMachine) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tilePlateCuttingMachine.crafter.currentRecipe != null){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
|
|
Loading…
Reference in a new issue