diff options
author | boubou19 <miisterunknown@gmail.com> | 2023-04-10 02:20:55 +0200 |
---|---|---|
committer | boubou19 <miisterunknown@gmail.com> | 2023-04-10 02:20:55 +0200 |
commit | 42f5fb70e399c4ec49438fc6e838e323c62c8ba0 (patch) | |
tree | 0af950f8ef7e0cf0adc5e2727f6f0fd05d4e9973 | |
parent | 4cf78d9ffab5d0e3c61706aee568f57db63dd873 (diff) | |
download | GT5-Unofficial-42f5fb70e399c4ec49438fc6e838e323c62c8ba0.tar.gz GT5-Unofficial-42f5fb70e399c4ec49438fc6e838e323c62c8ba0.tar.bz2 GT5-Unofficial-42f5fb70e399c4ec49438fc6e838e323c62c8ba0.zip |
remove commented out code
27 files changed, 25 insertions, 926 deletions
diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index b880847bd3..1dce2f4848 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -154,11 +154,6 @@ public final class MainLoader { new BaseRecipeLoader().run(transformationInfo); TecTech.LOGGER.info("Recipe Init Done"); - // Hazmat moved to GT5U - // progressBarPostLoad.step("Register Extra Hazmat Suits"); - // registerExtraHazmats(); - // TecTech.LOGGER.info("Hazmat additions done"); - if (!configTecTech.DISABLE_BLOCK_HARDNESS_NERF) { progressBarPostLoad.step("Nerf blocks blast resistance"); adjustTwilightBlockResistance(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java b/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java index 012b5f8b05..f1332bd2cf 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java +++ b/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java @@ -123,8 +123,6 @@ public class AnomalyHandler implements IChunkMetaDataHandler { if (absDifference != 0) { if (player.getDistanceSqToEntity(other) < 1) { double avg = (fieldOther + field) / 2; - // addAnomaly(other.worldObj.provider.dimensionId, new ChunkCoordIntPair(other.chunkCoordX, - // other.chunkCoordZ), Math.min(SWAP_THRESHOLD, PER_PARTICLE * absDifference)); if (TecTech.configTecTech.BOOM_ENABLE) { other.worldObj.createExplosion( other, diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/decay/EMDecay.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/decay/EMDecay.java index 4dfe3ef7a8..a6d85847ab 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/decay/EMDecay.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/decay/EMDecay.java @@ -69,8 +69,7 @@ public final class EMDecay { if (empty) { return decayResult; } - // newEnergyLevel /= qtty; - // lifeMult /= (float) qtty; + for (EMDefinitionStack stack : getOutputStacks().valuesToArray()) { decayResult.putUnify( new EMInstanceStack( diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/EMInstanceStack.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/EMInstanceStack.java index bc5e2af118..2d0d216f54 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/EMInstanceStack.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/EMInstanceStack.java @@ -270,16 +270,6 @@ public final class EMInstanceStack implements IEMStack { long newEnergyLevel) { double newAmount = div(getAmount(), Math.pow(2D, 1D /* 1 second */ / lifeTime)); - // if(definition.getSymbol().startsWith("U ")) { - // System.out.println("newAmount = " + newAmount); - // System.out.println("amountRemaining = " + amountRemaining); - // for(cElementalDecay decay:decays){ - // System.out.println("prob = "+decay.probability); - // for(cElementalDefinitionStack stack:decay.outputStacks.values()){ - // System.out.println("stack = " + stack.getDefinition().getSymbol() + " " + stack.amount); - // } - // } - // } if (newAmount == getAmount()) { newAmount -= ulpSigned(newAmount); } else if (newAmount < 1) { @@ -355,50 +345,6 @@ public final class EMInstanceStack implements IEMStack { Minecraft.getMinecraft().crashed(new CrashReport("Decay failed for: " + this, e)); return null; } - // long amountRemaining = this.amount, amount = this.amount; - // float remainingProbability = 1D; - // - // for (int i = 0; i < differentDecays; i++) { - // if (decays[i].probability >= 1D) { - // long thisDecayAmount = (long) Math.floor(remainingProbability * (double) amount); - // if (thisDecayAmount > 0) { - // if (thisDecayAmount <= amountRemaining) { - // amountRemaining -= thisDecayAmount; - // qttyOfDecay[i] += thisDecayAmount; - // }else {//in case too much was made - // qttyOfDecay[i] += amountRemaining; - // amountRemaining = 0; - // //remainingProbability=0; - // } - // } - // break; - // } - // long thisDecayAmount = (long) Math.floor(decays[i].probability * (double) amount); - // if (thisDecayAmount <= amountRemaining && thisDecayAmount > 0) {//some was made - // amountRemaining -= thisDecayAmount; - // qttyOfDecay[i] += thisDecayAmount; - // } else if (thisDecayAmount > amountRemaining) {//too much was made - // qttyOfDecay[i] += amountRemaining; - // amountRemaining = 0; - // //remainingProbability=0; - // break; - // } - // remainingProbability -= decays[i].probability; - // if(remainingProbability<=0) { - // break; - // } - // } - - // for (int i = 0; i < amountRemaining; i++) { - // double rand = TecTech.RANDOM.nextDouble(); - // for (int j = 0; j < differentDecays; j++) {//looking for the thing it decayed into - // rand -= decays[j].probability; - // if (rand <= 0D) { - // qttyOfDecay[j]++; - // break; - // } - // } - // } if (getDefinition().decayMakesEnergy(energy)) { for (int i = differentDecays - 1; i >= 0; i--) { diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMAtomDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMAtomDefinition.java index 6f51a43627..29f2045b8e 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMAtomDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMAtomDefinition.java @@ -1645,21 +1645,6 @@ public class EMAtomDefinition extends EMComplexTemplate { return new EMDecay[] { new EMDecay(0.75D, decaysInto.toArray(new EMDefinitionStack[0])), deadEnd }; } - // @Override - // public iElementalDefinition getAnti() { - // EMDefinitionStack[] stacks = this.elementalStacks.values(); - // EMDefinitionStack[] antiElements = new EMDefinitionStack[stacks.length]; - // for (int i = 0; i < antiElements.length; i++) { - // antiElements[i] = new EMDefinitionStack(stacks[i].definition.getAnti(), stacks[i].amount); - // } - // try { - // return new dAtomDefinition(false, antiElements); - // } catch (tElementalException e) { - // if (DEBUG_MODE) e.printStackTrace(); - // return null; - // } - // } - @Override public EMAtomDefinition getAnti() { EMDefinitionStackMap anti = new EMDefinitionStackMap(); @@ -1935,8 +1920,7 @@ public class EMAtomDefinition extends EMComplexTemplate { new EMDefinitionStack(getFirstStableIsotope(9), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), Fluorine.mGas, 144); - // transformationInfo.addFluid(new EMDefinitionStack(getFirstStableIsotope(10), - // AVOGADRO_CONSTANT_144),Neon.mGas.getID(), 144); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(11), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2036,19 +2020,13 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Gallium, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(32), AVOGADRO_CONSTANT_144),dust, - // Germanium,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(33), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, Arsenic, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(34), AVOGADRO_CONSTANT_144),dust, - // Selenium,1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(35), AVOGADRO_CONSTANT_144),dust, - // Bromine,1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(36), AVOGADRO_CONSTANT_144),dust, - // Krypton,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(37), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2064,8 +2042,7 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Yttrium, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(40), AVOGADRO_CONSTANT_144),dust, - // Zirconium,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(41), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2076,12 +2053,7 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Molybdenum, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(43), AVOGADRO_CONSTANT_144),dust, - // Technetium,1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(44), AVOGADRO_CONSTANT_144),dust, - // Ruthenium,1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(45), AVOGADRO_CONSTANT_144),dust, - // Rhodium,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(46), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2117,10 +2089,7 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Tellurium, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(53), AVOGADRO_CONSTANT_144),dust, - // Iodine,1); - // transformationInfo.addFluid(new EMDefinitionStack(getFirstStableIsotope(54), - // AVOGADRO_CONSTANT_144),Xenon.mGas.getID(), 144); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(55), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2201,8 +2170,7 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Lutetium, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(72), AVOGADRO_CONSTANT_144),dust, - // Hafnum,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(73), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2213,8 +2181,7 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Tungsten, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(75), AVOGADRO_CONSTANT_144),dust, - // Rhenium,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(76), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2239,8 +2206,7 @@ public class EMAtomDefinition extends EMComplexTemplate { new EMDefinitionStack(getFirstStableIsotope(80), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), Mercury.mFluid, 144); - // transformationInfo.addOredict(new EMDefinitionStack(getFirstStableIsotope(81), AVOGADRO_CONSTANT_144),dust, - // Thallium,1); + transformationInfo.addOredict( new EMDefinitionStack(getFirstStableIsotope(82), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, @@ -2260,33 +2226,18 @@ public class EMAtomDefinition extends EMComplexTemplate { dust, Bismuth, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(84),AVOGADRO_CONSTANT_144),dust, - // Polonium,1); - // transformationInfo.addFluid(new - // EMDefinitionStack(getBestUnstableIsotope(85),AVOGADRO_CONSTANT_144),Astatine.mPlasma.getID(), 144); + transformationInfo.addFluid( new EMDefinitionStack(getBestUnstableIsotope(86), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), Radon.mGas, 144); - // transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(87),AVOGADRO_CONSTANT_144),dust, - // Francium,1); - // transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(88),AVOGADRO_CONSTANT_144),dust, - // Radium,1); - // transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(89),AVOGADRO_CONSTANT_144),dust, - // Actinium,1); + transformationInfo.addOredict( new EMDefinitionStack(getBestUnstableIsotope(90), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, Thorium, 1); - // transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(91),AVOGADRO_CONSTANT_144),dust, - // Protactinium,1); - //// transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(92),AVOGADRO_CONSTANT_144), - // dust, Uranium,1); - // transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(93),AVOGADRO_CONSTANT_144),dust, - // Neptunium,1); - //// transformationInfo.addOredict(new EMDefinitionStack(getBestUnstableIsotope(94),AVOGADRO_CONSTANT_144), - // dust, Plutonium,1); + transformationInfo.addOredict( new EMDefinitionStack(getBestUnstableIsotope(95), EM_COUNT_PER_MATERIAL_AMOUNT_DIMINISHED), dust, diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMHadronDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMHadronDefinition.java index b1f6c79d30..60dc89ba01 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMHadronDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMHadronDefinition.java @@ -57,8 +57,7 @@ public class EMHadronDefinition extends EMComplexTemplate { // TODO Optimize map private final int amount; // generation max present inside - minus if contains any antiquark private final byte type; - // private final FluidStack fluidThing; - // private final ItemStack itemThing; + private final EMConstantStackMap quarkStacks; @@ -346,21 +345,6 @@ public class EMHadronDefinition extends EMComplexTemplate { // TODO Optimize map return type; } - // @Override - // public iElementalDefinition getAnti() { - // cElementalDefinitionStack[] stacks = this.quarkStacks.values(); - // cElementalDefinitionStack[] antiElements = new cElementalDefinitionStack[stacks.length]; - // for (int i = 0; i < antiElements.length; i++) { - // antiElements[i] = new cElementalDefinitionStack(stacks[i].definition.getAnti(), stacks[i].amount); - // } - // try { - // return new dHadronDefinition(false, antiElements); - // } catch (tElementalException e) { - // if (DEBUG_MODE) e.printStackTrace(); - // return null; - // } - // } - @Override public IEMDefinition getAnti() { EMDefinitionStackMap anti = new EMDefinitionStackMap(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMNuclideIAEA.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMNuclideIAEA.java index e5e0bb35ea..cae4a3a876 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMNuclideIAEA.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/EMNuclideIAEA.java @@ -132,11 +132,6 @@ public final class EMNuclideIAEA { } private void getMoreData(String[] cells) { - // if(DEBUG_MODE) { - // if (add(cells[14])) System.out.println(N + " " + Z); - // if (add(cells[17])) System.out.println(N + " " + Z); - // if (add(cells[20])) System.out.println(N + " " + Z); - // } new energeticState( this, getHalfTime(), @@ -249,11 +244,6 @@ public final class EMNuclideIAEA { nuclide.energeticStates = new TreeMap<>(); } nuclide.energeticStates.put(energy, this); - // if(DEBUG_MODE) { - // if (add(cells[12])) System.out.println(nuclide.N + " " + nuclide.Z); - // if (add(cells[15])) System.out.println(nuclide.N + " " + nuclide.Z); - // if (add(cells[18])) System.out.println(nuclide.N + " " + nuclide.Z); - // } decaymodes = getDecaysFixed( cells[12], doubleOrNaN(cells[13], "chance 1", nuclide), diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/EMLeptonDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/EMLeptonDefinition.java index 8e71fe3f59..46663605b2 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/EMLeptonDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/EMLeptonDefinition.java @@ -42,8 +42,6 @@ public class EMLeptonDefinition extends EMFermionDefinition { protected EMLeptonDefinition(String name, String symbol, int type, double mass, int charge, int ID, String bind) { super(name, TT_Utility.toSuperscript(symbol), type, mass, charge, -1, ID, bind); - // this.itemThing=null; - // this.fluidThing=null; } public static void run(EMDefinitionsRegistry registry) { diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java index 2512fc7aaf..cb7cdc62d1 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java +++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java @@ -53,11 +53,6 @@ public final class QuantumGlassBlock extends BlockBase { return false; } - // @Override - // public boolean canRenderInPass(int pass) { - // return true; - // } - @Override public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { return false; diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java index 24838bdaf9..3584186ef4 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java +++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java @@ -60,11 +60,6 @@ public final class QuantumStuffBlock extends BlockBase { return false; } - // @Override - // public boolean canRenderInPass(int pass) { - // return true; - // } - @Override public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { return false; diff --git a/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java b/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java index a57cc32cab..0a072e3872 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java +++ b/src/main/java/com/github/technus/tectech/thing/item/renderElemental/RenderElementalName.java @@ -42,8 +42,6 @@ public class RenderElementalName implements IItemRenderer { tessellator.addVertexWithUV(16, 16, 0.0, icon.getMaxU(), icon.getMaxV()); tessellator.addVertexWithUV(16, 0.0, 0.0, icon.getMaxU(), icon.getMinV()); tessellator.draw(); - // ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), - // icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625f); } String sym = ((IElementalItem) item).getSymbol(itemStack, (int) (System.currentTimeMillis() / 1000)); if (sym != null) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java index 3ef9180649..97f6ad358b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java @@ -19,11 +19,6 @@ public class GT_MetaTileEntity_Hatch_InputElemental extends GT_MetaTileEntity_Ha TT_Utility.setTier(aTier, this); } - // public GT_MetaTileEntity_Hatch_InputElemental(String aName, int aTier, String aDescription, ITexture[][][] - // aTextures) { - // super(aName, aTier, aDescription, aTextures); - // } - public GT_MetaTileEntity_Hatch_InputElemental(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java index 4274ce14aa..01b52a3649 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java @@ -22,11 +22,6 @@ public class GT_MetaTileEntity_Hatch_OutputElemental extends GT_MetaTileEntity_H TT_Utility.setTier(aTier, this); } - // public GT_MetaTileEntity_Hatch_OutputElemental(String aName, int aTier, String aDescription, ITexture[][][] - // aTextures) { - // super(aName, aTier, aDescription, aTextures); - // } - public GT_MetaTileEntity_Hatch_OutputElemental(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java index 5ca8cc4787..03acc689b1 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java @@ -84,20 +84,6 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch imple return new ITexture[] { aBaseTexture, new GT_RenderedTexture(ScreenOFF) }; } - // @Override - // public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - // if (aBaseMetaTileEntity.isClientSide() && (aTick % 20L == 0L)) { - // //refresh casing on state change - // int Xpos = aBaseMetaTileEntity.getXCoord(); - // int Ypos = aBaseMetaTileEntity.getYCoord(); - // int Zpos = aBaseMetaTileEntity.getZCoord(); - // try { - // aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(Xpos , Ypos, Zpos , Xpos , Ypos, Zpos ); - // } catch (Exception e) {} - // } - // super.onPostTick(aBaseMetaTileEntity, aTick); - // } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { return new GT_MetaTileEntity_Hatch_Param(mName, mTier, mDescription, mTextures); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java index bf41683c03..905c912c24 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java @@ -50,20 +50,6 @@ public class GT_MetaTileEntity_Hatch_ParamText extends GT_MetaTileEntity_Hatch_P super(aName, aTier, aDescription, aTextures); } - // @Override - // public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - // if (aBaseMetaTileEntity.isClientSide() && (aTick % 20L == 0L)) { - // //refresh casing on state change - // int Xpos = aBaseMetaTileEntity.getXCoord(); - // int Ypos = aBaseMetaTileEntity.getYCoord(); - // int Zpos = aBaseMetaTileEntity.getZCoord(); - // try { - // aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(Xpos , Ypos, Zpos , Xpos , Ypos, Zpos ); - // } catch (Exception e) {} - // } - // super.onPostTick(aBaseMetaTileEntity, aTick); - // } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { return new GT_MetaTileEntity_Hatch_ParamText(mName, mTier, mDescription, mTextures); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java index 65441e4149..9b4f0ee12c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java @@ -252,13 +252,6 @@ public class GT_MetaTileEntity_Hatch_Rack extends GT_MetaTileEntity_Hatch implem } } - // @Override - // public void onRemoval() { - // if(mInventory!=null && (heat>0 || (getBaseMetaTileEntity()!=null && getBaseMetaTileEntity().isActive()))) - // for(int i=0;i<mInventory.length;i++) - // mInventory[i]=null; - // } - @Override public int getSizeInventory() { // HACK TO NOT DROP CONTENTS!!! return heat > 500 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java index ebfe18d7d7..13e24b73ad 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java @@ -337,14 +337,6 @@ public class GT_MetaTileEntity_Hatch_Uncertainty extends GT_MetaTileEntity_Hatch return status; } - // @Override - // public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - // if(aSide == this.getBaseMetaTileEntity().getFrontFacing()) { - // changeMode(++mode); - // GT_Utility.sendChatToPlayer(aPlayer, "Equation mode: "+mode); - // } - // } - @Override public boolean useModularUI() { return true; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 684dc949ee..080481c17f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -625,11 +625,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB holdItem = null; } - // @Override - // public boolean isFacingValid(byte aFacing) { - // return aFacing >= 2; - // } - @Override public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { if (aBaseMetaTileEntity.isServerSide()) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java index 1a26b52606..0d15cb3c2f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java @@ -265,17 +265,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach break; case STATUS_UNUSED: default: - // if (GregTech_API.sColoredGUI && this.mContainer.mTileEntity != null) { - // int tColor = this.mContainer.mTileEntity.getColorization() & 15; - // if (tColor < ItemDye.field_150922_c.length) { - // tColor = ItemDye.field_150922_c[tColor]; - // GL11.glColor4f((float)(tColor >> 16 & 255) / 255.0F, (float)(tColor >> 8 & 255) / 255.0F, - // (float)(tColor & 255) / 255.0F, 1F); - // } - // } - // drawTexturedModalRect(x + su * i, y + sv * j, 212, 96, su+2, sv+2); - // GL11.glColor4f(1f, 1f, 1f, 1f); - // break; + } } @@ -300,9 +290,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach for (int param = 0; param < 2; param++) { if (x < (u += su)) { if (y < v) { - // if(mContainer.eParamsInStatus[hatch + (10*param)]==STATUS_UNUSED){ - // return; - // } + hoveringText( ((GT_MetaTileEntity_MultiblockBase_EM) mte) .getFullLedDescriptionIn(hatch, param), @@ -311,9 +299,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach fontRendererObj); return; } else if (y >= v && y < v + sv) { - // if(mContainer.eParamsOutStatus[hatch + (10*param)]==STATUS_UNUSED){ - // return; - // } + hoveringText( ((GT_MetaTileEntity_MultiblockBase_EM) mte) .getFullLedDescriptionOut(hatch, param), @@ -362,8 +348,6 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach y2 = this.height - i1 - 6; } - // this.zLevel = 300.0F; - // itemRender.zLevel = 300.0F; int j1 = 0xf0001040; // bg this.drawGradientRect(x2 - 3, y2 - 4, x2 + k + 3, y2 - 3, j1, j1); this.drawGradientRect(x2 - 3, y2 + i1 + 3, x2 + k + 3, y2 + i1 + 4, j1, j1); @@ -388,11 +372,8 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach y2 += 10; } - // this.zLevel = 0.0F; - // itemRender.zLevel = 0.0F; GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); - // RenderHelper.enableStandardItemLighting(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 5d06e75a09..bab42c11e1 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -1018,8 +1018,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM mProgresstime = 0; mMaxProgresstime = 0; eAvailableData = 0; - // getBaseMetaTileEntity().disableWorking(); //can add in override - // hatchesStatusUpdate_EM(); //called always after recipe checks } private void cleanOrExplode() { @@ -1794,19 +1792,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM return true; } - // public final boolean energyFlowWithoutEffieciencyComputation(int eu,long ampere) { - // long temp = eu * ampere;//quick scope sign - // if (temp > 0) { - // this.addEnergyOutput_EM(eu, ampere); - // } else if (temp < 0) { - // if (!this.drainEnergyInput_EM(eu,eu, ampere)) { - // stopMachine(); - // return false; - // } - // } - // return true; - // } - @Override public long maxEUStore() { return Math.max(maxEUinputMin * (eMaxAmpereFlow << 3), maxEUoutputMin * (eMaxAmpereGen << 3)); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java index 7c7481bf26..1cac23e098 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java @@ -501,8 +501,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB outputEM = new EMInstanceStackMap[] { map }; partner.stack = stack = null; - // System.out.println("check = " + check); - // System.out.println("preMass-map.getMass() = " + (preMass - map.getMass())); + return check ? preMass - map.getMass() : Math.min(preMass - map.getMass(), 0); } return 0; @@ -527,12 +526,10 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB (stack.getDefinition().getMatterMassType() << 16) | stack2.getDefinition().getMatterMassType()); if (handleRecipe(stack2, map, colliderHandler)) return 0; } - // System.out.println("outputEM[0].getMass() = " + outputEM[0].getMass()); outputEM = new EMInstanceStackMap[] { map }; partner.stack = stack = null; - // System.out.println("check = " + check); - // System.out.println("preMass-map.getMass() = " + (preMass - map.getMass())); + return Math.min(preMass - map.getMass(), 0); } return 0; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java index 429583cfea..d0855a73e7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java @@ -96,12 +96,6 @@ public class Behaviour_Centrifuge implements GT_MetaTileEntity_EM_machine.IBehav stacks[i].setAmount(amountPerFraction); toThis[i].putReplace(stacks[i]); } - // int remainingAmount = (int) (me.amount % fractionCount); - // while (remainingAmount > 0) { - // int amountToAdd = TecTech.RANDOM.nextInt(remainingAmount) + 1; - // stacks[TecTech.RANDOM.nextInt(fractionCount)].amount += amountToAdd; - // remainingAmount -= amountToAdd; - // } } @Override @@ -188,9 +182,6 @@ public class Behaviour_Centrifuge implements GT_MetaTileEntity_EM_machine.IBehav absMassPerOutput += tempMass; } } - // if(DEBUG_MODE){ - // TecTech.LOGGER.info("absMass "+absMassPerOutput); - // } absMassPerOutput = div(absMassPerOutput, fractionCount); if (DEBUG_MODE) { TecTech.LOGGER.info("absMassPerOutput " + absMassPerOutput); @@ -202,12 +193,7 @@ public class Behaviour_Centrifuge implements GT_MetaTileEntity_EM_machine.IBehav if (stacks[stackNo] != null) { double stackMass = Math.abs(stacks[stackNo].getMass()); double amount = div(remaining, Math.abs(stacks[stackNo].getDefinition().getMass())); - // if(DEBUG_MODE){ - // TecTech.LOGGER.info("stackMass "+stackMass); - // TecTech.LOGGER.info("defMass "+stacks[stackNo].definition.getMass()); - // TecTech.LOGGER.info("remaining "+remaining); - // TecTech.LOGGER.info("amountToMoveAvailable "+amount+"/"+stacks[stackNo].amount); - // } + if (stackMass == 0) { addRandomly(stacks[stackNo], outputs, fractionCount); stacks[stackNo] = null; @@ -221,10 +207,7 @@ public class Behaviour_Centrifuge implements GT_MetaTileEntity_EM_machine.IBehav clone.setAmount(amount); outputs[fraction].putUnify(clone); stacks[stackNo].setAmount(sub(stacks[stackNo].getAmount(), amount)); - // if(DEBUG_MODE){ - // TecTech.LOGGER.info("remainingAfter "+remaining); - // TecTech.LOGGER.info("amountCloneAfter "+clone.amount+"/"+stacks[stackNo].amount); - // } + } else { continue nextFraction; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_EM.java index 4b97776a65..11add31fc1 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_EM.java @@ -171,24 +171,11 @@ public class GT_MetaTileEntity_Pipe_EM extends MetaPipeEntity implements IConnec connectionCount++; } else if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity) .getMetaTileEntity() instanceof IConnectsToElementalPipe) { - if ( // ((IGregTechTileEntity) - // tTileEntity).getCoverBehaviorAtSide(b1).alwaysLookConnected(b1, - // ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(b1), ((IGregTechTileEntity) - // tTileEntity).getCoverDataAtSide(b1), ((IGregTechTileEntity) tTileEntity)) || - ((IConnectsToElementalPipe) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()) - .canConnect(b1)) { + if (((IConnectsToElementalPipe) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()).canConnect(b1)) { mConnections |= 1 << b0; connectionCount++; } } - // } - // else { - // mConnections |= (1 << b0); - // if (mOld != mConnections) { - // connectionCount++; - // mOld = mConnections; - // } - // } } } } else if (aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected == 4) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Energy.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Energy.java index 43f6e9236c..9b1bf27047 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Energy.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Energy.java @@ -166,24 +166,11 @@ public class GT_MetaTileEntity_Pipe_Energy extends MetaPipeEntity implements ICo connectionCount++; } else if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity) .getMetaTileEntity() instanceof IConnectsToEnergyTunnel) { - if ( // ((IGregTechTileEntity) - // tTileEntity).getCoverBehaviorAtSide(b1).alwaysLookConnected(b1, - // ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(b1), ((IGregTechTileEntity) - // tTileEntity).getCoverDataAtSide(b1), ((IGregTechTileEntity) tTileEntity)) || - ((IConnectsToEnergyTunnel) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()) - .canConnect(b1)) { + if (((IConnectsToEnergyTunnel) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity()).canConnect(b1)) { mConnections |= 1 << b0; connectionCount++; } } - // } - // else { - // mConnections |= (1 << b0); - // if (mOld != mConnections) { - // connectionCount++; - // mOld = mConnections; - // } - // } } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java index f9be1cee74..df2711e6ce 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java @@ -121,13 +121,7 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isAllowedToWork()) { - // String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), - // - // ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), - // aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), - // aBaseMetaTileEntity.getZCoord(), - // numbers[0], numbers[1], numbers[2], - // numbers[3], numbers[4], numbers[5],false); + String pseudoJavaCode = StructureUtility.getPseudoJavaCode( aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), @@ -151,12 +145,7 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); - // String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), - // ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), - // aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), - // aBaseMetaTileEntity.getZCoord(), - // numbers[0], numbers[1], numbers[2], - // numbers[3], numbers[4], numbers[5],true); + String pseudoJavaCode = StructureUtility.getPseudoJavaCode( aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/ReactorSimTileEntity.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/ReactorSimTileEntity.java index 6a7fece48e..c72f1fb00a 100644 --- a/src/main/java/com/github/technus/tectech/thing/tileEntity/ReactorSimTileEntity.java +++ b/src/main/java/com/github/technus/tectech/thing/tileEntity/ReactorSimTileEntity.java @@ -41,41 +41,6 @@ public class ReactorSimTileEntity extends TileEntityNuclearReactorElectric { return "Nuclear Reactor Simulator"; } - // public int gaugeHeatScaled(int i) { - // return i * this.heat / (this.maxHeat / 100 * 85); - // } - - // public void readFromNBT(NBTTagCompound nbttagcompound) { - // super.readFromNBT(nbttagcompound); - // //this.heat = nbttagcompound.getInteger("heat"); - // //this.inputTank.readFromNBT(nbttagcompound.getCompoundTag("inputTank")); - // //this.outputTank.readFromNBT(nbttagcompound.getCompoundTag("outputTank")); - // //this.output = (float)nbttagcompound.getShort("output"); - // } - - // public void writeToNBT(NBTTagCompound nbttagcompound) { - // super.writeToNBT(nbttagcompound); - // //NBTTagCompound inputTankTag = new NBTTagCompound(); - // //this.inputTank.writeToNBT(inputTankTag); - // //nbttagcompound.setTag("inputTank", inputTankTag); - // //NBTTagCompound outputTankTag = new NBTTagCompound(); - // //this.outputTank.writeToNBT(outputTankTag); - // //nbttagcompound.setTag("outputTank", outputTankTag); - // //nbttagcompound.setInteger("heat", this.heat); - // //nbttagcompound.setShort("output", (short)((int)this.getReactorEnergyOutput())); - // } - - // public void setRedstoneSignal(boolean redstone) { - // this.redstone = redstone; - // } - - // public void drawEnergy(double amount) { - // } - - // public float sendEnergy(float send) { - // return 0.0F; - // } - @Override public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction) { return false; @@ -86,64 +51,12 @@ public class ReactorSimTileEntity extends TileEntityNuclearReactorElectric { return 0; } - // public int getSourceTier() { - // return 4; - // } - @Override public double getReactorEUEnergyOutput() { return getReactorEnergyOutput() * 5.0F * ConfigUtil.getDouble(MainConfig.get(), "balance/energy/generator/nuclear"); } - // public List<TileEntity> getSubTiles() { - // if(this.subTiles == null) { - // this.subTiles = new ArrayList(); - // this.subTiles.add(this); - // Direction[] arr$ = Direction.directions; - // int len$ = arr$.length; - // - // for(int i$ = 0; i$ < len$; ++i$) { - // Direction dir = arr$[i$]; - // TileEntity te = dir.applyToTileEntity(this); - // if(te instanceof TileEntityReactorChamberElectric && !te.isInvalid()) { - // this.subTiles.add(te); - // } - // } - // } - // - // return this.subTiles; - // } - - // private void processfluidsSlots() { - // RecipeOutput outputinputSlot = this.processInputSlot(true); - // if(outputinputSlot != null) { - // this.processInputSlot(false); - // List<ItemStack> outputoutputSlot = outputinputSlot.items; - // this.coolantoutputSlot.add(outputoutputSlot); - // } - // - // RecipeOutput outputoutputSlot1 = this.processOutputSlot(true); - // if(outputoutputSlot1 != null) { - // this.processOutputSlot(false); - // List<ItemStack> processResult = outputoutputSlot1.items; - // this.hotcoolantoutputSlot.add(processResult); - // } - // - // } - - // public void refreshChambers() { - // if(this.addedToEnergyNet) { - // MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - // } - // - // this.subTiles = null; - // if(this.addedToEnergyNet) { - // MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); - // } - // - // } - @Override protected void updateEntityServer() { if (updateTicker++ % getTickRate() == 0) { @@ -159,46 +72,6 @@ public class ReactorSimTileEntity extends TileEntityNuclearReactorElectric { } } - // public void dropAllUnfittingStuff() { - // int i; - // ItemStack stack; - // for(i = 0; i < this.reactorSlot.size(); ++i) { - // stack = this.reactorSlot.get(i); - // if(stack != null && !this.isUsefulItem(stack, false)) { - // this.reactorSlot.put(i, null); - // this.eject(stack); - // } - // } - // - // for(i = this.reactorSlot.size(); i < this.reactorSlot.rawSize(); ++i) { - // stack = this.reactorSlot.get(i); - // this.reactorSlot.put(i, null); - // this.eject(stack); - // } - // - // } - - // public boolean isUsefulItem(ItemStack stack, boolean forInsertion) { - // Item item = stack.getItem(); - // return (item instanceof IReactorComponent || (item == Ic2Items.TritiumCell.getItem() || item == - // Ic2Items.reactorDepletedUraniumSimple.getItem() || item == Ic2Items.reactorDepletedUraniumDual.getItem() || item - // == Ic2Items.reactorDepletedUraniumQuad.getItem() || item == Ic2Items.reactorDepletedMOXSimple.getItem() || item - // == Ic2Items.reactorDepletedMOXDual.getItem() || item == Ic2Items.reactorDepletedMOXQuad.getItem())); - // } - - // public void eject(ItemStack drop) { - // if(IC2.platform.isSimulating() && drop != null) { - // float f = 0.7F; - // double d = (double)(this.worldObj.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; - // double d1 = (double)(this.worldObj.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; - // double d2 = (double)(this.worldObj.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; - // EntityItem entityitem = new EntityItem(this.worldObj, (double)this.xCoord + d, (double)this.yCoord + d1, - // (double)this.zCoord + d2, drop); - // entityitem.delayBeforeCanPickup = 10; - // this.worldObj.spawnEntityInWorld(entityitem); - // } - // } - @Override public boolean calculateHeatEffects() { if (heat >= 4000 && IC2.platform.isSimulating()) { @@ -207,140 +80,12 @@ public class ReactorSimTileEntity extends TileEntityNuclearReactorElectric { explode(); // ding return true; } else { - // int[] coord; - // Block block; - // Material mat; - // if(power >= 0.85F && this.worldObj.rand.nextFloat() <= 0.2F * this.hem) { - // coord = this.getRandCoord(2); - // if(coord != null) { - // block = this.worldObj.getBlock(coord[0], coord[1], coord[2]); - // if(block.isAir(this.worldObj, coord[0], coord[1], coord[2])) { - // this.worldObj.setBlock(coord[0], coord[1], coord[2], Blocks.fire, 0, 7); - // } else if(block.getBlockHardness(this.worldObj, coord[0], coord[1], coord[2]) >= 0.0F && - // this.worldObj.getTileEntity(coord[0], coord[1], coord[2]) == null) { - // mat = block.getMaterial(); - // if(mat != Material.rock && mat != Material.iron && mat != Material.lava && mat != - // Material.ground && mat != Material.clay) { - // this.worldObj.setBlock(coord[0], coord[1], coord[2], Blocks.fire, 0, 7); - // } else { - // this.worldObj.setBlock(coord[0], coord[1], coord[2], Blocks.flowing_lava, 15, 7); - // } - // } - // } - // } - // - // if(power >= 0.7F) { - // List var5 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, - // AxisAlignedBB.getBoundingBox((double)(this.xCoord - 3), (double)(this.yCoord - 3), - // (double)(this.zCoord - 3), (double)(this.xCoord + 4), (double)(this.yCoord + 4), (double)(this.zCoord - // + 4))); - // - // for(int var6 = 0; var6 < var5.size(); ++var6) { - // Entity var7 = (Entity)var5.get(var6); - // var7.attackEntityFrom(IC2DamageSource.radiation, - // (float)((int)((float)this.worldObj.rand.nextInt(4) * this.hem))); - // } - // } - // - // if(power >= 0.5F && this.worldObj.rand.nextFloat() <= this.hem) { - // coord = this.getRandCoord(2); - // if(coord != null) { - // block = this.worldObj.getBlock(coord[0], coord[1], coord[2]); - // if(block.getMaterial() == Material.water) { - // this.worldObj.setBlockToAir(coord[0], coord[1], coord[2]); - // } - // } - // } - // - // if(power >= 0.4F && this.worldObj.rand.nextFloat() <= this.hem) { - // coord = this.getRandCoord(2); - // if(coord != null && this.worldObj.getTileEntity(coord[0], coord[1], coord[2]) == null) { - // block = this.worldObj.getBlock(coord[0], coord[1], coord[2]); - // mat = block.getMaterial(); - // if(mat == Material.wood || mat == Material.leaves || mat == Material.cloth) { - // this.worldObj.setBlock(coord[0], coord[1], coord[2], Blocks.fire, 0, 7); - // } - // } - // } return false; } } return false; } - // public int[] getRandCoord(int radius) { - // if(radius <= 0) { - // return null; - // } else { - // int[] c = new int[]{this.xCoord + this.worldObj.rand.nextInt(2 * radius + 1) - radius, this.yCoord + - // this.worldObj.rand.nextInt(2 * radius + 1) - radius, this.zCoord + this.worldObj.rand.nextInt(2 * radius + 1) - - // radius}; - // return c[0] == this.xCoord && c[1] == this.yCoord && c[2] == this.zCoord?null:c; - // } - // } - - // public void processChambers() { - // short size = this.getReactorSize(); - // - // for(int pass = 0; pass < 2; ++pass) { - // for(int y = 0; y < 6; ++y) { - // for(int x = 0; x < size; ++x) { - // ItemStack stack = this.reactorSlot.get(x, y); - // if(stack != null && stack.getItem() instanceof IReactorComponent) { - // IReactorComponent comp = (IReactorComponent)stack.getItem(); - // comp.processChamber(this, stack, x, y, pass == 0); - // } - // } - // } - // } - // - // } - - // public boolean produceEnergy() { - // return this.receiveredstone() && ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/generator") > - // 0.0F; - // } - - // NO need - // public boolean receiveredstone() { - // return this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord) || this.redstone; - // } - - // public short getReactorSize() { - // if(this.worldObj == null) { - // return 9; - // } else { - // short cols = 3; - // Direction[] arr$ = Direction.directions; - // int len$ = arr$.length; - // - // for(int i$ = 0; i$ < len$; ++i$) { - // Direction direction = arr$[i$]; - // TileEntity target = direction.applyToTileEntity(this); - // if(target instanceof TileEntityReactorChamberElectric) { - // ++cols; - // } - // } - // - // return cols; - // } - // } - - // public int getTickRate() { - // return 20; - // } - - // public ContainerBase<TileEntityNuclearReactorElectric> getGuiContainer(EntityPlayer entityPlayer) { - // return new ContainerNuclearReactor(entityPlayer, this); - // } - - // @SideOnly(Side.CLIENT) - // public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin) { - // return new GuiNuclearReactor(new ContainerNuclearReactor(entityPlayer, this)); - // } - - // public void onGuiClosed(EntityPlayer entityPlayer) {} - // new method private void doUpdates() { heat = 0; @@ -353,107 +98,6 @@ public class ReactorSimTileEntity extends TileEntityNuclearReactorElectric { } while (!calculateHeatEffects() && output > 0); } - // region no need to change - // public void onNetworkUpdate(String field) { - // if(field.equals("output")) { - // if(this.output > 0.0F) { - // if(this.lastOutput <= 0.0F) { - // if(this.audioSourceMain == null) { - // this.audioSourceMain = IC2.audioManager.createSource(this, PositionSpec.Center, - // "Generators/NuclearReactor/NuclearReactorLoop.ogg", true, false, IC2.audioManager.getDefaultVolume()); - // } - // - // if(this.audioSourceMain != null) { - // this.audioSourceMain.play(); - // } - // } - // - // if(this.output < 40.0F) { - // if(this.lastOutput <= 0.0F || this.lastOutput >= 40.0F) { - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.remove(); - // } - // - // this.audioSourceGeiger = IC2.audioManager.createSource(this, PositionSpec.Center, - // "Generators/NuclearReactor/GeigerLowEU.ogg", true, false, IC2.audioManager.getDefaultVolume()); - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.play(); - // } - // } - // } else if(this.output < 80.0F) { - // if(this.lastOutput < 40.0F || this.lastOutput >= 80.0F) { - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.remove(); - // } - // - // this.audioSourceGeiger = IC2.audioManager.createSource(this, PositionSpec.Center, - // "Generators/NuclearReactor/GeigerMedEU.ogg", true, false, IC2.audioManager.getDefaultVolume()); - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.play(); - // } - // } - // } else if(this.output >= 80.0F && this.lastOutput < 80.0F) { - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.remove(); - // } - // - // this.audioSourceGeiger = IC2.audioManager.createSource(this, PositionSpec.Center, - // "Generators/NuclearReactor/GeigerHighEU.ogg", true, false, IC2.audioManager.getDefaultVolume()); - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.play(); - // } - // } - // } else if(this.lastOutput > 0.0F) { - // if(this.audioSourceMain != null) { - // this.audioSourceMain.stop(); - // } - // - // if(this.audioSourceGeiger != null) { - // this.audioSourceGeiger.stop(); - // } - // } - // - // this.lastOutput = this.output; - // } - // - // super.onNetworkUpdate(field); - // } - - // public float getWrenchDropRate() { - // return 1F; - // } - - // public ChunkCoordinates getPosition() { - // return new ChunkCoordinates(this.xCoord, this.yCoord, this.zCoord); - // } - - // public World getWorld() { - // return this.worldObj; - // } - - // public int getHeat() { - // return this.heat; - // } - - // public void setHeat(int heat1) { - // this.heat = heat1; - // } - - // public int addHeat(int amount) { - // this.heat += amount; - // return this.heat; - // } - - // public ItemStack getItemAt(int x, int y) { - // return x >= 0 && x < this.getReactorSize() && y >= 0 && y < 6?this.reactorSlot.get(x, y):null; - // } - - // public void setItemAt(int x, int y, ItemStack item) { - // if(x >= 0 && x < this.getReactorSize() && y >= 0 && y < 6) { - // this.reactorSlot.put(x, y, item); - // } - // } - @Override public void explode() { getWorld().playSoundEffect(xCoord, yCoord, zCoord, Reference.MODID + ":microwave_ding", 1, 1); @@ -462,248 +106,11 @@ public class ReactorSimTileEntity extends TileEntityNuclearReactorElectric { @Override public void addEmitHeat(int heat) {} - // region no need - // public int getMaxHeat() { - // return this.maxHeat; - // } - - // public void setMaxHeat(int newMaxHeat) { - // this.maxHeat = newMaxHeat; - // } - - // public float getHeatEffectModifier() { - // return this.hem; - // } - - // public void setHeatEffectModifier(float newHEM) { - // this.hem = newHEM; - // } - - // public float getReactorEnergyOutput() { - // return this.output; - // } - - // public float addOutput(float energy) { - // return this.output += energy; - // } - - // PRIVATE not used - // private RecipeOutput processInputSlot(boolean simulate) { - // if(!this.coolantinputSlot.isEmpty()) { - // MutableObject output = new MutableObject(); - // if(this.coolantinputSlot.transferToTank(this.inputTank, output, simulate) && (output.getValue() == null || - // this.coolantoutputSlot.canAdd((ItemStack)output.getValue()))) { - // if(output.getValue() == null) { - // return new RecipeOutput(null); - // } - // - // return new RecipeOutput(null, (ItemStack)output.getValue()); - // } - // } - // - // return null; - // } - - // private RecipeOutput processOutputSlot(boolean simulate) { - // if(!this.hotcoolinputSlot.isEmpty()) { - // MutableObject output = new MutableObject(); - // if(this.hotcoolinputSlot.transferFromTank(this.outputTank, output, simulate) && (output.getValue() == null - // || this.hotcoolantoutputSlot.canAdd((ItemStack)output.getValue()))) { - // if(output.getValue() == null) { - // return new RecipeOutput(null); - // } - // - // return new RecipeOutput(null, (ItemStack)output.getValue()); - // } - // } - // - // return null; - // } - @Override public boolean isFluidCooled() { return false; } - // !!!Private - removed use cases - // private void movefluidinWorld(boolean out) { - // if(out) { - // if(this.inputTank.getFluidAmount() < 1000 && this.outputTank.getFluidAmount() < 1000) { - // this.inputTank.setFluid(null); - // this.outputTank.setFluid(null); - // } else { - // for(int coolantFluid = 1; coolantFluid < 4; ++coolantFluid) { - // for(int coolantBlock = 1; coolantBlock < 4; ++coolantBlock) { - // for(int hotCoolantFluid = 1; hotCoolantFluid < 4; ++hotCoolantFluid) { - // if(this.surroundings[coolantBlock][coolantFluid][hotCoolantFluid] instanceof BlockAir) { - // if(this.inputTank.getFluidAmount() >= 1000) { - // this.worldObj.setBlock(coolantBlock + this.xCoord - 2, coolantFluid + this.yCoord - // - 2, hotCoolantFluid + this.zCoord - 2, this.inputTank.getFluid().getFluid().getBlock()); - // this.inputTank.drain(1000, true); - // } else if(this.outputTank.getFluidAmount() >= 1000) { - // this.worldObj.setBlock(coolantBlock + this.xCoord - 2, coolantFluid + this.yCoord - // - 2, hotCoolantFluid + this.zCoord - 2, this.outputTank.getFluid().getFluid().getBlock()); - // this.outputTank.drain(1000, true); - // } - // } - // } - // } - // } - // - // if(this.inputTank.getFluidAmount() < 1000) { - // this.inputTank.setFluid(null); - // } - // - // if(this.outputTank.getFluidAmount() < 1000) { - // this.outputTank.setFluid(null); - // } - // } - // } else { - // Fluid var9 = BlocksItems.getFluid(InternalName.fluidCoolant); - // Block var10 = BlocksItems.getFluidBlock(InternalName.fluidCoolant); - // Fluid var11 = BlocksItems.getFluid(InternalName.fluidHotCoolant); - // Block hotCoolantBlock = BlocksItems.getFluidBlock(InternalName.fluidHotCoolant); - // - // for(int yoffset = 1; yoffset < 4; ++yoffset) { - // for(int xoffset = 1; xoffset < 4; ++xoffset) { - // for(int zoffset = 1; zoffset < 4; ++zoffset) { - // if(this.surroundings[xoffset][yoffset][zoffset] == var10) { - // this.worldObj.setBlock(xoffset + this.xCoord - 2, yoffset + this.yCoord - 2, zoffset + - // this.zCoord - 2, Blocks.air); - // this.inputTank.fill(new FluidStack(var9, 1000), true); - // } else if(this.surroundings[xoffset][yoffset][zoffset] == hotCoolantBlock) { - // this.worldObj.setBlock(xoffset + this.xCoord - 2, yoffset + this.yCoord - 2, zoffset + - // this.zCoord - 2, Blocks.air); - // this.outputTank.fill(new FluidStack(var11, 1000), true); - // } - // } - // } - // } - // } - // - // } - - // !!!! PRIVATE - removed use cases - // private boolean readyforpressurizedreactor() { - // Block coolantBlock = BlocksItems.getFluidBlock(InternalName.fluidCoolant); - // Block hotCoolantBlock = BlocksItems.getFluidBlock(InternalName.fluidHotCoolant); - // - // int xoffset; - // int yoffset; - // int zoffset; - // for(xoffset = -2; xoffset < 3; ++xoffset) { - // for(yoffset = -2; yoffset < 3; ++yoffset) { - // for(zoffset = -2; zoffset < 3; ++zoffset) { - // if(this.worldObj.isAirBlock(xoffset + this.xCoord, yoffset + this.yCoord, zoffset + this.zCoord)) - // { - // this.surroundings[xoffset + 2][yoffset + 2][zoffset + 2] = Blocks.air; - // } else { - // Block block = this.worldObj.getBlock(xoffset + this.xCoord, yoffset + this.yCoord, zoffset + - // this.zCoord); - // if((block == coolantBlock || block == hotCoolantBlock) && - // this.worldObj.getBlockMetadata(xoffset + this.xCoord, yoffset + this.yCoord, zoffset + this.zCoord) != 0) { - // this.surroundings[xoffset + 2][yoffset + 2][zoffset + 2] = Blocks.air; - // } else { - // this.surroundings[xoffset + 2][yoffset + 2][zoffset + 2] = block; - // } - // } - // } - // } - // } - // - // for(xoffset = 1; xoffset < 4; ++xoffset) { - // for(yoffset = 1; yoffset < 4; ++yoffset) { - // for(zoffset = 1; zoffset < 4; ++zoffset) { - // if(!(this.surroundings[xoffset][yoffset][zoffset] instanceof BlockGenerator) && - // !(this.surroundings[xoffset][yoffset][zoffset] instanceof BlockReactorChamber) && - // this.surroundings[xoffset][yoffset][zoffset] != coolantBlock && this.surroundings[xoffset][yoffset][zoffset] != - // hotCoolantBlock && !(this.surroundings[xoffset][yoffset][zoffset] instanceof BlockAir)) { - // return false; - // } - // } - // } - // } - // - // for(xoffset = 0; xoffset < 5; ++xoffset) { - // for(yoffset = 0; yoffset < 5; ++yoffset) { - // if(!(this.surroundings[xoffset][4][yoffset] instanceof BlockReactorVessel) && - // !(this.surroundings[xoffset][4][yoffset] instanceof BlockReactorAccessHatch) && - // !(this.surroundings[xoffset][4][yoffset] instanceof BlockReactorRedstonePort) && - // !(this.surroundings[xoffset][4][yoffset] instanceof BlockReactorFluidPort)) { - // return false; - // } - // - // if(!(this.surroundings[xoffset][0][yoffset] instanceof BlockReactorVessel) && - // !(this.surroundings[xoffset][0][yoffset] instanceof BlockReactorAccessHatch) && - // !(this.surroundings[xoffset][0][yoffset] instanceof BlockReactorRedstonePort) && - // !(this.surroundings[xoffset][0][yoffset] instanceof BlockReactorFluidPort)) { - // return false; - // } - // - // if(!(this.surroundings[0][xoffset][yoffset] instanceof BlockReactorVessel) && - // !(this.surroundings[0][xoffset][yoffset] instanceof BlockReactorAccessHatch) && - // !(this.surroundings[0][xoffset][yoffset] instanceof BlockReactorRedstonePort) && - // !(this.surroundings[0][xoffset][yoffset] instanceof BlockReactorFluidPort)) { - // return false; - // } - // - // if(!(this.surroundings[4][xoffset][yoffset] instanceof BlockReactorVessel) && - // !(this.surroundings[4][xoffset][yoffset] instanceof BlockReactorAccessHatch) && - // !(this.surroundings[4][xoffset][yoffset] instanceof BlockReactorRedstonePort) && - // !(this.surroundings[4][xoffset][yoffset] instanceof BlockReactorFluidPort)) { - // return false; - // } - // - // if(!(this.surroundings[yoffset][xoffset][0] instanceof BlockReactorVessel) && - // !(this.surroundings[yoffset][xoffset][0] instanceof BlockReactorAccessHatch) && - // !(this.surroundings[yoffset][xoffset][0] instanceof BlockReactorRedstonePort) && - // !(this.surroundings[yoffset][xoffset][0] instanceof BlockReactorFluidPort)) { - // return false; - // } - // - // if(!(this.surroundings[yoffset][xoffset][4] instanceof BlockReactorVessel) && - // !(this.surroundings[yoffset][xoffset][4] instanceof BlockReactorAccessHatch) && - // !(this.surroundings[yoffset][xoffset][4] instanceof BlockReactorRedstonePort) && - // !(this.surroundings[yoffset][xoffset][4] instanceof BlockReactorFluidPort)) { - // return false; - // } - // } - // } - // - // return true; - // } - - // public int gaugeLiquidScaled(int i, int tank) { - // switch(tank) { - // case 0: - // if(this.inputTank.getFluidAmount() <= 0) { - // return 0; - // } - // - // return this.inputTank.getFluidAmount() * i / this.inputTank.getCapacity(); - // case 1: - // if(this.outputTank.getFluidAmount() <= 0) { - // return 0; - // } - // - // return this.outputTank.getFluidAmount() * i / this.outputTank.getCapacity(); - // default: - // return 0; - // } - // } - - // public FluidTank getinputtank() { - // return this.inputTank; - // } - - // public FluidTank getoutputtank() { - // return this.outputTank; - // } - - // public FluidTankInfo[] getTankInfo(ForgeDirection from) { - // return new FluidTankInfo[]{this.inputTank.getInfo(), this.outputTank.getInfo()}; - // } - @Override public boolean canFill(ForgeDirection from, Fluid fluid) { return false; diff --git a/src/main/java/com/github/technus/tectech/util/XSTR.java b/src/main/java/com/github/technus/tectech/util/XSTR.java index 015ac826aa..c2b32e4762 100644 --- a/src/main/java/com/github/technus/tectech/util/XSTR.java +++ b/src/main/java/com/github/technus/tectech/util/XSTR.java @@ -199,14 +199,6 @@ public class XSTR extends Random { */ @Override public int nextInt(int bound) { - // if (bound <= 0) { - // throw new RuntimeException("BadBound"); - // } - - /* - * int r = next(31); int m = bound - 1; if ((bound & m) == 0) // i.e., bound is a power of 2 { r = (int) ((bound - * * (long) r) >> 31); } else { for (int u = r; u - (r = u % bound) + m < 0; u = next(31)) ; } return r; - */ // speedup, new nextInt ~+40% long last = seed ^ seed << 21; last ^= last >>> 35; |