diff options
author | GDCloud <93287602+GDCloudstrike@users.noreply.github.com> | 2023-04-12 00:40:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 23:40:37 +0100 |
commit | f91a6438f4368aa6ee6a66c744c99607e8caa5e3 (patch) | |
tree | a6c5c1cd57d6ccdf9de4b855cf4c581e4e46c7c4 /src/main/java/gtPlusPlus/xmod | |
parent | 8af1708c18b25c6944789461d95491b54de9259b (diff) | |
download | GT5-Unofficial-f91a6438f4368aa6ee6a66c744c99607e8caa5e3.tar.gz GT5-Unofficial-f91a6438f4368aa6ee6a66c744c99607e8caa5e3.tar.bz2 GT5-Unofficial-f91a6438f4368aa6ee6a66c744c99607e8caa5e3.zip |
Revive Fusion mk5 (#597)
* textures
* casings
* itemlist
* Main
* blue giant
* new rainbow screen + fix mk4 screen
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
8 files changed, 586 insertions, 17 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 743fe25b82..4d9646357f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -405,6 +405,12 @@ public enum GregtechItemList implements GregtechItemContainer { Casing_Fusion_External, Casing_Fusion_Internal, + // FusionTech MK V + + FusionComputer_UV3, + Casing_Fusion_External2, + Casing_Fusion_Internal2, + // large mixer Industrial_Mixer, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java new file mode 100644 index 0000000000..ffd2589b09 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java @@ -0,0 +1,330 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import cpw.mods.fml.relauncher.*; +import gregtech.api.enums.TAE; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.*; + +public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract { + + public static boolean mConnectedMachineTextures = false; + CasingTextureHandler6 TextureHandler = new CasingTextureHandler6(); + + public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { + + public GregtechMetaCasingItemBlocks3(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaCasingBlocks6() { + super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.6", GT_Material_Casings.INSTANCE); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Fusion Machine Casing MK IV"); + TAE.registerTexture(3, 4, new GTPP_CopiedBlockTexture(this, 6, 0)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Advanced Fusion Coil II"); + TAE.registerTexture(3, 5, new GTPP_CopiedBlockTexture(this, 6, 1)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Unnamed"); + TAE.registerTexture(3, 6, new GTPP_CopiedBlockTexture(this, 6, 2)); + GregtechItemList.Casing_Fusion_External.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Fusion_Internal.set(new ItemStack(this, 1, 1)); + } + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return CasingTextureHandler6.getIcon(aSide, aMeta); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, + final int aSide) { + 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); + } + final int tStartIndex = 0; + if (tMeta == 0) { + 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 TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 5].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[2]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[5] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 0].getIcon(); + } + } + case 1: { + if (tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 5].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 0].getIcon(); + } + } + case 2: { + if (tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 3].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 0].getIcon(); + } + } + case 3: { + if (tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 3].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 0].getIcon(); + } + } + case 4: { + if (tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 2].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 0].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 1].getIcon(); + } + } + case 5: { + if (tConnectedSides[2]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 4].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 0].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 1].getIcon(); + } + break; + } + } + return TexturesGtBlock.CONNECTED_FUSION_HULLS_MK4[tStartIndex + 7].getIcon(); + } + return CasingTextureHandler6.getIcon(aSide, tMeta); + } +} 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 new file mode 100644 index 0000000000..f9f95df8b5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler6.java @@ -0,0 +1,30 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.util.IIcon; + +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] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_III.getIcon(); + case 1: + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_III_INNER.getIcon(); + case 2: + return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER.getIcon(); + default: + return TexturesGtBlock._PlaceHolder.getIcon(); + + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } + + static { + GregtechMetaCasingBlocks6.mConnectedMachineTextures = true; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index fc213a381d..abcfa09f13 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -417,6 +417,12 @@ public class TexturesGtBlock { "iconsets/MACHINE_CASING_FUSION_COIL_II"); public static final CustomIcon TEXTURE_CASING_FUSION_CASING_ULTRA = new CustomIcon( "iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA"); + + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III = new CustomIcon("iconsets/MACHINE_CASING_FUSION_4"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_INNER = new CustomIcon( + "iconsets/MACHINE_CASING_FUSION_COIL_III"); + public static final CustomIcon TEXTURE_CASING_FUSION_CASING_HYPER = new CustomIcon( + "iconsets/MACHINE_CASING_FUSION_GLASS_HYPER"); // public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_1 = new CustomIcon("iconsets/FUSIONIII_1"); public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_2 = new CustomIcon("iconsets/FUSIONIII_2"); @@ -431,6 +437,20 @@ public class TexturesGtBlock { public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_11 = new CustomIcon("iconsets/FUSIONIII_11"); public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_12 = new CustomIcon("iconsets/FUSIONIII_12"); + // MK5 Fusion casings + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_1 = new CustomIcon("iconsets/FUSIONIV_1"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_2 = new CustomIcon("iconsets/FUSIONIV_2"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_3 = new CustomIcon("iconsets/FUSIONIV_3"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_4 = new CustomIcon("iconsets/FUSIONIV_4"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_5 = new CustomIcon("iconsets/FUSIONIV_5"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_6 = new CustomIcon("iconsets/FUSIONIV_6"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_7 = new CustomIcon("iconsets/FUSIONIV_7"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_8 = new CustomIcon("iconsets/FUSIONIV_8"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_9 = new CustomIcon("iconsets/FUSIONIV_9"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_10 = new CustomIcon("iconsets/FUSIONIV_10"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_11 = new CustomIcon("iconsets/FUSIONIV_11"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_III_12 = new CustomIcon("iconsets/FUSIONIV_12"); + // Overlays // Fan Textures private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon( @@ -476,6 +496,10 @@ public class TexturesGtBlock { private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon( "TileEntities/adv_machine_screen_random3"); public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3; + + private static final CustomIcon Internal_Casing_Machine_Screen_Rainbow = new CustomIcon( + "TileEntities/overlay_rainbowscreen"); + public static final CustomIcon Casing_Machine_Screen_Rainbow = Internal_Casing_Machine_Screen_Rainbow; private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon( "TileEntities/adv_machine_screen_frequency"); public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency; @@ -848,6 +872,12 @@ public class TexturesGtBlock { TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9, TEXTURE_CASING_FUSION_COIL_II_10, TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12 }; + public static IIconContainer[] CONNECTED_FUSION_HULLS_MK4 = new IIconContainer[] { TEXTURE_CASING_FUSION_COIL_III_1, + TEXTURE_CASING_FUSION_COIL_III_2, TEXTURE_CASING_FUSION_COIL_III_3, TEXTURE_CASING_FUSION_COIL_III_4, + TEXTURE_CASING_FUSION_COIL_III_5, TEXTURE_CASING_FUSION_COIL_III_6, TEXTURE_CASING_FUSION_COIL_III_7, + TEXTURE_CASING_FUSION_COIL_III_8, TEXTURE_CASING_FUSION_COIL_III_9, TEXTURE_CASING_FUSION_COIL_III_10, + TEXTURE_CASING_FUSION_COIL_III_11, TEXTURE_CASING_FUSION_COIL_III_12 }; + public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[] { TEXTURE_CASING_TIERED_ULV, TEXTURE_CASING_TIERED_LV, TEXTURE_CASING_TIERED_MV, TEXTURE_CASING_TIERED_HV, TEXTURE_CASING_TIERED_EV, TEXTURE_CASING_TIERED_IV, TEXTURE_CASING_TIERED_LuV, TEXTURE_CASING_TIERED_ZPM, TEXTURE_CASING_TIERED_UV, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java index cea9665cea..7002ab1cc2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java @@ -47,7 +47,7 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor").addInfo("HARNESSING THE POWER OF A NEUTRON STAR") + tt.addMachineType("Fusion Reactor").addInfo("HARNESSING THE POWER OF A BLUE GIANT") .addInfo("Controller block for the Fusion Reactor Mk IV") .addInfo("131072EU/t and 320M EU capacity per Energy Hatch") .addInfo("If the recipe has a startup cost greater than the") @@ -129,12 +129,12 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus @Override public ITexture getTextureOverlay() { return new GT_RenderedTexture( - this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3 + this.getBaseMetaTileEntity().isActive() ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1); } public IIconContainer getIconOverlay() { - return this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3 + return this.getBaseMetaTileEntity().isActive() ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK5.java new file mode 100644 index 0000000000..778bcf87dd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK5.java @@ -0,0 +1,181 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; + +import java.lang.reflect.Method; + +import net.minecraft.block.Block; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.AdvFusionPower; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaTileEntity_Adv_Fusion_MK5 extends GT_MetaTileEntity_FusionComputer { + + public static final Method mUpdateHatchTexture; + + static { + mUpdateHatchTexture = ReflectionUtils.getMethod(GT_MetaTileEntity_Hatch.class, "updateTexture", int.class); + } + + public GregtechMetaTileEntity_Adv_Fusion_MK5(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, 10); + // Theoretically this fusion reactor has higher startup power, but special value only uses integer + power = new AdvFusionPower((byte) 10, Integer.MAX_VALUE); + } + + public GregtechMetaTileEntity_Adv_Fusion_MK5(String aName) { + super(aName); + power = new AdvFusionPower((byte) 10, Integer.MAX_VALUE); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor").addInfo("HARNESSING THE POWER OF A NEUTRON STAR") + .addInfo("Controller block for the Fusion Reactor Mk V") + .addInfo("524,288EU/t and 1.28B EU capacity per Energy Hatch") + .addInfo("If the recipe has a startup cost greater than the") + .addInfo("number of energy hatches * cap, you can't do it").addSeparator() + .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed") + .addCasingInfo("Fusion Machine Casings MK IV", 79).addStructureInfo("Cover the coils with casing") + .addOtherStructurePart("Advanced Fusion Coils II", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1) + .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be UEV or better") + .toolTipFinisher(CORE.GT_Tooltip_Builder.get()); + return tt; + } + + @Override + public int tier() { + return 10; + } + + @Override + public long maxEUStore() { + return (640010000L * 16) * (Math.min(16, this.mEnergyHatches.size())) / 8L; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Adv_Fusion_MK5(mName); + } + + @Override + public Block getCasing() { + return getFusionCoil(); + } + + @Override + public int getCasingMeta() { + return 0; + } + + @Override + public Block getFusionCoil() { + return ModBlocks.blockCasings6Misc; + } + + @Override + public int getFusionCoilMeta() { + return 1; + } + + @Override + public int tierOverclock() { + return 16; + } + + @Override + public int overclock(int mStartEnergy) { + return (mStartEnergy < 160_000_000) ? 32 + : ((mStartEnergy < 320_000_000) ? 16 + : ((mStartEnergy < 640_000_000) ? 8 : ((mStartEnergy < 1_280_000_000) ? 4 : 1))); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { + new GT_RenderedTexture( + Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, + Dyes.getModulation(-1, Dyes._NULL.mRGBa)), + TextureFactory.builder().addIcon(this.getIconOverlay()).extFacing().build() }; + } else if (!aActive) { + return new ITexture[] { new GT_RenderedTexture( + Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, + Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; + } else { + return new ITexture[] { new GT_RenderedTexture( + TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER, + Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; + } + } + + @Override + public ITexture getTextureOverlay() { + return new GT_RenderedTexture( + this.getBaseMetaTileEntity().isActive() ? TexturesGtBlock.Casing_Machine_Screen_Rainbow + : TexturesGtBlock.Casing_Machine_Screen_1); + } + + public IIconContainer getIconOverlay() { + return this.getBaseMetaTileEntity().isActive() ? TexturesGtBlock.Casing_Machine_Screen_Rainbow + : TexturesGtBlock.Casing_Machine_Screen_1; + } + + public boolean turnCasingActive(final boolean status) { + try { + if (this.mEnergyHatches != null) { + for (final GT_MetaTileEntity_Hatch_Energy hatch : this.mEnergyHatches) { + mUpdateHatchTexture.invoke(hatch, (status ? TAE.getIndexFromPage(3, 6) : 53)); + } + } + if (this.mOutputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Output hatch2 : this.mOutputHatches) { + mUpdateHatchTexture.invoke(hatch2, (status ? TAE.getIndexFromPage(3, 6) : 53)); + } + } + if (this.mInputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Input hatch3 : this.mInputHatches) { + mUpdateHatchTexture.invoke(hatch3, (status ? TAE.getIndexFromPage(3, 6) : 53)); + } + } + } catch (Throwable t) { + return false; + } + return true; + } + + @Override + public String[] getInfoData() { + String tier = "V"; + float plasmaOut = 0; + int powerRequired = 0; + if (this.mLastRecipe != null) { + powerRequired = this.mLastRecipe.mEUt; + if (this.mLastRecipe.getFluidOutput(0) != null) { + plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration; + } + } + + return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t", + "Stored EU: " + mEUStore + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t" }; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java index 0a1b5e0dbf..654e5f8b1e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java @@ -1,16 +1,7 @@ package gtPlusPlus.xmod.gregtech.loaders; import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks4; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks5; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocksPipeGearbox; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMachineCasings; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings2; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaTieredCasingBlocks1; +import gtPlusPlus.xmod.gregtech.common.blocks.*; public class Gregtech_Blocks { @@ -22,6 +13,7 @@ public class Gregtech_Blocks { ModBlocks.blockCasings3Misc = new GregtechMetaCasingBlocks3(); ModBlocks.blockCasings4Misc = new GregtechMetaCasingBlocks4(); ModBlocks.blockCasings5Misc = new GregtechMetaCasingBlocks5(); + ModBlocks.blockCasings6Misc = new GregtechMetaCasingBlocks6(); ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1(); ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java index 05c65b4702..4dc6fe641f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java @@ -3,10 +3,7 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialVacuumFreezer; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_DistillationTower; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_EBF; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Fusion_MK4; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Implosion; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.*; public class GregtechFactoryGradeReplacementMultis { @@ -29,6 +26,9 @@ public class GregtechFactoryGradeReplacementMultis { GregtechItemList.FusionComputer_UV2.set( new GregtechMetaTileEntity_Adv_Fusion_MK4(965, "fusioncomputer.tier.09", "FusionTech MK IV") .getStackForm(1L)); + GregtechItemList.FusionComputer_UV3.set( + new GregtechMetaTileEntity_Adv_Fusion_MK5(975, "fusioncomputer.tier.10", "FusionTech MK V") + .getStackForm(1L)); // 31021 GregtechItemList.Machine_Adv_DistillationTower.set( |