Inital port to tile based meta
This commit is contained in:
parent
2c863d9e11
commit
d3e860edb2
34 changed files with 198 additions and 246 deletions
|
@ -5,6 +5,8 @@ import cpw.mods.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;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockSupercondensator extends BlockMachineBase {
|
||||
|
||||
|
@ -31,14 +33,13 @@ public class BlockSupercondensator extends BlockMachineBase {
|
|||
this.iconBottom = icon.registerIcon("techreborn:machine/supercondensator_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 = getTileMeta((World) blockAccess, x, y, z);
|
||||
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));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue