diff options
author | Raven Szewczyk <git@eigenraven.me> | 2024-07-20 15:35:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-20 21:35:26 +0700 |
commit | 8b077c28bea7bcc046be1e4b8485d69b4c245a43 (patch) | |
tree | 8601728fda54a11c894fa0a5533672ca40023af8 /src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java | |
parent | a33bca92fbf9ec0a1d7f42f5a1a08b807739007c (diff) | |
download | GT5-Unofficial-8b077c28bea7bcc046be1e4b8485d69b4c245a43.tar.gz GT5-Unofficial-8b077c28bea7bcc046be1e4b8485d69b4c245a43.tar.bz2 GT5-Unofficial-8b077c28bea7bcc046be1e4b8485d69b4c245a43.zip |
Beamline (#2619)
* Beamline
* Remove hardcoded dreamcraft items and spotless
* Remove logs and fix auto structure check
* Remove logs and fix auto structure check
* Fix typo and synchrotron high MF scaling
* sa
(cherry picked from commit b2796d95538a1b683b4a98bf6cb0f8fe21404fbd)
* Add multi textures, add structuredesc info, remove test TC input, add synchrotron/input/output recipes
* Spotless
* Prevent mob spawning on casings
* Fix LINAC glass requirement, make synchrotron structure less ugly, add last recipe
* Spotless
* Add placeholder particle textures
* Add some mask recipes I missed
* Spotless apply for branch lanth-beamline for #2619 (#2630)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Add further error messages to LINAC and Synchrotron, fix MM & LaB6 recipes
* Spotless apply for branch lanth-beamline for #2619 (#2648)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Minor changes, add more multi error messages & 9x U-238 SC recipe
* Spotless apply for branch lanth-beamline for #2619 (#2651)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Missed a change
* Spotless apply for branch lanth-beamline for #2619 (#2652)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Update beamline desc
* Remove comments, move coolant fluid check to Util class
* Spotless
* Spotless apply for branch lanth-beamline for #2619 (#2666)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Fix Mu-Metal recipe output amount, tool stats for MM & LaB6
* Spotless
* Fix multi hatch textures
* Spotless apply for branch lanth-beamline for #2619 (#2676)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Increase Synchrotron output rate eut & antenna tier scaling, in general improve output rates, buff all TC recipes' processing time
* Fix misleading BL tooltip
* update
* remove import
* Buff higher-tier wafer recipes for each IC, from a 4x to 3x increase of recipe amount per two wafer tier increases
* Remove RA1 calls in beamline (#2716)
* Spotless apply for branch lanth-beamline for #2619 (#2717)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* fix
* Spotless apply for branch lanth-beamline for #2619 (#2733)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
---------
Co-authored-by: unknown <gtandemmodding@gmail.com>
Co-authored-by: Elisis <jarrad.thomson@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java')
-rw-r--r-- | src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java new file mode 100644 index 0000000000..5483ee1d0f --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java @@ -0,0 +1,138 @@ +package com.elisis.gtnhlanth.common.hatch; + +import static gregtech.api.enums.Dyes.MACHINE_METAL; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + +import com.elisis.gtnhlanth.common.beamline.BeamLinePacket; +import com.elisis.gtnhlanth.common.beamline.IConnectsToBeamline; +import com.elisis.gtnhlanth.common.beamline.TileBeamline; +import com.github.technus.tectech.util.TT_Utility; + +import gregtech.api.enums.Dyes; +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.objects.GT_RenderedTexture; + +public class TileHatchOutputBeamline extends TileHatchBeamlineConnector<BeamLinePacket> implements IConnectsToBeamline { + + private static final String activeIconPath = "iconsets/OVERLAY_BO_ACTIVE"; + private static final String sideIconPath = "iconsets/OVERLAY_BO_SIDES"; + private static final String connIconPath = "iconsets/BO_CONN"; + + private static final Textures.BlockIcons.CustomIcon activeIcon = new Textures.BlockIcons.CustomIcon(activeIconPath); + private static final Textures.BlockIcons.CustomIcon sideIcon = new Textures.BlockIcons.CustomIcon(sideIconPath); + private static final Textures.BlockIcons.CustomIcon connIcon = new Textures.BlockIcons.CustomIcon(connIconPath); + + public TileHatchOutputBeamline(int id, String name, String nameRegional, int tier) { + super(id, name, nameRegional, tier, ""); + TT_Utility.setTier(tier, this); + } + + public TileHatchOutputBeamline(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture, + new GT_RenderedTexture( + activeIcon, + Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + new GT_RenderedTexture(connIcon) }; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture, + new GT_RenderedTexture( + sideIcon, + Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + new GT_RenderedTexture(connIcon) }; + } + + @Override + public IConnectsToBeamline getNext(IConnectsToBeamline source) { + + IGregTechTileEntity base = this.getBaseMetaTileEntity(); + IGregTechTileEntity next = base.getIGregTechTileEntityAtSide(base.getFrontFacing()); + + if (next == null) { + return null; + } + + IMetaTileEntity meta = next.getMetaTileEntity(); + if (meta instanceof TileBeamline) { + + ((TileBeamline) meta).markUsed(); + return (IConnectsToBeamline) meta; + + } else if (meta instanceof TileHatchInputBeamline && ((TileHatchInputBeamline) meta).canConnect( + base.getFrontFacing() + .getOpposite())) { + + return (IConnectsToBeamline) meta; + } + + return null; + } + + @Override + public void moveAround(IGregTechTileEntity aBaseMetaTileEntity) { + IConnectsToBeamline current = this, source = this, next; + int range = 0; + while ((next = current.getNext(source)) != null && range++ < 100) { + if (next instanceof TileHatchInputBeamline) { + ((TileHatchInputBeamline) next).setContents(q); + break; + } + source = current; + current = next; + } + q = null; + } + + @Override + protected BeamLinePacket loadPacketFromNBT(NBTTagCompound nbt) { + return new BeamLinePacket(nbt); + } + + @Override + public boolean canConnect(ForgeDirection side) { + return this.isOutputFacing(side); + } + + @Override + public boolean isDataInputFacing(ForgeDirection side) { + return this.isInputFacing(side); + } + + @Override + public boolean isFacingValid(ForgeDirection facing) { + return true; + } + + @Override + public boolean isInputFacing(ForgeDirection aSide) { + return false; + } + + @Override + public boolean isOutputFacing(ForgeDirection side) { + return side == this.getBaseMetaTileEntity() + .getFrontFacing(); + } + + @Override + public String[] getDescription() { + return null; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { + return new TileHatchOutputBeamline(mName, mTier, mDescription, mTextures); + } +} |