859
This commit is contained in:
parent
b88fe49ee2
commit
30879a534a
107 changed files with 265 additions and 2518 deletions
|
@ -1,48 +1,13 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockSupercondensator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockSupercondensator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.supercondensator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/supercondensator_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
return this.iconFront;
|
||||
}
|
||||
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));
|
||||
setUnlocalizedName("techreborn.supercondensator");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue