aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-05-01 02:45:56 -0700
committerGitHub <noreply@github.com>2023-05-01 11:45:56 +0200
commitb2c8cfb4ec8b82337a95f51364277964ec968b52 (patch)
treed4cf94acc93249cd649b33ec13c5b0d75f1f75db /src/main/java/gtPlusPlus/xmod/gregtech/common/blocks
parentd2eda84e457d549ad9a51f40e9dd159147a141f8 (diff)
downloadGT5-Unofficial-b2c8cfb4ec8b82337a95f51364277964ec968b52.tar.gz
GT5-Unofficial-b2c8cfb4ec8b82337a95f51364277964ec968b52.tar.bz2
GT5-Unofficial-b2c8cfb4ec8b82337a95f51364277964ec968b52.zip
ForgeDirection (#608)
* ForgeDirection WIP * Fix GTPP_Render_MachineBlock Fix handling of getTexture with facing mask for pipes Kill a bunch of magic numbers * spotlessApply (#612) Co-authored-by: GitHub GTNH Actions <> * Bump bw/tt deps --------- Co-authored-by: Léa Gris <lea.gris@noiraude.net> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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: