diff options
author | NotAPenguin <michiel.vandeginste@gmail.com> | 2024-09-02 23:17:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 23:17:17 +0200 |
commit | 1b820de08a05070909a267e17f033fcf58ac8710 (patch) | |
tree | 02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java | |
parent | afd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff) | |
download | GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2 GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip |
The Great Renaming (#3014)
* move kekztech to a single root dir
* move detrav to a single root dir
* move gtnh-lanthanides to a single root dir
* move tectech and delete some gross reflection in gt++
* remove more reflection inside gt5u
* delete more reflection in gt++
* fix imports
* move bartworks and bwcrossmod
* fix proxies
* move galactigreg and ggfab
* move gtneioreplugin
* try to fix gt++ bee loader
* apply the rename rules to BW
* apply rename rules to bwcrossmod
* apply rename rules to detrav scanner mod
* apply rename rules to galacticgreg
* apply rename rules to ggfab
* apply rename rules to goodgenerator
* apply rename rules to gtnh-lanthanides
* apply rename rules to gt++
* apply rename rules to kekztech
* apply rename rules to kubatech
* apply rename rules to tectech
* apply rename rules to gt
apply the rename rules to gt
* fix tt import
* fix mui hopefully
* fix coremod except intergalactic
* rename assline recipe class
* fix a class name i stumbled on
* rename StructureUtility to GTStructureUtility to prevent conflict with structurelib
* temporary rename of GTTooltipDataCache to old name
* fix gt client/server proxy names
Diffstat (limited to 'src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java')
-rw-r--r-- | src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java new file mode 100644 index 0000000000..8ed9e27f13 --- /dev/null +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeFusionComputer5.java @@ -0,0 +1,230 @@ +package goodgenerator.blocks.tileEntity; + +import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; + +import bartworks.common.loaders.ItemRegistry; +import goodgenerator.blocks.tileEntity.base.MTELargeFusionComputerPP; +import goodgenerator.loader.Loaders; +import goodgenerator.util.DescTextLocalization; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.MTEHatchEnergy; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEHatchOutput; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTUtility; +import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.common.tileentities.machines.IDualInputHatch; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; + +public class MTELargeFusionComputer5 extends MTELargeFusionComputerPP { + + public MTELargeFusionComputer5(int id, String name, String nameRegional) { + super(id, name, nameRegional); + } + + public MTELargeFusionComputer5(String name) { + super(name); + } + + @Override + protected MultiblockTooltipBuilder createTooltip() { + final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); + tt.addMachineType("Fusion Reactor") + .addInfo("Galaxy Collapse.") + .addInfo("Controller block for the Compact Fusion Reactor MK-V.") + .addInfo( + EnumChatFormatting.AQUA + GTUtility.formatNumbers(getSingleHatchPower()) + + EnumChatFormatting.GRAY + + " EU/t and " + + EnumChatFormatting.AQUA + + GTUtility.formatNumbers(capableStartupCanonical() / 32 / M) + + "M" + + EnumChatFormatting.GRAY + + " 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") + .addInfo( + "If the recipe requires a voltage tier over " + GTUtility.getColoredTierNameFromTier((byte) tier()) + + EnumChatFormatting.GRAY + + " , you can't do it either") + .addInfo("Make sure the whole structure is built in the 3x3") + .addInfo("chunk area of the ring center (not controller).") + .addInfo("Performs 4/4 overclock.") + .addInfo("Startup < 160,000,000 EU: 320x Parallel") + .addInfo("Startup < 320,000,000 EU: 256x Parallel") + .addInfo("Startup < 640,000,000 EU: 192x Parallel") + .addInfo("Startup < 1,200,000,000 EU: 128x Parallel") + .addInfo("Startup >= 1,200,000,000 EU: 64x Parallel") + .addInfo( + "Support" + EnumChatFormatting.BLUE + + " Tec" + + EnumChatFormatting.DARK_BLUE + + "Tech" + + EnumChatFormatting.GRAY + + " Energy/Laser Hatches!") + .addInfo("The structure is too complex!") + .addInfo(BLUE_PRINT_INFO) + .addSeparator() + .addCasingInfo("Fusion Machine Casing MK IV", 1664) + .addCasingInfo("Compact Fusion Coil MK-II Finaltype", 560) + .addCasingInfo("Infinity Frame Box", 128) + .addCasingInfo("Cosmic Neutronium Reinforced Borosilicate Glass Block", 63) + .addEnergyHatch("1-32, Hint block with dot 2", 2) + .addInputHatch("1-16, Hint block with dot 1", 1) + .addOutputHatch("1-16, Hint block with dot 1", 1) + .addStructureInfo("Supports Crafting Input Buffer") + .addStructureInfo( + "ALL Hatches must be " + GTUtility.getColoredTierNameFromTier((byte) hatchTier()) + + EnumChatFormatting.GRAY + + " or better") + .toolTipFinisher("Good Generator"); + return tt; + } + + @Override + public int tier() { + return 10; + } + + @Override + public long capableStartupCanonical() { + return 20_480_000_000L; + } + + @Override + public Block getCasingBlock() { + return ModBlocks.blockCasings6Misc; + } + + @Override + public int getCasingMeta() { + return 0; + } + + @Override + public Block getCoilBlock() { + return Loaders.compactFusionCoil; + } + + @Override + public int getCoilMeta() { + return 4; + } + + @Override + public Block getGlassBlock() { + return ItemRegistry.bw_realglas; + } + + @Override + public int getGlassMeta() { + return 14; + } + + @Override + public int hatchTier() { + return 10; + } + + @Override + public Materials getFrameBox() { + return Materials.Infinity; + } + + @Override + public ITexture getTextureOverlay() { + if (this.getBaseMetaTileEntity() + .isActive()) + return TextureFactory.of( + TextureFactory.builder() + .addIcon(TexturesGtBlock.Casing_Machine_Screen_Rainbow) + .extFacing() + .build()); + else return TextureFactory.of( + TextureFactory.builder() + .addIcon(TexturesGtBlock.Casing_Machine_Screen_1) + .extFacing() + .build()); + } + + @Override + public int getMaxPara() { + return 64; + } + + @Override + public int extraPara(int startEnergy) { + if (startEnergy < 160000000) return 5; + if (startEnergy < 320000000) return 4; + if (startEnergy < 640000000) return 3; + if (startEnergy < 1200000000) return 2; + return 1; + } + + @Override + public String[] getStructureDescription(ItemStack stackSize) { + return DescTextLocalization.addText("LargeFusion5.hint", 9); + } + + @Override + public boolean turnCasingActive(boolean status) { + if (this.mEnergyHatches != null) { + for (MTEHatchEnergy hatch : this.mEnergyHatches) { + hatch.updateTexture(status ? TAE.getIndexFromPage(3, 6) : 53); + } + } + if (this.eEnergyMulti != null) { + for (MTEHatchEnergyMulti hatch : this.eEnergyMulti) { + hatch.updateTexture(status ? TAE.getIndexFromPage(3, 6) : 53); + } + } + if (this.mOutputHatches != null) { + for (MTEHatchOutput hatch : this.mOutputHatches) { + hatch.updateTexture(status ? TAE.getIndexFromPage(3, 6) : 53); + } + } + if (this.mInputHatches != null) { + for (MTEHatchInput hatch : this.mInputHatches) { + hatch.updateTexture(status ? TAE.getIndexFromPage(3, 6) : 53); + } + } + if (this.mDualInputHatches != null) { + for (IDualInputHatch hatch : this.mDualInputHatches) { + hatch.updateTexture(status ? TAE.getIndexFromPage(3, 6) : 53); + } + } + return true; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, + int colorIndex, boolean aActive, boolean aRedstone) { + if (side == facing) return new ITexture[] { TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS) + .extFacing() + .build(), getTextureOverlay() }; + if (!aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(52) }; + return new ITexture[] { TextureFactory.builder() + .addIcon(TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER) + .extFacing() + .build() }; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new MTELargeFusionComputer5(mName); + } +} |