diff options
Diffstat (limited to 'src')
6 files changed, 92 insertions, 49 deletions
diff --git a/src/main/java/gtnhlanth/common/beamline/MTEBeamlinePipe.java b/src/main/java/gtnhlanth/common/beamline/MTEBeamlinePipe.java index fbfb0eb9c6..5ff7447b28 100644 --- a/src/main/java/gtnhlanth/common/beamline/MTEBeamlinePipe.java +++ b/src/main/java/gtnhlanth/common/beamline/MTEBeamlinePipe.java @@ -111,38 +111,31 @@ public class MTEBeamlinePipe extends MetaPipeEntity implements IConnectsToBeamli @Override public IConnectsToBeamline getNext(IConnectsToBeamline source) { - for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { - - if ((mConnections & 1 << dir.ordinal()) == 0) { - continue; - } - - TileEntity next = this.getBaseMetaTileEntity() - .getTileEntityAtSide(dir); - if (next instanceof IConnectsToBeamline && next != source) { - - if (((IConnectsToBeamline) next).isDataInputFacing(dir.getOpposite())) { - return (IConnectsToBeamline) next; - } - - } else if (next instanceof IGregTechTileEntity) { - - IMetaTileEntity meta = ((IGregTechTileEntity) next).getMetaTileEntity(); - if (meta instanceof IConnectsToBeamline && meta != source) { - - if (meta instanceof MTEBeamlinePipe && (((MTEBeamlinePipe) meta).connectionCount == 2)) { - - ((MTEBeamlinePipe) meta).markUsed(); - return (IConnectsToBeamline) meta; - } - - if (((IConnectsToBeamline) meta).isDataInputFacing(dir.getOpposite())) { - - return (IConnectsToBeamline) meta; - } - } - } - } + /* + * for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + * if ((mConnections & 1 << dir.ordinal()) == 0) { + * continue; + * } + * TileEntity next = this.getBaseMetaTileEntity() + * .getTileEntityAtSide(dir); + * if (next instanceof IConnectsToBeamline && next != source) { + * if (((IConnectsToBeamline) next).isDataInputFacing(dir.getOpposite())) { + * return (IConnectsToBeamline) next; + * } + * } else if (next instanceof IGregTechTileEntity) { + * IMetaTileEntity meta = ((IGregTechTileEntity) next).getMetaTileEntity(); + * if (meta instanceof IConnectsToBeamline && meta != source) { + * if (meta instanceof TileBeamline && (((TileBeamline) meta).connectionCount == 2)) { + * ((TileBeamline) meta).markUsed(); + * return (IConnectsToBeamline) meta; + * } + * if (((IConnectsToBeamline) meta).isDataInputFacing(dir.getOpposite())) { + * return (IConnectsToBeamline) meta; + * } + * } + * } + * } + */ return null; } diff --git a/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java b/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java index dfb210d725..00772fb5e8 100644 --- a/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java +++ b/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java @@ -83,14 +83,53 @@ public class MTEHatchOutputBeamline extends MTEHatchBeamlineConnector<BeamLinePa 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 MTEHatchInputBeamline) { - ((MTEHatchInputBeamline) next).setContents(q); + + ForgeDirection front = this.getBaseMetaTileEntity() + .getFrontFacing(); + + for (int distance = 1; distance <= 129; distance++) { // 128 pipes max + + IGregTechTileEntity nextTE = (IGregTechTileEntity) this.getBaseMetaTileEntity() + .getTileEntityAtSideAndDistance(front, distance); // Straight line transmission only + + if (nextTE == null) { + return; + } + + IMetaTileEntity nextMeta = nextTE.getMetaTileEntity(); + + if (nextMeta == null || !(nextMeta instanceof IConnectsToBeamline)) { // Non-beamliney block + return; + } + + if (((IConnectsToBeamline) nextMeta) instanceof MTEHatchInputBeamline) { + ((MTEHatchInputBeamline) nextMeta).setContents(q); // Reached another multi break; + + } else if (((IConnectsToBeamline) nextMeta) instanceof MTEBeamlinePipe) { // Another pipe follows + + if (((MTEBeamlinePipe) nextMeta).isDataInputFacing(front.getOpposite())) { // Connected to previous pipe + ((MTEBeamlinePipe) nextMeta).markUsed(); + } else { + return; + } + + } else { + return; } - source = current; - current = next; + } + + /* + * while ((next = current.getNext(source)) != null && range++ < 100) { + * if (next instanceof TileHatchInputBeamline) { + * ((TileHatchInputBeamline) next).setContents(q); + * break; + * } + * source = current; + * current = next; + * } + */ q = null; } diff --git a/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java b/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java index 94571d10e0..b7902c5d24 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java @@ -180,7 +180,8 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu .addInfo("Controller block for the LINAC") .addInfo("Accelerates charged particles to higher energies") .addInfo("Increasing length increases output energy, but decreases focus") - .addInfo("Use a lower temperature coolant to improve focus") + .addInfo("Use a lower temperature coolant to improve output focus") + .addInfo("Output energy does not scale for input energies higher than 7500 keV") // .addInfo("Extendable, with a minimum length of 18 blocks") .addInfo(DescTextLocalization.BLUEPRINT_INFO) .addInfo(DescTextLocalization.BEAMLINE_SCANNER_INFO) @@ -347,6 +348,8 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu inputEnergy = this.getInputInformation() .getEnergy(); + + inputEnergy = Math.min(inputEnergy, 7500); // Does not scale past 7500 keV, prevents double LINAC issue /* * outputEnergy = Math.min( * (1 + inputEnergy / Particle.getParticleFromId(outputParticle) diff --git a/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java b/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java index d978b1eaab..cec44a111a 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java @@ -126,6 +126,7 @@ public class MTESourceChamber extends MTEEnhancedMultiBlockBase<MTESourceChamber final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Particle Source") .addInfo("Controller block for the Source Chamber") + .addInfo("Output energy scales with EU/t up to the point shown in the recipe") .addInfo(BLUEPRINT_INFO) .addInfo(DescTextLocalization.BEAMLINE_SCANNER_INFO) .addSeparator() diff --git a/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java b/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java index 3b67f8e172..e5778f0efc 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java @@ -493,9 +493,14 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Particle Accelerator") .addInfo("Controller block for the Synchrotron") - .addInfo("Torus-shaped, accelerates electrons to produce high-energy electromagnetic radiation") + .addInfo("Torus-shaped, accelerates electrons to produce high-energy electromagnetic radiation,") + .addInfo("in the form of photons") + .addInfo("Antenna Casings can be one of two tiers, upgrade them to improve output rate and energy scaling") + .addInfo("Minimum input focus: " + MIN_INPUT_FOCUS) .addInfo(DescTextLocalization.BLUEPRINT_INFO) .addInfo(DescTextLocalization.BEAMLINE_SCANNER_INFO) + + .addInfo("Use a lower temperature coolant to improve output focus") .addInfo("Valid Coolants:"); // Valid coolant list @@ -854,10 +859,13 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im private static float getVoltageFactor(long mEU, int antennaTier) { // float factor = (float) Math.pow(1.00004, -mEU * Math.pow(antennaTier, 1.0/3.0) + 80000); - float factor = (float) -Math.pow(1.1, -mEU / 2000 * Math.pow(antennaTier, 2.0 / 3.0)) + 1; // Strictly improves - // with higher tier - // antenna - return (float) Math.max(1.0, factor); + // float factor = (float) -Math.pow(1.1, -mEU / 2000 * Math.pow(antennaTier, 2.0 / 3.0)) + 1; // Strictly + // improves + // with higher tier + // antenna + float factor = (float) (Math.sqrt(mEU) / 1500); + + return factor; } @@ -893,11 +901,11 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im // Punny, right? private static float getOutputRatetio(float voltageFactor, int antennaTier) { - return (float) (voltageFactor / (10 / Math.pow(2.5, antennaTier))); // Scale ratio with antenna tier, such a - // high - // exponential should be fine so long as - // there - // are only few antenna tiers + return (float) (voltageFactor / (10.0 / Math.pow(2.5, antennaTier))); // Scale ratio with antenna tier, such a + // high + // exponential should be fine so long as + // there + // are only few antenna tiers } @Override diff --git a/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java b/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java index 8545d5e23a..cd598f1bd0 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java @@ -101,7 +101,6 @@ public class MTETargetChamber extends MTEEnhancedMultiBlockBase<MTETargetChamber .addElement('u', ofBlock(LanthItemList.TARGET_RECEPTACLE_CASING, 0)) .addElement('i', ofBlock(LanthItemList.TARGET_HOLDER, 0)) .addElement('o', buildHatchAdder(MTETargetChamber.class).atLeast(OutputBus).casingIndex(CASING_INDEX_CENTRE).dot(4).build()) - .build(); } //spotless:on |