diff options
author | GlodBlock <1356392126@qq.com> | 2021-08-19 20:31:53 +0800 |
---|---|---|
committer | GlodBlock <1356392126@qq.com> | 2021-08-19 20:31:53 +0800 |
commit | 82f768f48e8964d6dee6b2b64f042ccc755bfb6a (patch) | |
tree | d9d23b29daebfbc2974240206a912f25b59ddea2 | |
parent | 0aff8fdce56cac3738a2dddc62bcecfea2219ca2 (diff) | |
download | GT5-Unofficial-82f768f48e8964d6dee6b2b64f042ccc755bfb6a.tar.gz GT5-Unofficial-82f768f48e8964d6dee6b2b64f042ccc755bfb6a.tar.bz2 GT5-Unofficial-82f768f48e8964d6dee6b2b64f042ccc755bfb6a.zip |
add Neutron Activator and NEI compact
31 files changed, 662 insertions, 53 deletions
diff --git a/build.gradle b/build.gradle index a084ff633e..2b3e16fabe 100644 --- a/build.gradle +++ b/build.gradle @@ -30,6 +30,9 @@ plugins { apply plugin: 'forge' apply plugin: 'idea' +apply plugin: 'java' +apply plugin: 'signing' +apply plugin: 'java-library' idea { module { @@ -56,6 +59,10 @@ minecraft { repositories { jcenter() + maven { // EnderIO & EnderCore + name = 'tterrag Repo' + url = "http://maven.tterrag.com" + } maven { name = "CodeChicken" url = "http://chickenbones.net/maven/" @@ -86,6 +93,9 @@ repositories { } dependencies { + + compile("com.enderio.core:EnderCore:1.7.10-0.1.0.25_beta:dev") + compile("appeng:appliedenergistics2:rv3-beta-22:dev") compile("com.github.GTNewHorizons:GT5-Unofficial:experimental-SNAPSHOT:dev") { setChanging(true) } @@ -110,3 +120,13 @@ processResources exclude 'mcmod.info' } } + +task devJar(type: Jar) { + classifier = 'dev' + from sourceSets.main.output +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} diff --git a/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java b/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java index 271079a590..b450bc5cac 100644 --- a/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java +++ b/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java @@ -25,12 +25,11 @@ public class Casing extends Block { String[] textureNames; protected String name; - public Casing(String name, String[] texture, CreativeTabs Tab){ + public Casing(String name) { super(Material.iron); this.setHardness(9.0F); this.setResistance(5.0F); this.name = name; - this.textureNames = texture; this.setHarvestLevel("wrench",2); this.setCreativeTab(GoodGenerator.GG); GregTech_API.registerMachineBlock(this, -1); diff --git a/src/main/java/GoodGenerator/Blocks/RegularBlock/ComplexTextureCasing.java b/src/main/java/GoodGenerator/Blocks/RegularBlock/ComplexTextureCasing.java new file mode 100644 index 0000000000..111ff1379a --- /dev/null +++ b/src/main/java/GoodGenerator/Blocks/RegularBlock/ComplexTextureCasing.java @@ -0,0 +1,58 @@ +package GoodGenerator.Blocks.RegularBlock; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import java.util.List; + +public class ComplexTextureCasing extends Casing{ + + @SideOnly(Side.CLIENT) + protected IIcon[] texture1, texture2; + String[] textureSide; + String[] textureTopAndDown; + + public ComplexTextureCasing(String name, String[] textureSide, String[] textureTopAndDown){ + super(name); + this.textureSide = textureSide; + this.textureTopAndDown = textureTopAndDown; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + if (side < 2) { + return meta < this.texture2.length ? this.texture2[meta] : this.texture2[0]; + } + else { + return meta < this.texture1.length ? this.texture1[meta] : this.texture1[0]; + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister) { + this.texture1 = new IIcon[this.textureSide.length]; + for (int i = 0; i < this.textureSide.length; i++) { + this.texture1[i] = par1IconRegister.registerIcon(this.textureSide[i]); + } + this.texture2 = new IIcon[this.textureTopAndDown.length]; + for (int i = 0; i < this.textureTopAndDown.length; i++) { + this.texture2[i] = par1IconRegister.registerIcon(this.textureTopAndDown[i]); + } + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < Math.max(this.textureTopAndDown.length, this.textureTopAndDown.length); i++) { + list.add(new ItemStack(item, 1, i)); + } + } +} diff --git a/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronAccelerator.java b/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronAccelerator.java index b6f087eba7..d8853e4f02 100644 --- a/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronAccelerator.java +++ b/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronAccelerator.java @@ -21,7 +21,7 @@ public class NeutronAccelerator extends GT_MetaTileEntity_Hatch_Energy { } public int getMaxEUConsume() { - return (int)(V[mTier] * 10 / 8); + return (int)(V[mTier] * 8 / 10); } @Override @@ -47,7 +47,7 @@ public class NeutronAccelerator extends GT_MetaTileEntity_Hatch_Energy { "Input EU to Accelerate the Neutron!", "Max EU input: " + this.maxEUInput(), "Max EU consumption: " + this.getMaxEUConsume(), - "Every EU can be transformed into 0.1~0.2 KeV Neutron Kinetic Energy." + "Every EU can be transformed into 10~20 eV Neutron Kinetic Energy." }; } diff --git a/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronSensor.java b/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronSensor.java index 640859b9f0..593b3b738c 100644 --- a/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronSensor.java +++ b/src/main/java/GoodGenerator/Blocks/TEs/MetaTE/NeutronSensor.java @@ -23,6 +23,7 @@ public class NeutronSensor extends GT_MetaTileEntity_Hatch { private static final IIconContainer textureFont_Glow = new Textures.BlockIcons.CustomIcon("icons/NeutronSensorFont_GLOW"); protected String texts = ""; + boolean isOn = false; public NeutronSensor(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 0, "Detect Neutron Kinetic Energy."); @@ -102,6 +103,18 @@ public class NeutronSensor extends GT_MetaTileEntity_Hatch { texts = text == null ? "" : text; } + public String getText() { + return texts == null ? "" : texts; + } + + public void outputRedstoneSignal(){ + isOn = true; + } + + public void stopOutputRedstoneSignal(){ + isOn = false; + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[] { @@ -120,6 +133,24 @@ public class NeutronSensor extends GT_MetaTileEntity_Hatch { } @Override + public boolean allowGeneralRedstoneOutput(){ + return true; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (isOn) { + for (byte i = 0; i < 6; i ++) + aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, (byte) 15); + } + else { + for (byte i = 0; i < 6; i ++) + aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, (byte) 0); + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new NeutronSensor(mName, mTier, mDescriptionArray, mTextures); } @@ -134,9 +165,4 @@ public class NeutronSensor extends GT_MetaTileEntity_Hatch { return false; } - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - //if (aTick % 100 == 0) GT_Log.out.print(texts + "\n"); - } } diff --git a/src/main/java/GoodGenerator/Blocks/TEs/NeutronActivator.java b/src/main/java/GoodGenerator/Blocks/TEs/NeutronActivator.java index 2498f81d2a..9291310c13 100644 --- a/src/main/java/GoodGenerator/Blocks/TEs/NeutronActivator.java +++ b/src/main/java/GoodGenerator/Blocks/TEs/NeutronActivator.java @@ -2,53 +2,201 @@ package GoodGenerator.Blocks.TEs; import GoodGenerator.Blocks.TEs.MetaTE.NeutronAccelerator; import GoodGenerator.Blocks.TEs.MetaTE.NeutronSensor; +import GoodGenerator.Client.GUI.NeutronActivatorGUIClient; +import GoodGenerator.Common.Container.NeutronActivatorGUIContainer; +import GoodGenerator.Loader.Loaders; +import GoodGenerator.util.CharExchanger; +import GoodGenerator.util.DescTextLocalization; +import GoodGenerator.util.ItemRefer; +import GoodGenerator.util.MyRecipeAdder; +import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.structure.IStructureDefinition; import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import ic2.core.Ic2Items; import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; +import java.util.Collection; import static GoodGenerator.util.StructureHelper.addFrame; import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; import static org.apache.commons.lang3.RandomUtils.nextInt; -public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM { +public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { protected IStructureDefinition<NeutronActivator> multiDefinition = null; protected final ArrayList<NeutronAccelerator> mNeutronAccelerator = new ArrayList<>(); protected final ArrayList<NeutronSensor> mNeutronSensor = new ArrayList<>(); protected int casingAmount = 0; - protected int KeV; + protected int eV = 0; + + private static final IIconContainer textureFontOn = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_On"); + private static final IIconContainer textureFontOn_Glow = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_On_GLOW"); + private static final IIconContainer textureFontOff = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_Off"); + private static final IIconContainer textureFontOff_Glow = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_Off_GLOW"); public NeutronActivator(String name) { super(name); } public NeutronActivator(int id, String name, String nameRegional) { - super(id,name,nameRegional); + super(id, name, nameRegional); + } + + @Override + public boolean checkRecipe_EM(ItemStack aStack) { + this.mEfficiency = 10000; + + ArrayList<FluidStack> tFluids = getStoredFluids(); + ArrayList<ItemStack> tItems = getStoredInputs(); + Collection<GT_Recipe> tRecipes = MyRecipeAdder.instance.NA.mRecipeList; + + for (int i = 0; i < tFluids.size() - 1; i++) { + for (int j = i + 1; j < tFluids.size(); j++) { + if (GT_Utility.areFluidsEqual(tFluids.get(i), tFluids.get(j))) { + if ((tFluids.get(i)).amount >= (tFluids.get(j)).amount) { + tFluids.remove(j--); + } else { + tFluids.remove(i--); + break; + } + } + } + } + + for (int i = 0; i < tItems.size() - 1; i++) { + for (int j = i + 1; j < tItems.size(); j++) { + if (GT_Utility.areStacksEqual(tItems.get(i), tItems.get(j))) { + if ((tItems.get(i)).stackSize >= (tItems.get(j)).stackSize) { + tItems.remove(j--); + } else { + tItems.remove(i--); + break; + } + } + } + } + + FluidStack[] inFluids = tFluids.toArray(new FluidStack[0]); + ItemStack[] inItems = tItems.toArray(new ItemStack[0]); + int minNKE, maxNKE; + + for (GT_Recipe recipe : tRecipes) { + minNKE = (recipe.mSpecialValue % 10000) * 1000000; + maxNKE = (recipe.mSpecialValue / 10000) * 1000000; + if (recipe.isRecipeInputEqual(true, inFluids, inItems)) { + mMaxProgresstime = recipe.mDuration; + if (eV <= maxNKE && eV >= minNKE) { + this.mOutputFluids = recipe.mFluidOutputs; + this.mOutputItems = recipe.mOutputs; + } + else { + this.mOutputFluids = null; + this.mOutputItems = new ItemStack[]{ItemRefer.Radioactive_Waste.get(4)}; + } + } + return true; + } + return false; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new NeutronActivatorGUIClient(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png"); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new NeutronActivatorGUIContainer(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + eV = aNBT.getInteger("mKeV"); + super.loadNBTData(aNBT); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mKeV", eV); + super.saveNBTData(aNBT); + } + + @Override + public String[] getDescription() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Neutron Activator") + .addInfo("Controller block for the Neutron Activator") + .addInfo("Superluminal-velocity Motion.") + .addInfo("You need to input energy to the Neutron Accelerator to get it running.") + .addInfo("It will output correct products with Specific Neutron Kinetic Energy.") + .addInfo("Otherwise it will output trash.") + .addInfo("The Neutron Kinetic Energy will decrease 72KeV/s when no Neutron Accelerator is running.") + .addInfo("It will explode when the Neutron Kinetic Energy is over" + EnumChatFormatting.RED + " 300MeV" + EnumChatFormatting.GRAY + ".") + .addInfo("The structure is too complex!") + .addInfo("Follow the" + EnumChatFormatting.DARK_BLUE + " Tec" + EnumChatFormatting.BLUE + "Tech" + EnumChatFormatting.GRAY + " blueprint to build the main structure.") + .addSeparator() + .beginStructureBlock(5, 6, 5, false) + .addController("Front bottom") + .addInputHatch("Hint block with dot 1") + .addInputBus("Hint block with dot 1") + .addOutputHatch("Hint block with dot 2") + .addOutputBus("Hint block with dot 2") + .addMaintenanceHatch("Hint block with dot 2") + .addOtherStructurePart("Neutron Accelerator", "Hint block with dot 2") + .addOtherStructurePart("Neutron Sensor", "Hint block with dot 2") + .addCasingInfo("Clean Stainless Steel Machine Casing", 7) + .toolTipFinisher("Good Generator"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override public IStructureDefinition<NeutronActivator> getStructure_EM() { - if(multiDefinition == null) { + if (multiDefinition == null) { multiDefinition = StructureDefinition .<NeutronActivator>builder() .addShape(mName, transpose(new String[][]{ - {"CCCCC","CDDDC","CDDDC","CDDDC","CCCCC"}, - {"F F"," GGG "," GPG "," GGG ","F F"}, - {"F F"," GGG "," GPG "," GGG ","F F"}, - {"F F"," GGG "," GPG "," GGG ","F F"}, - {"F F"," GGG "," GPG "," GGG ","F F"}, - {"XX~XX","XDDDX","XDDDX","XDDDX","XXXXX"}, + {"CCCCC", "CDDDC", "CDDDC", "CDDDC", "CCCCC"}, + {"F F", " GGG ", " GPG ", " GGG ", "F F"}, + {"F F", " GGG ", " GPG ", " GGG ", "F F"}, + {"F F", " GGG ", " GPG ", " GGG ", "F F"}, + {"F F", " GGG ", " GPG ", " GGG ", "F F"}, + {"XX~XX", "XDDDX", "XDDDX", "XDDDX", "XXXXX"}, }) ) .addElement( @@ -59,7 +207,7 @@ public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM { 1 ), onElementPass( - x -> x.casingAmount ++, + x -> x.casingAmount++, ofBlock( GregTech_API.sBlockCasings4, 1 ) @@ -87,7 +235,7 @@ public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM { .addElement( 'P', ofBlock( - GregTech_API.sBlockCasings2, 13 + Loaders.speedingPipe, 0 ) ) .addElement( @@ -102,11 +250,11 @@ public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM { 2 ), ofHatchAdder( - NeutronActivator::addAccelerator, 49, + NeutronActivator::addAcceleratorAndSensor, 49, 2 ), onElementPass( - x -> x.casingAmount ++, + x -> x.casingAmount++, ofBlock( GregTech_API.sBlockCasings4, 1 ) @@ -126,24 +274,28 @@ public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM { return structureCheck_EM(mName, 2, 5, 0) && casingAmount >= 7; } - public final boolean addAccelerator(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + public final boolean addAcceleratorAndSensor(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) { return false; } else { IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof NeutronAccelerator){ - ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mNeutronAccelerator.add((NeutronAccelerator)aMetaTileEntity); - } else if (aMetaTileEntity instanceof NeutronSensor){ - ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mNeutronSensor.add((NeutronSensor)aMetaTileEntity); + if (aMetaTileEntity instanceof NeutronAccelerator) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mNeutronAccelerator.add((NeutronAccelerator) aMetaTileEntity); + } else if (aMetaTileEntity instanceof NeutronSensor) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mNeutronSensor.add((NeutronSensor) aMetaTileEntity); } } return false; } public int maxNeutronKineticEnergy() { - return 10000000; + return 300000000; + } + + public int getCurrentNeutronKineticEnergy() { + return eV; } @Override @@ -157,21 +309,95 @@ public class NeutronActivator extends GT_MetaTileEntity_MultiblockBase_EM { boolean anyWorking = false; if (this.getBaseMetaTileEntity().isServerSide()) { for (NeutronAccelerator tHatch : mNeutronAccelerator) { - if (tHatch.isRunning) { + if (tHatch.isRunning && this.getRepairStatus() == this.getIdealStatus()) { anyWorking = true; - this.KeV += nextInt(tHatch.getMaxEUConsume(), tHatch.getMaxEUConsume() * 2 + 1) / 10; + this.eV += nextInt(tHatch.getMaxEUConsume(), tHatch.getMaxEUConsume() * 2 + 1) * 10; } } if (!anyWorking) { - if (this.KeV >= 80 && aTick % 20 == 0) { - this.KeV -= 80; + if (this.eV >= 72000 && aTick % 20 == 0) { + this.eV -= 72000; + } else if (this.eV > 0 && aTick % 20 == 0) { + this.eV = 0; + } + } + if (this.eV < 0) this.eV = 0; + if (this.eV > maxNeutronKineticEnergy()) doExplosion(4 * 32); + + for (NeutronSensor tHatch : mNeutronSensor) { + String tText = tHatch.getText(); + if (CharExchanger.isValidCompareExpress(rawProcessExp(tText))) { + if (CharExchanger.compareExpression(rawProcessExp(tText), eV)) { + tHatch.outputRedstoneSignal(); + } else tHatch.stopOutputRedstoneSignal(); } - else if (this.KeV > 0 && aTick % 20 == 0) { - this.KeV = 0; + } + } + } + + protected String rawProcessExp(String exp) { + StringBuilder ret = new StringBuilder(); + for (char c : exp.toCharArray()) { + if (exp.length() - ret.length() == 3) { + if (Character.isDigit(c)) ret.append(c); + else { + if (c == 'K' || c == 'k') { + ret.append("000"); + } + if (c == 'M' || c == 'm') { + ret.append("000000"); + } } + break; } - if (this.KeV < 0) this.KeV = 0; - if (this.KeV > maxNeutronKineticEnergy()) doExplosion(4 * 32); + ret.append(c); + } + return ret.toString(); + } + + @Override + public void construct(ItemStack itemStack, boolean b) { + structureBuild_EM(mName, 2, 5, 0, b, itemStack); + } + + @Override + public String[] getStructureDescription(ItemStack itemStack) { + return DescTextLocalization.addText("NeutronActivator.hint", 7); + } + + @Override + public String[] getInfoData() { + int currentNKEInput = 0; + boolean anyWorking = false; + for (NeutronAccelerator tHatch : mNeutronAccelerator) { + if (tHatch.isRunning) { + currentNKEInput += nextInt(tHatch.getMaxEUConsume(), tHatch.getMaxEUConsume() * 2 + 1) * 10; + anyWorking = true; + } + } + if (!anyWorking) currentNKEInput = -72000; + return new String[] { + "Progress:", + EnumChatFormatting.GREEN + Integer.toString(this.mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + EnumChatFormatting.YELLOW + this.mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + "Current Neutron Kinetic Energy Input: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(currentNKEInput) + EnumChatFormatting.RESET + "eV", + StatCollector.translateToLocal("scanner.info.NA") + " " + EnumChatFormatting.LIGHT_PURPLE + GT_Utility.formatNumbers(getCurrentNeutronKineticEnergy()) + EnumChatFormatting.RESET + "eV" + }; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if(aSide == aFacing) { + if(aActive) return new ITexture[]{ + Textures.BlockIcons.getCasingTextureForId(49), + TextureFactory.of(textureFontOn), + TextureFactory.builder().addIcon(textureFontOn_Glow).glow().build() + }; + else return new ITexture[]{ + Textures.BlockIcons.getCasingTextureForId(49), + TextureFactory.of(textureFontOff), + TextureFactory.builder().addIcon(textureFontOff_Glow).glow().build() + }; } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(49)}; } } diff --git a/src/main/java/GoodGenerator/Blocks/TEs/UniversalChemicalFuelEngine.java b/src/main/java/GoodGenerator/Blocks/TEs/UniversalChemicalFuelEngine.java index 382a0e10d1..9f589db8bb 100644 --- a/src/main/java/GoodGenerator/Blocks/TEs/UniversalChemicalFuelEngine.java +++ b/src/main/java/GoodGenerator/Blocks/TEs/UniversalChemicalFuelEngine.java @@ -201,7 +201,7 @@ public class UniversalChemicalFuelEngine extends GT_MetaTileEntity_MultiblockBas .addInfo("The efficiency is determined by the proportion of Combustion Promoter to fuel.") .addInfo("The proportion is bigger, and the efficiency will be higher.") .addInfo("It creates sqrt(Current Output Power) pollution every second") - .addInfo("If you forge to supply Combustion Promoter, this engine will swallow all the fuel " + EnumChatFormatting.YELLOW + "without outputting energy" + EnumChatFormatting.GRAY + ".") + .addInfo("If you forget to supply Combustion Promoter, this engine will swallow all the fuel " + EnumChatFormatting.YELLOW + "without outputting energy" + EnumChatFormatting.GRAY + ".") .addInfo("The efficiency is up to 150%.") .addInfo("The structure is too complex!") .addInfo("Follow the" + EnumChatFormatting.DARK_BLUE + " Tec" + EnumChatFormatting.BLUE + "Tech" + EnumChatFormatting.GRAY + " blueprint to build the main structure.") diff --git a/src/main/java/GoodGenerator/Client/GUI/NeutronActivatorGUIClient.java b/src/main/java/GoodGenerator/Client/GUI/NeutronActivatorGUIClient.java new file mode 100644 index 0000000000..35ec8d88b5 --- /dev/null +++ b/src/main/java/GoodGenerator/Client/GUI/NeutronActivatorGUIClient.java @@ -0,0 +1,43 @@ +package GoodGenerator.Client.GUI; + +import GoodGenerator.Common.Container.NeutronActivatorGUIContainer; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.StatCollector; + +@SideOnly(Side.CLIENT) +public class NeutronActivatorGUIClient extends GT_GUIContainer_MultiMachineEM { + + private final NeutronActivatorGUIContainer containerNeutronActivator; + + public NeutronActivatorGUIClient(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { + super(new NeutronActivatorGUIContainer(aInventoryPlayer, aTileEntity), aName, aTextureFile, true, true, true); + containerNeutronActivator = (NeutronActivatorGUIContainer) this.mContainer; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); + if (this.mContainer.mDisplayErrorCode == 0) { + fontRendererObj.drawString(StatCollector.translateToLocal("gui.NeutronActivator.0"), 7, 40, 16448255); + fontRendererObj.drawString(processNumber(containerNeutronActivator.getKineticE()) + "eV", 7, 48, 16448255); + } + } + + protected String processNumber(int num) { + float num2; + num2 = ((float) num) / 1000F; + if (num2 <= 0) { + return String.format("%d", num); + } + if (num2 < 1000.0) { + return String.format("%.1fK", num2); + } + num2 /= 1000F; + return String.format("%.1fM", num2); + } + +} diff --git a/src/main/java/GoodGenerator/Client/GUI/NeutronSensorGUIClient.java b/src/main/java/GoodGenerator/Client/GUI/NeutronSensorGUIClient.java index b32ba2bac1..174a0b2a37 100644 --- a/src/main/java/GoodGenerator/Client/GUI/NeutronSensorGUIClient.java +++ b/src/main/java/GoodGenerator/Client/GUI/NeutronSensorGUIClient.java @@ -7,7 +7,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import net.minecraft.client.gui.GuiTextField; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; diff --git a/src/main/java/GoodGenerator/Common/Container/NeutronActivatorGUIContainer.java b/src/main/java/GoodGenerator/Common/Container/NeutronActivatorGUIContainer.java new file mode 100644 index 0000000000..793949e1ff --- /dev/null +++ b/src/main/java/GoodGenerator/Common/Container/NeutronActivatorGUIContainer.java @@ -0,0 +1,79 @@ +package GoodGenerator.Common.Container; + +import GoodGenerator.Blocks.TEs.NeutronActivator; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; + +import java.nio.ByteBuffer; + +public class NeutronActivatorGUIContainer extends GT_Container_MultiMachineEM { + + private int KineticE; + + private ByteBuffer buffer; + + public NeutronActivatorGUIContainer(InventoryPlayer inventoryPlayer, IGregTechTileEntity aTileEntity) { + super(inventoryPlayer, aTileEntity, true, true, true); + } + + @Override + public void addCraftingToCrafters(ICrafting clientHandle) { + buffer.putInt(0, KineticE); + sendStateUpdate(clientHandle); + super.addCraftingToCrafters(clientHandle); + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (buffer == null) { + buffer = ByteBuffer.allocate(Integer.BYTES); + } + if(mTileEntity.isServerSide()) { + NeutronActivator tile = (NeutronActivator) mTileEntity.getMetaTileEntity(); + int currentKineticE = tile.getCurrentNeutronKineticEnergy(); + boolean isUpdated = false; + if (currentKineticE != KineticE) { + KineticE = currentKineticE; + buffer.putInt(0, KineticE); + isUpdated = true; + } + for (Object clientHandle : this.crafters) { + if (isUpdated) { + sendStateUpdate((ICrafting) clientHandle); + } + } + } + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return true; + } + + private void sendStateUpdate(ICrafting clientHandle) { + final int bytes = Integer.BYTES; + for (int i = 0; i < bytes; i++) { + clientHandle.sendProgressBarUpdate(this, i + 21, buffer.get(i)); + } + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int index, int value) { + super.updateProgressBar(index, value); + index = index - 21; + if(index >= 0 && index < buffer.capacity()) { + buffer.put(index, (byte) value); + } + } + + @SideOnly(Side.CLIENT) + public int getKineticE() { + return buffer.getInt(0); + } +} diff --git a/src/main/java/GoodGenerator/CrossMod/NEI/NEI_Config.java b/src/main/java/GoodGenerator/CrossMod/NEI/NEI_Config.java new file mode 100644 index 0000000000..eada36c336 --- /dev/null +++ b/src/main/java/GoodGenerator/CrossMod/NEI/NEI_Config.java @@ -0,0 +1,26 @@ +package GoodGenerator.CrossMod.NEI; + +import GoodGenerator.Main.GoodGenerator; +import GoodGenerator.util.MyRecipeAdder; +import codechicken.nei.api.IConfigureNEI; + +public class NEI_Config implements IConfigureNEI { + public static boolean isAdded = true; + + @Override + public void loadConfig() { + NEI_Config.isAdded = false; + new NeutronActivatorHandler(MyRecipeAdder.instance.NA); + NEI_Config.isAdded = true; + } + + @Override + public String getName() { + return "Good Generator NEI Plugin"; + } + + @Override + public String getVersion() { + return GoodGenerator.VERSION; + } +} diff --git a/src/main/java/GoodGenerator/CrossMod/NEI/NeutronActivatorHandler.java b/src/main/java/GoodGenerator/CrossMod/NEI/NeutronActivatorHandler.java new file mode 100644 index 0000000000..e26290c538 --- /dev/null +++ b/src/main/java/GoodGenerator/CrossMod/NEI/NeutronActivatorHandler.java @@ -0,0 +1,41 @@ +package GoodGenerator.CrossMod.NEI; + +import codechicken.nei.recipe.GuiCraftingRecipe; +import codechicken.nei.recipe.GuiUsageRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; +import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.nei.GT_NEI_DefaultHandler; +import net.minecraft.util.StatCollector; + +import java.awt.*; + +public class NeutronActivatorHandler extends GT_NEI_DefaultHandler { + + public NeutronActivatorHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) { + super(aRecipeMap); + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier())); + if (!NEI_Config.isAdded) { + FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); + GuiCraftingRecipe.craftinghandlers.add(this); + GuiUsageRecipe.usagehandlers.add(this); + } + } + + @Override + public TemplateRecipeHandler newInstance() { + return new NeutronActivatorHandler(this.mRecipeMap); + } + + @Override + public void drawExtras(int aRecipeIndex) { + int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + int minNKE = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue % 10000; + int maxNKE = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue / 10000; + drawText(10, 73, this.trans("158", "Time: ") + GT_Utility.formatNumbers(tDuration) + this.trans("161", " secs"), -16777216); + drawText(10, 83, StatCollector.translateToLocal("value.neutron_activator.0") + " " + GT_Utility.formatNumbers(minNKE) + StatCollector.translateToLocal("value.neutron_activator.2"), -16777216); + drawText(10, 93, StatCollector.translateToLocal("value.neutron_activator.1") + " " + GT_Utility.formatNumbers(maxNKE) + StatCollector.translateToLocal("value.neutron_activator.2"), -16777216); + } +} diff --git a/src/main/java/GoodGenerator/Loader/Loaders.java b/src/main/java/GoodGenerator/Loader/Loaders.java index 88ea24b226..0b78e92bd7 100644 --- a/src/main/java/GoodGenerator/Loader/Loaders.java +++ b/src/main/java/GoodGenerator/Loader/Loaders.java @@ -1,6 +1,7 @@ package GoodGenerator.Loader; import GoodGenerator.Blocks.RegularBlock.Casing; +import GoodGenerator.Blocks.RegularBlock.ComplexTextureCasing; import GoodGenerator.Blocks.RegularBlock.Frame; import GoodGenerator.Blocks.RegularBlock.TEBlock; import GoodGenerator.Blocks.TEs.*; @@ -40,6 +41,7 @@ public class Loaders { public static final Item aluminumNitride = new MyItems("aluminumNitride", GoodGenerator.GG); public static final Item specialCeramics = new MyItems("specialCeramics", GoodGenerator.GG); public static final Item specialCeramicsPlate = new MyItems("specialCeramicsPlate", GoodGenerator.GG); + public static final Item radioactiveWaste = new MyItems("radioactiveWaste", GoodGenerator.GG); public static final Block MAR_Casing = new Casing("MAR_Casing", new String[]{GoodGenerator.MOD_ID+":MAR_Casing"}); public static final Block FRF_Casings = new Casing("FRF_Casing", new String[]{"gregtech:iconsets/MACHINE_CASING_MINING_BLACKPLUTONIUM"}); @@ -52,15 +54,17 @@ public class Loaders { public static final Block titaniumPlatedCylinder = new Casing("titaniumPlatedCylinder", new String[]{GoodGenerator.MOD_ID+":titaniumPlatedCylinder"}); public static final Block magicCasing = new Casing("magicCasing", new String[]{GoodGenerator.MOD_ID+":MagicCasing"}); public static final Block essentiaCell = new Casing("essentiaCell", new String[]{GoodGenerator.MOD_ID+":essentiaCell/1",GoodGenerator.MOD_ID+":essentiaCell/2",GoodGenerator.MOD_ID+":essentiaCell/3"}); - public static final Block essentiaHatch = new TEBlock("essentiaHatch", new String[]{GoodGenerator.MOD_ID+":essentiaHatch"}, 1); - + public static final Block speedingPipe = new ComplexTextureCasing("speedingPipe", new String[]{GoodGenerator.MOD_ID+":speedingPipe_SIDE"}, new String[]{GoodGenerator.MOD_ID+":speedingPipe_TOP"}); public static final Block[] essentiaCells = new Block[]{essentiaCell}; + public static Block essentiaHatch; + public static ItemStack MAR; public static ItemStack FRF; public static ItemStack UCFE; public static ItemStack LEG; public static ItemStack NS; + public static ItemStack NA; public static ItemStack[] NeutronAccelerators = new ItemStack[9]; @@ -74,6 +78,7 @@ public class Loaders { GameRegistry.registerBlock(FRF_Coil_3, MyItemBlocks.class, "FRF_Coil_3"); GameRegistry.registerBlock(rawCylinder, MyItemBlocks.class, "rawCylinder"); GameRegistry.registerBlock(titaniumPlatedCylinder, MyItemBlocks.class, "titaniumPlatedCylinder"); + GameRegistry.registerBlock(speedingPipe, MyItemBlocks.class, "speedingPipe"); GameRegistry.registerItem(radiationProtectionPlate, "radiationProtectionPlate", GoodGenerator.MOD_ID); GameRegistry.registerItem(wrappedUraniumIngot, "wrappedUraniumIngot", GoodGenerator.MOD_ID); GameRegistry.registerItem(highDensityUraniumNugget, "highDensityUraniumNugget", GoodGenerator.MOD_ID); @@ -89,6 +94,7 @@ public class Loaders { GameRegistry.registerItem(aluminumNitride, "aluminumNitride", GoodGenerator.MOD_ID); GameRegistry.registerItem(specialCeramics, "specialCeramics", GoodGenerator.MOD_ID); GameRegistry.registerItem(specialCeramicsPlate, "specialCeramicsPlate", GoodGenerator.MOD_ID); + GameRegistry.registerItem(radioactiveWaste, "radioactiveWaste", GoodGenerator.MOD_ID); Loaders.MAR = new MultiNqGenerator(12732, "NaG", "Large Naquadah Reactor").getStackForm(1L); Loaders.FRF = new FuelRefineFactory(16999, "FRF", "Naquadah Fuel Refinery").getStackForm(1L); Loaders.UCFE = new UniversalChemicalFuelEngine(IDOffset, "UniversalChemicalFuelEngine", "Universal Chemical Fuel Engine").getStackForm(1L); @@ -102,7 +108,14 @@ public class Loaders { for (int i = 0; i < 9; i ++) { Loaders.NeutronAccelerators[i] = new NeutronAccelerator(IDOffset + 2 + i, "Neutron Accelerator " + GT_Values.VN[i], "Neutron Accelerator " + GT_Values.VN[i], i).getStackForm(1L); } - Loaders.NS = new NeutronSensor(IDOffset + 11, "Neutron Sensor", "Neutron Sensor", 5).getStackForm(1L); + Loaders.NS = new NeutronSensor(IDOffset + 11, "Neutron Sensor", "Neutron Sensor", 5).getStackForm(1L); + Loaders.NA = new NeutronActivator(IDOffset + 12, "NeutronActivator", "Neutron Activator").getStackForm(1L); + } + + public static void compactMod() { + if (Loader.isModLoaded("Thaumcraft")) { + essentiaHatch = new TEBlock("essentiaHatch", new String[]{GoodGenerator.MOD_ID + ":essentiaHatch"}, 1); + } } public static void addOreDic(){ diff --git a/src/main/java/GoodGenerator/Loader/NeutronActivatorLoader.java b/src/main/java/GoodGenerator/Loader/NeutronActivatorLoader.java new file mode 100644 index 0000000000..01555eb8d2 --- /dev/null +++ b/src/main/java/GoodGenerator/Loader/NeutronActivatorLoader.java @@ -0,0 +1,6 @@ +package GoodGenerator.Loader; + +public class NeutronActivatorLoader { + public static void NARecipeLoad() { + } +} diff --git a/src/main/java/GoodGenerator/Main/GoodGenerator.java b/src/main/java/GoodGenerator/Main/GoodGenerator.java index 6c3a7f7b8c..f53a1399bd 100644 --- a/src/main/java/GoodGenerator/Main/GoodGenerator.java +++ b/src/main/java/GoodGenerator/Main/GoodGenerator.java @@ -5,6 +5,7 @@ import GoodGenerator.CrossMod.Thaumcraft.Research; import GoodGenerator.Items.MyMaterial; import GoodGenerator.Loader.FuelRecipeLoader; import GoodGenerator.Loader.Loaders; +import GoodGenerator.Loader.NeutronActivatorLoader; import GoodGenerator.Loader.RecipeLoader; import GoodGenerator.Network.MessageOpenNeutronSensorGUI; import GoodGenerator.Network.MessageSetNeutronSensorData; @@ -52,6 +53,7 @@ public final class GoodGenerator { @Mod.EventHandler public static void preInit(FMLPreInitializationEvent event){ WerkstoffAdderRegistry.addWerkstoffAdder(new MyMaterial()); + Loaders.compactMod(); new FluidsBuilder(); Loaders.Register(); addOreDic(); @@ -69,6 +71,7 @@ public final class GoodGenerator { proxy.postInit(event); RecipeLoader.RecipeLoad(); RecipeLoader.Fixer(); + NeutronActivatorLoader.NARecipeLoad(); if (Loader.isModLoaded("Thaumcraft")){ Research.addResearch(); } diff --git a/src/main/java/GoodGenerator/util/CharExchanger.java b/src/main/java/GoodGenerator/util/CharExchanger.java index e2b95c040b..566afdfeed 100644 --- a/src/main/java/GoodGenerator/util/CharExchanger.java +++ b/src/main/java/GoodGenerator/util/CharExchanger.java @@ -66,10 +66,14 @@ public class CharExchanger { public static boolean compareExpression(String exp, int num) { int op = getOperator(exp); String NumExp = exp; - String[] opChar = new String[]{">", "<", "<=", ">=", "==", "!="}; + String[] opChar = new String[]{">", "<", "=", "!"}; if (op == -1) throw new IllegalArgumentException(); for (String re: opChar) NumExp = NumExp.replace(re, ""); - int num2 = Integer.getInteger(NumExp); + long num2 = 0; + for (char c: NumExp.toCharArray()) { + num2 *=10; + num2 += c - '0'; + } switch (op) { case 1: return num > num2; case 2: return num < num2; diff --git a/src/main/java/GoodGenerator/util/ItemRefer.java b/src/main/java/GoodGenerator/util/ItemRefer.java index 6d20636d1e..4a76951224 100644 --- a/src/main/java/GoodGenerator/util/ItemRefer.java +++ b/src/main/java/GoodGenerator/util/ItemRefer.java @@ -24,6 +24,7 @@ public final class ItemRefer { public static ItemRefer Aluminum_Nitride_Dust = getItemStack(aluminumNitride); public static ItemRefer Special_Ceramics_Dust = getItemStack(specialCeramics); public static ItemRefer Special_Ceramics_Plate = getItemStack(specialCeramicsPlate); + public static ItemRefer Radioactive_Waste = getItemStack(radioactiveWaste); public static ItemRefer Field_Restriction_Casing = getItemStack(MAR_Casing); public static ItemRefer Naquadah_Fuel_Refinery_Casing = getItemStack(FRF_Casings); diff --git a/src/main/java/GoodGenerator/util/MyRecipeAdder.java b/src/main/java/GoodGenerator/util/MyRecipeAdder.java index 85c36a1ea8..0f773a2807 100644 --- a/src/main/java/GoodGenerator/util/MyRecipeAdder.java +++ b/src/main/java/GoodGenerator/util/MyRecipeAdder.java @@ -40,6 +40,18 @@ public class MyRecipeAdder { true ); + public final NeutronActivatorMapper NA = new NeutronActivatorMapper( + new HashSet<>(150), + "gg.recipe.neutron_activator", + StatCollector.translateToLocal("tile.neutron_activator"), + null, + "goodgenerator:textures/gui/neutron_activator", + 6, 6, 0, 0, 0, + null, 0, null, + false, + false + ); + public static class liquidMentalFuelMapper extends GT_Recipe.GT_Recipe_Map_Fuel{ int lasting = 0; @@ -70,4 +82,22 @@ public class MyRecipeAdder { public void addNaquadahFuelRefineRecipe(FluidStack[] input1, ItemStack[] input2, FluidStack output, int EUt, int ticks, int tier){ FRF.addNaqFuelRefineRecipe(input1, input2, output, EUt, ticks, tier); } + + public static class NeutronActivatorMapper extends GT_Recipe.GT_Recipe_Map{ + public NeutronActivatorMapper(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed){ + super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + } + + public void addNARecipe(FluidStack[] input1, ItemStack[] input2, FluidStack[] output1, ItemStack[] output2, int ticks, int special) { + super.addRecipe(false, input2, output2, null, input1, output1, ticks, 0, special); + } + } + + public void addNeutronActivatorRecipe(FluidStack[] input1, ItemStack[] input2, FluidStack[] output1, ItemStack[] output2, int ticks, int maxNKE, int minNKE) { + if (maxNKE <= 0) maxNKE = 1; + if (maxNKE >= 280) maxNKE = 280; + if (minNKE < 0) minNKE = 0; + if (minNKE >= maxNKE) minNKE = maxNKE - 1; + NA.addNARecipe(input1, input2, output1, output2, ticks, maxNKE * 10000 + minNKE); + } } diff --git a/src/main/resources/assets/goodgenerator/lang/en_US.lang b/src/main/resources/assets/goodgenerator/lang/en_US.lang index bd7986ac54..5806e781cd 100644 --- a/src/main/resources/assets/goodgenerator/lang/en_US.lang +++ b/src/main/resources/assets/goodgenerator/lang/en_US.lang @@ -15,6 +15,7 @@ essentiaCell.0.name=Novice Essentia Diffusion Cell essentiaCell.1.name=Adept Essentia Diffusion Cell essentiaCell.2.name=Master Essentia Diffusion Cell essentiaHatch.0.name=Essentia Input Hatch +speedingPipe.0.name=Speeding Pipe Casing #Items item.radiationProtectionPlate.name=Radiation Proof Plate @@ -106,33 +107,40 @@ itemGroup.Good Generator=Good Generator #Scanner Info scanner.info.FRF=Coil Tier: +scanner.info.NA=Current Neutron Kinetic Energy: #GUI Info gui.NeutronSensor.0=Input the value of Neutron Kinetic Energy. gui.NeutronSensor.1=e.g. >5000KeV, <=30MeV . . . gui.NeutronSensor.2=Valid gui.NeutronSensor.3=Invalid +gui.NeutronActivator.0=Current Neutron Kinetic Energy: +gui.NeutronActivator.1=Input: #NEI Info tile.recipe.naquadah_reactor=Large Naquadah Reactor tile.naquadah_fuel_refine_factory=Naquadah Fuel Refine Factory +tile.neutron_activator=Neutron Activator value.naquadah_reactor=Basic Output Voltage: value.naquadah_fuel_refine_factory.0=Need Tier value.naquadah_fuel_refine_factory.1= Coil +value.neutron_activator.0=Minimum Neutron Kinetic Energy: +value.neutron_activator.1=Maximum Neutron Kinetic Energy: +value.neutron_activator.2= MeV #TecTech Structure Info -FuelRefineFactory.hint.0=8x Field Restriction Glass -FuelRefineFactory.hint.1=32x Field Restriction Coil of any tier -FuelRefineFactory.hint.2=At least 104x Naquadah Fuel Refinery Casing +FuelRefineFactory.hint.0=8x Field Restriction Glasses +FuelRefineFactory.hint.1=32x Field Restriction Coils of any tier +FuelRefineFactory.hint.2=At least 104x Naquadah Fuel Refinery Casings FuelRefineFactory.hint.3=1~16x Input Hatch FuelRefineFactory.hint.4=1~16x Output Hatch FuelRefineFactory.hint.5=1~16x Input Bus FuelRefineFactory.hint.6=1~16x Energy Hatch FuelRefineFactory.hint.7=All the hatches should adjoin the field restriction glass -MultiNqGenerator.hint.0=6x TungstenSteel Pipe Casing -MultiNqGenerator.hint.1=48x Field Restriction Casing -MultiNqGenerator.hint.2=36x Radiation Proof Steel Frame Box -MultiNqGenerator.hint.3=At least 77x Radiation Proof Machine Casing +MultiNqGenerator.hint.0=6x TungstenSteel Pipe Casings +MultiNqGenerator.hint.1=48x Field Restriction Casings +MultiNqGenerator.hint.2=36x Radiation Proof Steel Frame Boxes +MultiNqGenerator.hint.3=At least 77x Radiation Proof Machine Casings MultiNqGenerator.hint.4=1~4x Input Hatch MultiNqGenerator.hint.5=0~1x Output Hatch MultiNqGenerator.hint.6=1x Maintenance Hatch @@ -153,6 +161,13 @@ LargeEssentiaGenerator.hint.1=4x Amber Bricks LargeEssentiaGenerator.hint.2=24x Arcane Stone Bricks LargeEssentiaGenerator.hint.3=At least 53x Magic Casings LargeEssentiaGenerator.hint.4=1 - Maintenance Hatch/Input Hatch/Dynamo Hatch/Essentia Input Hatch +NeutronActivator.hint.0=16x Steel Frame Boxes +NeutronActivator.hint.1=18x Processor Machine Casings +NeutronActivator.hint.2=32x Reinforced Glasses +NeutronActivator.hint.3=4x Speeding Pipe Casing +NeutronActivator.hint.4=At least 7x Clean Stainless Steel Machine Casings +NeutronActivator.hint.5=1 - Input Hatch/Input Bus/Clean Stainless Steel Machine Casing +NeutronActivator.hint.6=2 - Output Hatch/Output Bus/Maintenance Hatch/Neutron Accelerator/Neutron Sensor/Clean Stainless Steel Machine Casing #Achievement achievement.gt.blockmachines.nag=Large Naquadah Reactor diff --git a/src/main/resources/assets/goodgenerator/textures/blocks/speedingPipe_SIDE.png b/src/main/resources/assets/goodgenerator/textures/blocks/speedingPipe_SIDE.png Binary files differnew file mode 100644 index 0000000000..833451eb11 --- /dev/null +++ b/src/main/resources/assets/goodgenerator/textures/blocks/speedingPipe_SIDE.png diff --git a/src/main/resources/assets/goodgenerator/textures/blocks/speedingPipe_TOP.png b/src/main/resources/assets/goodgenerator/textures/blocks/speedingPipe_TOP.png Binary files differnew file mode 100644 index 0000000000..28b9aae6eb --- /dev/null +++ b/src/main/resources/assets/goodgenerator/textures/blocks/speedingPipe_TOP.png diff --git a/src/main/resources/assets/goodgenerator/textures/gui/neutron_activator.png b/src/main/resources/assets/goodgenerator/textures/gui/neutron_activator.png Binary files differnew file mode 100644 index 0000000000..a1b1421800 --- /dev/null +++ b/src/main/resources/assets/goodgenerator/textures/gui/neutron_activator.png diff --git a/src/main/resources/assets/goodgenerator/textures/items/radioactiveWaste.png b/src/main/resources/assets/goodgenerator/textures/items/radioactiveWaste.png Binary files differnew file mode 100644 index 0000000000..5f621babd9 --- /dev/null +++ b/src/main/resources/assets/goodgenerator/textures/items/radioactiveWaste.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off.png b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off.png Binary files differnew file mode 100644 index 0000000000..ed6b99fcd8 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off_GLOW.png Binary files differnew file mode 100644 index 0000000000..dbd2e0feaa --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off_GLOW.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off_GLOW.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off_GLOW.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_Off_GLOW.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On.png b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On.png Binary files differnew file mode 100644 index 0000000000..c97e6f1a2d --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On_GLOW.png Binary files differnew file mode 100644 index 0000000000..14bbc09368 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On_GLOW.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On_GLOW.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On_GLOW.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/icons/NeutronActivator_On_GLOW.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +}
\ No newline at end of file |