diff options
author | Matt <mtthw8198@gmail.com> | 2021-06-01 14:18:25 -0700 |
---|---|---|
committer | Matt <mtthw8198@gmail.com> | 2021-06-01 14:18:25 -0700 |
commit | f87217e9a044b0f017d4b821017f697ca6568f42 (patch) | |
tree | aad0a14640e146837c950157750e3ad6cca88ea5 /src/main/java/gregtech/common/blocks/GT_Block_Casings2.java | |
parent | 08aa6a7f525eea881a00331bc75f055c3d275c3e (diff) | |
parent | 9555f77feccabf92d3bcc20c985c2060e2455600 (diff) | |
download | GT5-Unofficial-f87217e9a044b0f017d4b821017f697ca6568f42.tar.gz GT5-Unofficial-f87217e9a044b0f017d4b821017f697ca6568f42.tar.bz2 GT5-Unofficial-f87217e9a044b0f017d4b821017f697ca6568f42.zip |
Merge remote-tracking branch 'origin/experimental' into experimental
Diffstat (limited to 'src/main/java/gregtech/common/blocks/GT_Block_Casings2.java')
-rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Casings2.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java index 56a838ecf7..f4f478b7be 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -3,7 +3,7 @@ package gregtech.common.blocks; import gregtech.api.enums.Dyes; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import net.minecraft.block.Block; import net.minecraft.entity.Entity; @@ -11,17 +11,18 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { public GT_Block_Casings2() { super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i != 6){ - Textures.BlockIcons.casingTexturePages[0][(i + 16)] = new GT_CopiedBlockTexture(this, 6, i); - } - } + for (int i = 0; i < 16; i++) { + if (i != 6) { + Textures.BlockIcons.casingTexturePages[0][(i + 16)] = TextureFactory.of(this, i); + } + } //Special handler for Pyrolyse Oven Casing on hatches... - Textures.BlockIcons.casingTexturePages[0][22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa); + Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 0, ForgeDirection.UNKNOWN, Dyes.MACHINE_METAL.mRGBa); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); @@ -58,6 +59,7 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { } + @Override public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { case 0: @@ -96,6 +98,7 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } + @Override public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) { return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); } |