Work for #243 The charge bench has no texture
This commit is contained in:
parent
701c658323
commit
1618a5ca6d
2 changed files with 13 additions and 5 deletions
|
@ -36,13 +36,21 @@ public class BlockElectricCraftingTable extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
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
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IIcon getIcon(int side, int meta) {
|
||||||
|
if (side == 1) {
|
||||||
|
return this.iconTop;
|
||||||
|
} else if (side == 3) {
|
||||||
|
return this.iconFront;
|
||||||
|
} else {
|
||||||
|
return this.blockIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ public class BlockChargeBench extends BlockMachineBase {
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue