aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/blocks')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java111
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java20
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java6
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java26
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java509
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java96
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java20
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java81
22 files changed, 275 insertions, 696 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java
index a408663ee0..732dfb2ae8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java
@@ -57,6 +57,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
this.isBlockContainer = true;
}
+ @Override
public String getHarvestTool(int aMeta) {
switch (aMeta / 4) {
case 0:
@@ -72,14 +73,17 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public int getHarvestLevel(int aMeta) {
return aMeta % 4;
}
+ @Override
protected boolean canSilkHarvest() {
return false;
}
+ @Override
public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof BaseTileEntity) {
@@ -87,6 +91,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
super.onBlockAdded(aWorld, aX, aY, aZ);
if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
@@ -94,6 +99,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public String getUnlocalizedName() {
int tDamage = 0;
String aUnlocalName = (tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length)
@@ -106,6 +112,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
return aUnlocalName;
}
+ @Override
public String getLocalizedName() {
String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");;
if (aName.toLowerCase().contains(".name")) {
@@ -121,81 +128,100 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
return aName;
}
+ @Override
public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) {
return 0;
}
+ @Override
public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) {
return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 100 : 0;
}
+ @Override
public int getRenderType() {
return GTPP_Render_MachineBlock.INSTANCE == null ? super.getRenderType()
: GTPP_Render_MachineBlock.INSTANCE.mRenderID;
}
+ @Override
public boolean isFireSource(World aWorld, int aX, int aY, int aZ, ForgeDirection side) {
return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0;
}
+ @Override
public boolean isFlammable(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) {
return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0;
}
+ @Override
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess aWorld, int aX, int aY, int aZ) {
return false;
}
+ @Override
public boolean canConnectRedstone(IBlockAccess var1, int var2, int var3, int var4, int var5) {
return true;
}
+ @Override
public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
return false;
}
+ @Override
public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
return false;
}
+ @Override
public boolean hasTileEntity(int aMeta) {
return true;
}
+ @Override
public boolean hasComparatorInputOverride() {
return true;
}
+ @Override
public boolean renderAsNormalBlock() {
return false;
}
+ @Override
public boolean canProvidePower() {
return true;
}
+ @Override
public boolean isOpaqueCube() {
return false;
}
+ @Override
public TileEntity createNewTileEntity(World aWorld, int aMeta) {
return this.createTileEntity(aWorld, aMeta);
}
- public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) {
+ @Override
+ public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int ordinalSide) {
return BlockIcons.MACHINE_LV_SIDE.getIcon();
}
- public IIcon getIcon(int aSide, int aMeta) {
+ @Override
+ public IIcon getIcon(int ordinalSide, int aMeta) {
return BlockIcons.MACHINE_LV_SIDE.getIcon();
}
+ @Override
public boolean onBlockEventReceived(World aWorld, int aX, int aY, int aZ, int aData1, int aData2) {
super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2);
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false;
}
+ @Override
public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB,
Entity collider) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
@@ -208,6 +234,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
@@ -216,6 +243,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
: super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
}
+ @Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
@@ -225,6 +253,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
: super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ);
}
+ @Override
public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) {
TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity
@@ -242,10 +271,12 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public void setBlockBoundsForItemRender() {
super.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
+ @Override
public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity
@@ -256,13 +287,16 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister aIconRegister) {}
+ @Override
public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
return super.getBlockHardness(aWorld, aX, aY, aZ);
}
+ @Override
public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess()
@@ -270,8 +304,9 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
: super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ);
}
- public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1,
- float par2, float par3) {
+ @Override
+ public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int ordinalSide,
+ float par1, float par2, float par3) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity == null) {
return false;
@@ -291,12 +326,17 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
return tTileEntity instanceof IGregTechTileEntity ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L
? false
: (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) ? true
- : ((IGregTechTileEntity) tTileEntity)
- .onRightclick(aPlayer, (byte) aSide, par1, par2, par3)))
+ : ((IGregTechTileEntity) tTileEntity).onRightclick(
+ aPlayer,
+ ForgeDirection.getOrientation(ordinalSide),
+ par1,
+ par2,
+ par3)))
: false;
}
}
+ @Override
public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity) {
@@ -304,11 +344,13 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public int getDamageValue(World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileID() : 0;
}
+ @Override
public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof BaseMetaTileEntity) {
@@ -318,6 +360,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion);
}
+ @Override
public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) {
GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
@@ -353,6 +396,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
aWorld.removeTileEntity(aX, aY, aZ);
}
+ @Override
public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getDrops()
@@ -360,36 +404,41 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
: ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops());
}
- public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) {
+ @Override
+ public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int ordinalSide) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
- ? ((IGregTechTileEntity) tTileEntity).getComparatorValue((byte) aSide)
+ ? ((IGregTechTileEntity) tTileEntity).getComparatorValue(ForgeDirection.getOrientation(ordinalSide))
: 0;
}
- public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) {
- if (aSide >= 0 && aSide <= 5) {
+ @Override
+ public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int ordinalSide) {
+ if (ordinalSide >= 0 && ordinalSide <= 5) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
- ? ((IGregTechTileEntity) tTileEntity).getOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide))
+ ? ((IGregTechTileEntity) tTileEntity)
+ .getOutputRedstoneSignal(ForgeDirection.getOrientation(ordinalSide).getOpposite())
: 0;
} else {
return 0;
}
}
- public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) {
- if (aSide >= 0 && aSide <= 5) {
+ @Override
+ public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int ordinalSide) {
+ if (ordinalSide >= 0 && ordinalSide <= 5) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
? ((IGregTechTileEntity) tTileEntity)
- .getStrongOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide))
+ .getStrongOutputRedstoneSignal(ForgeDirection.getOrientation(ordinalSide).getOpposite())
: 0;
} else {
return 0;
}
}
+ @Override
public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) {
if (!aWorld.isRemote) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
@@ -403,7 +452,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
- public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) {
+ @Override
+ public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection side) {
if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) {
return true;
} else {
@@ -418,8 +468,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
return true;
}
- if (tTileEntity instanceof ICoverable
- && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0) {
+ if (tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverIDAtSide(side) != 0) {
return true;
}
}
@@ -428,6 +477,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity == null ? 0
@@ -435,24 +485,28 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
: (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0));
}
+ @Override
public int getLightValue(IBlockAccess aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof BaseMetaTileEntity ? ((BaseMetaTileEntity) tTileEntity).getLightValue() : 0;
}
+ @Override
public TileEntity createTileEntity(World aWorld, int aMeta) {
return (TileEntity) (aMeta >= 4 ? Meta_GT_Proxy.constructBaseMetaTileEntity()
: Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower());
}
+ @Override
public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX,
double explosionY, double explosionZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
- ? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6)
+ ? ((IGregTechTileEntity) tTileEntity).getBlastResistance(ForgeDirection.UNKNOWN)
: 10.0F;
}
+ @Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
for (int i = 0; i < 100; ++i) {
@@ -462,33 +516,34 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public void onBlockPlacedBy(World aWorld, int aX, int aY, int aZ, EntityLivingBase aPlayer, ItemStack aStack) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity != null) {
if (tTileEntity instanceof IGregTechTileEntity) {
IGregTechTileEntity var6 = (IGregTechTileEntity) tTileEntity;
if (aPlayer == null) {
- var6.setFrontFacing((byte) 1);
+ var6.setFrontFacing(ForgeDirection.UP);
} else {
int var7 = MathHelper.floor_double((double) (aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
int var8 = Math.round(aPlayer.rotationPitch);
- if (var8 >= 65 && var6.isValidFacing((byte) 1)) {
- var6.setFrontFacing((byte) 1);
- } else if (var8 <= -65 && var6.isValidFacing((byte) 0)) {
- var6.setFrontFacing((byte) 0);
+ if (var8 >= 65 && var6.isValidFacing(ForgeDirection.UP)) {
+ var6.setFrontFacing(ForgeDirection.UP);
+ } else if (var8 <= -65 && var6.isValidFacing(ForgeDirection.DOWN)) {
+ var6.setFrontFacing(ForgeDirection.DOWN);
} else {
switch (var7) {
case 0:
- var6.setFrontFacing((byte) 2);
+ var6.setFrontFacing(ForgeDirection.NORTH);
break;
case 1:
- var6.setFrontFacing((byte) 5);
+ var6.setFrontFacing(ForgeDirection.EAST);
break;
case 2:
- var6.setFrontFacing((byte) 3);
+ var6.setFrontFacing(ForgeDirection.SOUTH);
break;
case 3:
- var6.setFrontFacing((byte) 4);
+ var6.setFrontFacing(ForgeDirection.WEST);
}
}
}
@@ -496,6 +551,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
+ @Override
public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) {
TileEntity tTileEntity = aPlayer.worldObj.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof BaseMetaTileEntity
@@ -505,6 +561,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
: null);
}
+ @Override
public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java
index 0a4c5bd4a4..e0fc48aa45 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java
@@ -28,6 +28,7 @@ public class GTPP_Item_Machines extends ItemBlock {
this.setCreativeTab(GregTech_API.TAB_GREGTECH);
}
+ @Override
@SuppressWarnings("unchecked")
public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) {
try {
@@ -197,11 +198,13 @@ public class GTPP_Item_Machines extends ItemBlock {
}
}
+ @Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
float hitX, float hitY, float hitZ) {
return false;
}
+ @Override
public String getUnlocalizedName(ItemStack aStack) {
short tDamage = (short) (this.getDamage(aStack) + 30400); // Add Offset;
return tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length
@@ -211,6 +214,7 @@ public class GTPP_Item_Machines extends ItemBlock {
: "";
}
+ @Override
public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
super.onCreated(aStack, aWorld, aPlayer);
short tDamage = (short) ((short) this.getDamage(aStack) + 30400); // Add Offset;
@@ -220,6 +224,7 @@ public class GTPP_Item_Machines extends ItemBlock {
}
}
+ @Override
public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side,
float hitX, float hitY, float hitZ, int aMeta) {
short tDamage = (short) ((short) this.getDamage(aStack) + 30400); // Add Offset;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
index 533676f75b..64185ca239 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -63,15 +64,16 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract {
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
- return CasingTextureHandler.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
+ return CasingTextureHandler.getIcon(ordinalSide, aMeta);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide) {
+ final int ordinalSide) {
final GregtechMetaCasingBlocks i = this;
- return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
+ return CasingTextureHandler
+ .handleCasingsGT(aWorld, xCoord, yCoord, zCoord, ForgeDirection.getOrientation(ordinalSide), i);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
index 320fefb583..8100532ed9 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
@@ -85,7 +85,7 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return CasingTextureHandler2.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return CasingTextureHandler2.getIcon(ordinalSide, aMeta);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
index de7e6aa953..c38b7d4282 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
@@ -95,18 +95,18 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return CasingTextureHandler3.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return CasingTextureHandler3.getIcon(ordinalSide, aMeta);
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide) {
+ final int ordinalSide) {
final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord);
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if ((tMeta != 12) || !GregtechMetaCasingBlocks3.mConnectedMachineTextures) {
- return getIcon(aSide, tMeta);
+ return getIcon(ordinalSide, tMeta);
}
final int tStartIndex = 0;
if (tMeta == 12) {
@@ -123,7 +123,7 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract
&& aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
&& aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta };
- switch (aSide) {
+ switch (ordinalSide) {
case 0: {
if (tConnectedSides[0]) {
return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon();
@@ -374,6 +374,6 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract
}
return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon();
}
- return CasingTextureHandler3.getIcon(aSide, tMeta);
+ return CasingTextureHandler3.getIcon(ordinalSide, tMeta);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
index b637bd2113..038e4f0366 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
@@ -47,18 +47,9 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract
GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11));
}
- // private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler();
-
- /*
- * @Override
- * @SideOnly(Side.CLIENT) public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final
- * int zCoord, final int aSide) { final GregtechMetaCasingBlocks4 i = this; return
- * mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); }
- */
-
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return getStaticIcon((byte) aSide, (byte) aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return getStaticIcon((byte) ordinalSide, (byte) aMeta);
}
public static IIcon getStaticIcon(final byte aSide, final byte aMeta) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
index 700e14c711..99228b6ed3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
@@ -74,11 +74,11 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return getStaticIcon(aSide, aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return getStaticIcon(ordinalSide, aMeta);
}
- public static IIcon getStaticIcon(final int aSide, final int aMeta) {
+ public static IIcon getStaticIcon(final int ordinalSide, final int aMeta) {
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
case 0:
@@ -96,22 +96,22 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract
case 6:
return TexturesGtBlock.TEXTURE_TECH_PANEL_H.getIcon();
case 7:
- if (aSide == 0 || aSide == 1) {
+ if (ordinalSide == 0 || ordinalSide == 1) {
return TexturesGtBlock.Manipulator_Top.getIcon();
}
return TexturesGtBlock.NeutronPulseManipulator.getIcon();
case 8:
- if (aSide == 0 || aSide == 1) {
+ if (ordinalSide == 0 || ordinalSide == 1) {
return TexturesGtBlock.Manipulator_Top.getIcon();
}
return TexturesGtBlock.CosmicFabricManipulator.getIcon();
case 9:
- if (aSide == 0 || aSide == 1) {
+ if (ordinalSide == 0 || ordinalSide == 1) {
return TexturesGtBlock.Manipulator_Top.getIcon();
}
return TexturesGtBlock.InfinityInfusedManipulator.getIcon();
case 10:
- if (aSide == 0 || aSide == 1) {
+ if (ordinalSide == 0 || ordinalSide == 1) {
return TexturesGtBlock.Manipulator_Top.getIcon();
}
return TexturesGtBlock.SpaceTimeContinuumRipper.getIcon();
@@ -124,7 +124,7 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract
case 14:
return TexturesGtBlock.SpaceTimeBendingCore.getIcon();
case 15:
- if (aSide == 0 || aSide == 1) {
+ if (ordinalSide == 0 || ordinalSide == 1) {
return TexturesGtBlock.Blank.getIcon();
}
return TexturesGtBlock.ForceFieldGlass.getIcon();
@@ -136,8 +136,8 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide) {
+ final int ordinalSide) {
final GregtechMetaCasingBlocks5 i = this;
- return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
+ return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, ordinalSide, i);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java
index b23e943ba5..a74d714a80 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java
@@ -46,18 +46,18 @@ public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return CasingTextureHandler6.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return CasingTextureHandler6.getIcon(ordinalSide, aMeta);
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide) {
+ final int ordinalSide) {
final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord);
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if ((tMeta != 0) || !GregtechMetaCasingBlocks6.mConnectedMachineTextures) {
- return getIcon(aSide, tMeta);
+ return getIcon(ordinalSide, tMeta);
}
final int tStartIndex = 0;
if (tMeta == 0) {
@@ -74,7 +74,7 @@ public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract
&& aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
&& aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta };
- switch (aSide) {
+ switch (ordinalSide) {
case 0: {
if (tConnectedSides[0]) {
return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon();
@@ -325,6 +325,6 @@ public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract
}
return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon();
}
- return CasingTextureHandler6.getIcon(aSide, tMeta);
+ return CasingTextureHandler6.getIcon(ordinalSide, tMeta);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java
index 90fff051eb..f6c53e875e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java
@@ -57,9 +57,9 @@ public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlock
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- if ((aMeta >= 0) && (aMeta < 16)) {
- switch (aMeta) {
+ public IIcon getIcon(final int ordinalSide, final int meta) {
+ if ((meta >= 0) && (meta < 16)) {
+ switch (meta) {
case 0:
case 1:
case 2:
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
index 5c386fe59a..685bee8dab 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
@@ -66,7 +66,8 @@ public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksA
GregtechItemList.Casing_Machine_Custom_4.set(new ItemStack(this, 1, 3));
}
- public IIcon getIcon(int aSide, int aMeta) {
+ @Override
+ public IIcon getIcon(int ordinalSide, int aMeta) {
switch (aMeta) {
case 0:
return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
index 3d1aa88f6c..805b9acbd9 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
@@ -7,6 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -86,16 +87,17 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide) {
- return LargeTurbineTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, this);
+ final int ordinalSide) {
+ return LargeTurbineTextureHandler
+ .handleCasingsGT(aWorld, xCoord, yCoord, zCoord, ForgeDirection.getOrientation(ordinalSide), this);
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return getStaticIcon((byte) aSide, (byte) aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return getStaticIcon((byte) ordinalSide, (byte) aMeta);
}
- public static IIcon getStaticIcon(final byte aSide, final byte aMeta) {
+ public static IIcon getStaticIcon(final int ordinalSide, final byte aMeta) {
switch (aMeta) {
case 0:
return TexturesGtBlock.Casing_Redox_1.getIcon();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
index 6237ce7a9e..b81e381b8c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
@@ -73,13 +73,13 @@ public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAb
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide) {
- return getStaticIcon((byte) aSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord));
+ final int ordinalSide) {
+ return getStaticIcon((byte) ordinalSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord));
}
@Override
- public IIcon getIcon(final int aSide, final int aMeta) {
- return getStaticIcon((byte) aSide, (byte) aMeta);
+ public IIcon getIcon(final int ordinalSide, final int aMeta) {
+ return getStaticIcon((byte) ordinalSide, (byte) aMeta);
}
public static IIcon getStaticIcon(final byte aSide, final byte aMeta) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
index 39171a1c05..0d4606ab4f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
@@ -75,7 +75,8 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs
// GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 15));
}
- public IIcon getIcon(int aSide, int aMeta) {
+ @Override
+ public IIcon getIcon(int ordinalSide, int aMeta) {
if (aMeta < 10) {
return TexturesGtBlock.TIERED_MACHINE_HULLS[aMeta].getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
index ef2d25cf3e..ae9f49c60a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
@@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import gregtech.api.enums.Textures;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
@@ -12,7 +13,7 @@ public class CasingTextureHandler {
// private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58();
private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock();
- public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
+ public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
// Centrifuge
@@ -70,12 +71,7 @@ public class CasingTextureHandler {
}
public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
- /*
- * if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord,
- * zCoord, aSide, thisBlock); } return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide,
- * thisBlock);
- */
- return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ final ForgeDirection side, final GregtechMetaCasingBlocks thisBlock) {
+ return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, side, thisBlock);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
index 1d0f5e0699..e02a9ffbd3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
@@ -6,7 +6,7 @@ import gregtech.api.enums.Textures;
public class CasingTextureHandler2 {
- public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
+ public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
case 0:
@@ -36,7 +36,7 @@ public class CasingTextureHandler2 {
case 12:
return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
case 13:
- if (aSide < 2) {
+ if (ordinalSide < 2) {
return TexturesGtBlock.TEXTURE_TECH_A.getIcon();
} else {
return TexturesGtBlock.TEXTURE_TECH_B.getIcon();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
index c3d2e90c12..9ffbbd6a85 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
@@ -6,7 +6,7 @@ import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3;
public class CasingTextureHandler3 {
- public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
+ public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
case 0:
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java
index f9f95df8b5..e33099b09a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java
@@ -6,7 +6,7 @@ import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks6;
public class CasingTextureHandler6 {
- public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
+ public static IIcon getIcon(final int ordinalSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
case 0:
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
index 129dbd13cc..8ad5bd914d 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -58,33 +59,36 @@ public class TexturesCentrifugeMultiblock {
frontFaceActive_8 };
public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
- return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ final ForgeDirection side, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, side, thisBlock);
}
- private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) {
+ private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ,
+ ForgeDirection side) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (!(tTileEntity instanceof IGregTechTileEntity)) return 0;
IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity;
if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge
- && tTile.getFrontFacing() == aSide)
+ && tTile.getFrontFacing() == side)
return tTile.isActive() ? 1 : 2;
return 0;
}
public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final ForgeDirection side, final GregtechMetaCasingBlocks thisBlock) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ final int ordinalSide = side.ordinal();
if (tMeta != 0) {
- return CasingTextureHandler.getIcon(aSide, tMeta);
+ return CasingTextureHandler.getIcon(ordinalSide, tMeta);
}
- int tInvertLeftRightMod = aSide % 2 * 2 - 1;
- switch (aSide / 2) {
+
+ int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1;
+ switch (ordinalSide / 2) {
case 0:
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
- if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) {
+ if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, side) != 0) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j);
@@ -96,7 +100,7 @@ public class TexturesCentrifugeMultiblock {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
- if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) {
+ if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, side) != 0) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod);
@@ -108,7 +112,7 @@ public class TexturesCentrifugeMultiblock {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
- if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) {
+ if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, side) != 0) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
deleted file mode 100644
index d8c84f1886..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
+++ /dev/null
@@ -1,509 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.blocks.textures;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge;
-
-public class TexturesGregtech58 {
-
- private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE1");
- private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1");
- private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE2");
- private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2");
- private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE3");
- private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3");
- private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE4");
- private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4");
- private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE5");
- private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5");
- private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE6");
- private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6");
- private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE7");
- private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7");
- private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE8");
- private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8");
- private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon(
- "iconsets/LARGETURBINE_ACTIVE9");
- private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9");
-
- private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active);
-
- Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] { frontFace_0, frontFace_1,
- frontFace_2, frontFace_3, frontFace_4, frontFace_5, frontFace_6, frontFace_7, frontFace_8 };
-
- Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] { frontFaceActive_0,
- frontFaceActive_1, frontFaceActive_2, frontFaceActive_3, frontFaceActive_4, frontFaceActive_5,
- frontFaceActive_6, frontFaceActive_7, frontFaceActive_8 };
-
- public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
- return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
- }
-
- public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
- final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
- if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
- return CasingTextureHandler.getIcon(aSide, tMeta);
- }
- final int tStartIndex = tMeta == 6 ? 1 : 13;
- if (tMeta == 0) {
- if ((aSide == 2) || (aSide == 3)) {
- TileEntity tTileEntity;
- IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[0].getIcon();
- }
- return this.TURBINE[0].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[3].getIcon();
- }
- return this.TURBINE[3].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[6].getIcon();
- }
- return this.TURBINE[6].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[1].getIcon();
- }
- return this.TURBINE[1].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[7].getIcon();
- }
- return this.TURBINE[7].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[8].getIcon();
- }
- return this.TURBINE[8].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[5].getIcon();
- }
- return this.TURBINE[5].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[2].getIcon();
- }
- return this.TURBINE[2].getIcon();
- }
- } else if ((aSide == 4) || (aSide == 5)) {
- TileEntity tTileEntity;
- Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1))))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[0].getIcon();
- }
- return this.TURBINE[0].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1))))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[3].getIcon();
- }
- return this.TURBINE[3].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1))))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[6].getIcon();
- }
- return this.TURBINE[6].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[1].getIcon();
- }
- return this.TURBINE[1].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord)))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[7].getIcon();
- }
- return this.TURBINE[7].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1))))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[8].getIcon();
- }
- return this.TURBINE[8].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1))))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[5].getIcon();
- }
- return this.TURBINE[5].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1))))
- && ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
- && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
- && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return this.TURBINE_ACTIVE[2].getIcon();
- }
- return this.TURBINE[2].getIcon();
- }
- }
- return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
- }
- final boolean[] tConnectedSides = {
- (aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta),
- (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta),
- (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta) };
- switch (aSide) {
- case 0:
- if (tConnectedSides[0]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[2])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 1:
- if (tConnectedSides[1]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 2:
- if (tConnectedSides[5]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 3:
- if (tConnectedSides[3]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 4:
- if (tConnectedSides[4]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- case 5:
- if (tConnectedSides[2]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- break;
- }
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
index 45de7da05f..5d907f7e3b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -76,24 +77,26 @@ public class TexturesGregtech59 {
frontFaceActive_6, frontFaceActive_7, frontFaceActive_8 };
public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
- return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ final ForgeDirection side, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, side, thisBlock);
}
public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final ForgeDirection side, final GregtechMetaCasingBlocks thisBlock) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ final int ordinalSide = side.ordinal();
if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
- return CasingTextureHandler.getIcon(aSide, tMeta);
+ return CasingTextureHandler.getIcon(ordinalSide, tMeta);
}
final int tStartIndex = tMeta == 6 ? 1 : 13;
if (tMeta == 0) {
- if ((aSide == 2) || (aSide == 3)) {
+ if ((side == ForgeDirection.NORTH) || (side == ForgeDirection.SOUTH)) {
TileEntity tTileEntity;
IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.SOUTH ? 1 : -1), yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -101,9 +104,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[0].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.SOUTH ? 1 : -1), yCoord, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -111,9 +115,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.SOUTH ? 1 : -1), yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -123,7 +128,7 @@ public class TexturesGregtech59 {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -133,7 +138,7 @@ public class TexturesGregtech59 {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -141,9 +146,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[7].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.NORTH ? 1 : -1), yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -151,9 +157,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[8].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.NORTH ? 1 : -1), yCoord, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -161,9 +168,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[5].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.NORTH ? 1 : -1), yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -171,12 +179,13 @@ public class TexturesGregtech59 {
}
return this.TURBINE[2].getIcon();
}
- } else if ((aSide == 4) || (aSide == 5)) {
+ } else if ((side == ForgeDirection.WEST) || (side == ForgeDirection.EAST)) {
TileEntity tTileEntity;
Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord - 1, zCoord + (side == ForgeDirection.WEST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -184,9 +193,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[0].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord, zCoord + (side == ForgeDirection.WEST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -194,9 +204,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord + 1, zCoord + (side == ForgeDirection.WEST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -206,7 +217,7 @@ public class TexturesGregtech59 {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -216,7 +227,7 @@ public class TexturesGregtech59 {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -224,9 +235,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[7].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord + 1, zCoord + (side == ForgeDirection.EAST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -234,9 +246,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[8].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord, zCoord + (side == ForgeDirection.EAST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -244,9 +257,10 @@ public class TexturesGregtech59 {
}
return this.TURBINE[5].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord - 1, zCoord + (side == ForgeDirection.EAST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
@@ -270,8 +284,8 @@ public class TexturesGregtech59 {
&& (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta),
(aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock)
&& (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta) };
- switch (aSide) {
- case 0:
+ switch (side) {
+ case DOWN:
if (tConnectedSides[0]) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
@@ -311,7 +325,7 @@ public class TexturesGregtech59 {
if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
}
- case 1:
+ case UP:
if (tConnectedSides[1]) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
@@ -351,7 +365,7 @@ public class TexturesGregtech59 {
if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
}
- case 2:
+ case NORTH:
if (tConnectedSides[5]) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
@@ -391,7 +405,7 @@ public class TexturesGregtech59 {
if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
}
- case 3:
+ case SOUTH:
if (tConnectedSides[3]) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
@@ -431,7 +445,7 @@ public class TexturesGregtech59 {
if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
}
- case 4:
+ case WEST:
if (tConnectedSides[4]) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
@@ -471,7 +485,7 @@ public class TexturesGregtech59 {
if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
}
- case 5:
+ case EAST:
if (tConnectedSides[2]) {
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
index 9e6c66fd93..f042b88370 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -57,28 +58,29 @@ public class TexturesGrinderMultiblock {
frontFaceActive_3, frontFaceActive_4, frontFaceActive_5, frontFaceActive_6, frontFaceActive_7,
frontFaceActive_8 };
- private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) {
+ private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection side) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (!(tTileEntity instanceof IGregTechTileEntity)) return 0;
IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity;
- if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == aSide)
+ if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == side)
return tTile.isActive() ? 1 : 2;
return 0;
}
public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaCasingBlocks5 ii) {
+ final int ordinalSide, final GregtechMetaCasingBlocks5 ii) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ final ForgeDirection side = ForgeDirection.getOrientation(ordinalSide);
if (tMeta != 1) {
- return GregtechMetaCasingBlocks5.getStaticIcon(aSide, tMeta);
+ return GregtechMetaCasingBlocks5.getStaticIcon(ordinalSide, tMeta);
}
- int tInvertLeftRightMod = aSide % 2 * 2 - 1;
- switch (aSide / 2) {
+ int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1;
+ switch (ordinalSide / 2) {
case 0:
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
- if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) {
+ if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, side) != 0) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j);
@@ -90,7 +92,7 @@ public class TexturesGrinderMultiblock {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
- if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) {
+ if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, side) != 0) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod);
@@ -102,7 +104,7 @@ public class TexturesGrinderMultiblock {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
- if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) {
+ if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, side) != 0) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java
index 0479241d52..4e77e5d664 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java
@@ -94,6 +94,7 @@ import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.OV
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -166,7 +167,7 @@ public class LargeTurbineTextureHandler {
OVERLAY_SC_TURBINE8_ACTIVE.getIcon(), OVERLAY_SC_TURBINE9_ACTIVE.getIcon(), };
public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
- final int aSide, final GregtechMetaSpecialMultiCasings i) {
+ final ForgeDirection side, final GregtechMetaSpecialMultiCasings i) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
// 0 shaft
@@ -179,7 +180,7 @@ public class LargeTurbineTextureHandler {
IIcon[] mGetCurrentTextureSet_ACTIVE = null;
if ((tMeta <= 0 || tMeta >= 5) && tMeta != 15) {
- return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta);
+ return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), (byte) tMeta);
} else {
if (tMeta == 1) {
mGetCurrentTextureSet = OVERLAY_LP_TURBINE;
@@ -198,15 +199,16 @@ public class LargeTurbineTextureHandler {
mGetCurrentTextureSet_ACTIVE = OVERLAY_SC_TURBINE_ACTIVE;
}
if (mGetCurrentTextureSet == null || mGetCurrentTextureSet_ACTIVE == null) {
- return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta);
+ return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), (byte) tMeta);
}
- if ((aSide == 2) || (aSide == 3)) {
+ if ((side == ForgeDirection.NORTH) || (side == ForgeDirection.SOUTH)) {
TileEntity tTileEntity;
IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.SOUTH ? 1 : -1), yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -214,9 +216,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[0];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.SOUTH ? 1 : -1), yCoord, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -224,9 +227,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[3];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.SOUTH ? 1 : -1), yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -236,7 +240,7 @@ public class LargeTurbineTextureHandler {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -246,7 +250,7 @@ public class LargeTurbineTextureHandler {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -254,9 +258,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[7];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.NORTH ? 1 : -1), yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -264,9 +269,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[8];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.NORTH ? 1 : -1), yCoord, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -274,9 +280,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[5];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord)))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord + (side == ForgeDirection.NORTH ? 1 : -1), yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -284,12 +291,13 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[2];
}
- } else if ((aSide == 4) || (aSide == 5)) {
+ } else if ((side == ForgeDirection.WEST) || (side == ForgeDirection.EAST)) {
TileEntity tTileEntity;
Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord - 1, zCoord + (side == ForgeDirection.WEST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -297,9 +305,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[0];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord, zCoord + (side == ForgeDirection.WEST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -307,9 +316,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[3];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord + 1, zCoord + (side == ForgeDirection.WEST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -319,7 +329,7 @@ public class LargeTurbineTextureHandler {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -329,7 +339,7 @@ public class LargeTurbineTextureHandler {
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord)))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -337,9 +347,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[7];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord + 1, zCoord + (side == ForgeDirection.EAST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -347,9 +358,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[8];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord, zCoord + (side == ForgeDirection.EAST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -357,9 +369,10 @@ public class LargeTurbineTextureHandler {
}
return mGetCurrentTextureSet[5];
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1))))
+ if ((null != (tTileEntity = aWorld
+ .getTileEntity(xCoord, yCoord - 1, zCoord + (side == ForgeDirection.EAST ? 1 : -1))))
&& ((tTileEntity instanceof IGregTechTileEntity))
- && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide)
+ && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == side)
&& (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()))
&& ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) {
if (isUsingAnimatedTexture(tTileEntity)) {
@@ -369,7 +382,7 @@ public class LargeTurbineTextureHandler {
}
}
}
- return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta);
+ return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), (byte) tMeta);
}
public static boolean isUsingAnimatedTexture(TileEntity tTileEntity) {