diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-09-17 15:58:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 15:58:17 +0200 |
commit | a88ce1aa5e04d216ad023b0caafa9548ab230f09 (patch) | |
tree | 6f123fa2423a4abe5b97c5a09c58a84cd9a50c76 /src | |
parent | 0d995de2a7aa10578ada65b38c279846a43acd93 (diff) | |
parent | 8b0125b3f625e961a4773417cca9ddf41eb8a1da (diff) | |
download | GT5-Unofficial-a88ce1aa5e04d216ad023b0caafa9548ab230f09.tar.gz GT5-Unofficial-a88ce1aa5e04d216ad023b0caafa9548ab230f09.tar.bz2 GT5-Unofficial-a88ce1aa5e04d216ad023b0caafa9548ab230f09.zip |
Merge pull request #29 from kuba6000/THTR-Rework
Thorium High Temperature Reactor Rework
Former-commit-id: 6cdb5936aa3df392a4a0440b9c557207820b9bf0
Diffstat (limited to 'src')
32 files changed, 817 insertions, 215 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java index 10ada4ea61..fbb2f6320b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java @@ -38,6 +38,7 @@ import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEnti import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_DEHP; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ElectricImplosionCompressor; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_THTR; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaBlastFurnace; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaDistillTower; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaVacuumFreezer; @@ -143,7 +144,8 @@ public class ItemRegistry { public static ItemStack[] megaMachines = new ItemStack[3]; public static ItemStack dehp; public static ItemStack[] voidminer = new ItemStack[3]; - public static ItemStack thtr; + public static ItemStack THTR; + public static ItemStack HTGR; public static ItemStack eic; public static ItemStack cal; public static ItemStack compressedHatch; @@ -185,8 +187,10 @@ public class ItemRegistry { if (ConfigHandler.creativeScannerID != 0) new CreativeScanner(ConfigHandler.creativeScannerID,"Creative Debug Scanner","Creative Debug Scanner",20); ItemRegistry.eic = new GT_TileEntity_ElectricImplosionCompressor(ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 6, "ElectricImplosionCompressor", "Electric Implosion Compressor").getStackForm(1L); - ItemRegistry.thtr = new GT_TileEntity_THTR(ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 5, "THTR", "Thorium High Temperature Reactor").getStackForm(1L); + ItemRegistry.THTR = new GT_TileEntity_THTR(ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 5, "THTR", "Thorium High Temperature Reactor").getStackForm(1L); GT_TileEntity_THTR.THTRMaterials.registeraTHR_Materials(); + ItemRegistry.HTGR = new GT_TileEntity_HTGR(ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15 + 48, "HTGR", "High Temperature Gas-cooled Reactor").getStackForm(1L); + GT_TileEntity_HTGR.HTGRMaterials.registeraTHR_Materials(); GT_OreDictUnificator.add(OrePrefixes.block, Materials.BorosilicateGlass, new ItemStack(ItemRegistry.bw_glasses[0], 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.NickelZincFerrite, new ItemStack(ItemRegistry.BW_BLOCKS[2])); for (int i = 0; i < GT_Values.VN.length; i++) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java index b300adaa11..ac747e00b0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java @@ -27,6 +27,7 @@ import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_LESU; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ManualTrafo; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_THTR; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR; import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_Windmill; import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; @@ -746,7 +747,7 @@ public class RecipeLoader { ); GT_TileEntity_THTR.THTRMaterials.registerTHR_Recipes(); GT_ModHandler.addCraftingRecipe( - ItemRegistry.thtr, + ItemRegistry.THTR, RecipeLoader.BITSD, new Object[]{ "BZB", @@ -757,6 +758,19 @@ public class RecipeLoader { 'Z', "circuitUltimate" } ); + GT_TileEntity_HTGR.HTGRMaterials.registerTHR_Recipes(); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.HTGR, + RecipeLoader.BITSD, + new Object[]{ + "BZB", + "BRB", + "BZB", + 'B', new ItemStack(GregTech_API.sBlockCasings8, 1, 5), + 'R', GT_ModHandler.getModItem("IC2", "blockGenerator", 1, 5), + 'Z', "circuitSuperconductor" + } + ); if (LoaderReference.galacticgreg) { GT_Values.RA.addAssemblylineRecipe( diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java new file mode 100644 index 0000000000..40e2a8b878 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java @@ -0,0 +1,576 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.common.tileentities.multis; + +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.IStructureElement; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; +import com.github.bartimaeusnek.bartworks.util.BW_Util; +import com.github.bartimaeusnek.bartworks.util.MathUtils; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.objects.XSTR; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; + +import java.util.Arrays; +import java.util.List; +import java.util.ArrayList; +import java.util.HashMap; + +public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_HTGR> { + + private static final int BASECASINGINDEX = 181; + + private static final String STRUCTURE_PIECE_MAIN = "main"; + private static final IStructureDefinition<GT_TileEntity_HTGR> STRUCTURE_DEFINITION = StructureDefinition.<GT_TileEntity_HTGR>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ + {" BBBBBBB "," BBBBBBBBB ","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB"," BBBBBBBBB "," BBBBBBB "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" bbb~bbb "," bbbbbbbbb ","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb"," bbbbbbbbb "," bbbbbbb "}, + })) + .addElement('c', ofBlock(GregTech_API.sBlockCasings8, 5)) + .addElement('b', ofChain( + ofHatchAdder(GT_TileEntity_HTGR::addOutputToMachineList, BASECASINGINDEX, 1), + ofHatchAdder(GT_TileEntity_HTGR::addMaintenanceToMachineList, BASECASINGINDEX, 1), + ofHatchAdder(GT_TileEntity_HTGR::addEnergyInputToMachineList, BASECASINGINDEX, 1), + ofBlock(GregTech_API.sBlockCasings8, 5) + )) + .addElement('B', ofHatchAdderOptional(GT_TileEntity_HTGR::addInputToMachineList, BASECASINGINDEX, 2, GregTech_API.sBlockCasings8, 5)) + .build(); + + private static final int HELIUM_NEEDED = 730000; + private static final int powerUsage = BW_Util.getMachineVoltageFromTier(6); + private static final int maxcapacity = 720000; + private static final int mincapacity = maxcapacity/10; + private int HeliumSupply; + private int fueltype = -1, fuelsupply = 0; + private boolean empty; + private int emptyticksnodiff = 0; + private int coolanttaking = 0; + + public GT_TileEntity_HTGR(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + private GT_TileEntity_HTGR(String aName) { + super(aName); + } + + @Override + public boolean isCorrectMachinePart(ItemStack itemStack) { + return true; + } + + @Override + public IStructureDefinition<GT_TileEntity_HTGR> getStructureDefinition() { + return STRUCTURE_DEFINITION; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Breeder Reactor") + .addInfo("Controller block for the High Temperature Gas-cooled Reactor (HTGR)") + .addInfo("Needs a constant supply of coolant while running") + .addInfo("Needs at least 72k Fuel pebbles to start operation (can hold up to 720k pebbles)") + .addInfo("Consumes up to 0.5% of total Fuel Pellets per Operation depending on efficiency") + .addInfo("Efficiency is calculated exponentially depending on the amount of pebbles in the internal buffer") + .addInfo("Reactor will take 4 000L/s of coolant multiplied by efficiency and by fuel coolant value (check tooltips)") + .addInfo("Uses " + GT_Utility.formatNumbers(powerUsage) + " EU/t") + .addInfo("One Operation takes 1 hour") + .addSeparator() + .beginStructureBlock(11, 12, 11, true) + .addController("Front bottom center") + .addCasingInfo("Europium Reinforced Radiation Proof Casings", 0) + .addStructureInfo("Corners and the 2 touching blocks are air (cylindric)") + .addInputBus("Any top layer casing", 2) + .addInputHatch("Any top layer casing", 2) + .addOutputBus("Any bottom layer casing", 1) + .addOutputHatch("Any bottom layer casing", 1) + .addEnergyHatch("Any bottom layer casing", 1) + .addMaintenanceHatch("Any bottom layer casing", 1) + .toolTipFinisher("Bartworks"); + return tt; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped(); + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece("main", stackSize, hintsOnly, 5, 11, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) { + return ( + checkPiece("main", 5, 11, 0) && + this.mMaintenanceHatches.size() == 1 && + this.mInputHatches.size() > 0 && + this.mOutputHatches.size() > 0 && + this.mInputBusses.size() > 0 && + this.mOutputBusses.size() > 0 && + this.mEnergyHatches.size() > 0 + ); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.HeliumSupply = aNBT.getInteger("HeliumSupply"); + this.fueltype = aNBT.getInteger("fueltype"); + this.fuelsupply = aNBT.getInteger("fuelsupply"); + this.empty = aNBT.getBoolean("EmptyMode"); + this.coolanttaking = aNBT.getInteger("coolanttaking"); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("HeliumSupply", this.HeliumSupply); + aNBT.setInteger("fueltype", this.fueltype); + aNBT.setInteger("fuelsupply", this.fuelsupply); + aNBT.setBoolean("EmptyMode", this.empty); + aNBT.setInteger("coolanttaking", this.coolanttaking); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide() && !this.empty){ + if (this.HeliumSupply < GT_TileEntity_HTGR.HELIUM_NEEDED){ + for (FluidStack fluidStack : this.getStoredFluids()){ + if (fluidStack.isFluidEqual(Materials.Helium.getGas(1))) { + int toget = Math.min(GT_TileEntity_HTGR.HELIUM_NEEDED - this.HeliumSupply, fluidStack.amount); + fluidStack.amount -= toget; + this.HeliumSupply += toget; + if(GT_TileEntity_HTGR.HELIUM_NEEDED == this.HeliumSupply && fluidStack.amount == 0) + fluidStack = null; + } + } + } + if(this.fuelsupply < maxcapacity){ + for (ItemStack itemStack : this.getStoredInputs()) { + int type = -1; + if(itemStack == null) continue; + if(itemStack.getItem() != HTGRMaterials.aHTGR_Materials) continue; + int damage = HTGRMaterials.aHTGR_Materials.getDamage(itemStack); + if(!((damage + 1) % HTGRMaterials.MATERIALS_PER_FUEL == HTGRMaterials.USABLE_FUEL_INDEX + 1)) continue; // is fuel + type = damage / HTGRMaterials.MATERIALS_PER_FUEL; + if(this.fueltype == -1) + this.fueltype = type; + if(this.fueltype != type) + continue; + int toget = Math.min(maxcapacity - this.fuelsupply, itemStack.stackSize); + this.fuelsupply += toget; + itemStack.stackSize -= toget; + } + this.updateSlots(); + } + } + } + + @Override + public boolean checkRecipe(ItemStack controllerStack) { + + if(this.empty) + { + if(this.HeliumSupply > 0 || this.fuelsupply > 0){ + this.mEfficiency = 10000; + this.mMaxProgresstime = 100; + return true; + } + return false; + } + if (!(this.HeliumSupply >= GT_TileEntity_HTGR.HELIUM_NEEDED && this.fuelsupply >= mincapacity)) + return false; + + double eff = Math.min(Math.pow((double)this.fuelsupply/(double)mincapacity, 2D), 100D)/100D - ((double)(getIdealStatus() - getRepairStatus()) / 10D); + + if(eff <= 0) + return false; + + int toReduce = MathUtils.floorInt((double)this.fuelsupply * 0.005D * eff); + + this.fuelsupply -= toReduce; + int burnedballs = toReduce/64; + if(burnedballs > 0) + toReduce -= burnedballs*64; + + int meta = (this.fueltype * HTGRMaterials.MATERIALS_PER_FUEL) + HTGRMaterials.BURNED_OUT_FUEL_INDEX; + + this.mOutputItems = new ItemStack[] { + new ItemStack(HTGRMaterials.aHTGR_Materials, burnedballs, meta), + new ItemStack(HTGRMaterials.aHTGR_Materials, toReduce, meta + 1) + }; + + //this.updateSlots(); // not needed ? + + this.coolanttaking = (int)(4000D * (((this.fueltype * 0.5D) + 1)) * eff); + + this.mEfficiency = (int)(eff*10000D); + this.mEUt=-powerUsage; + this.mMaxProgresstime=72000; + return true; + } + + private int runningtick = 0; + + @Override + public boolean onRunningTick(ItemStack aStack) { + runningtick++; + + if (this.empty){ + if(emptyticksnodiff > 20 && emptyticksnodiff % 20 != 0){ + emptyticksnodiff++; + return true; + } + if(this.HeliumSupply > 0){ + this.addOutput(Materials.Helium.getGas(this.HeliumSupply)); + this.HeliumSupply = 0; + } + if(this.fuelsupply > 0) + { + ItemStack iStack = new ItemStack(HTGRMaterials.aHTGR_Materials, this.fuelsupply, (HTGRMaterials.MATERIALS_PER_FUEL * this.fueltype) + HTGRMaterials.USABLE_FUEL_INDEX); + boolean storedAll = false; + for (GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) { + if(!isValidMetaTileEntity(tHatch)) + continue; + if (tHatch.storeAll(iStack)){ + storedAll = true; + break; + } + } + if(!storedAll){ + if(this.fuelsupply == iStack.stackSize) emptyticksnodiff++; + else {this.fuelsupply = iStack.stackSize; emptyticksnodiff = 0;} + } + else{ + this.fuelsupply = 0; + this.fueltype = -1; + this.coolanttaking = 0; + } + } + return true; + } + + if(!super.onRunningTick(aStack)) // USE DA POWAH + return false; + + if(runningtick % 20 == 0) + { + int takecoolant = coolanttaking; + int drainedamount = 0; + + for(GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches){ + if (isValidMetaTileEntity(tHatch)) { + FluidStack tLiquid = tHatch.getFluid(); + if (tLiquid != null && tLiquid.isFluidEqual(FluidRegistry.getFluidStack("ic2coolant",1))){ + FluidStack drained = tHatch.drain(takecoolant, true); + takecoolant -= drained.amount; + drainedamount += drained.amount; + if(takecoolant <= 0) + break; + } + } + } + + if(drainedamount > 0) + addOutput(FluidRegistry.getFluidStack("ic2hotcoolant", drainedamount)); + + this.updateSlots(); + + if(takecoolant > 0) + this.stopMachine(); + } + + return true; + } + + + + @Override + public int getMaxEfficiency(ItemStack itemStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack itemStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack itemStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack itemStack) { + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new GT_TileEntity_HTGR(this.mName); + } + + + @Override + public String[] getInfoData() { + return new String[]{ + "Mode:", this.empty ? "Emptying" : "Normal", + "Progress:", GT_Utility.formatNumbers(this.mProgresstime / 20) + "s / " + GT_Utility.formatNumbers(this.mMaxProgresstime / 20) + "s", + "Fuel type:", (this.fueltype == -1 ? "NONE" : ("TRISO (" + HTGRMaterials.sHTGR_Fuel[this.fueltype].sEnglish) + ")"), + "Fuel amount:", GT_Utility.formatNumbers(this.fuelsupply) + " pcs.", + "Helium-Level:", GT_Utility.formatNumbers(this.HeliumSupply) + "L / " + GT_Utility.formatNumbers(GT_TileEntity_HTGR.HELIUM_NEEDED) + "L", + "Coolant:", GT_Utility.formatNumbers(coolanttaking) + "L/s", + "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus()) + }; + } + + @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(GT_TileEntity_HTGR.BASECASINGINDEX), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow().build()}; + return new ITexture[]{ + Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build()}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX)}; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if(this.mMaxProgresstime > 0) + { + GT_Utility.sendChatToPlayer(aPlayer, "HTGR mode cannot be changed while the machine is running."); + return; + } + this.empty = !this.empty; + GT_Utility.sendChatToPlayer(aPlayer, "HTGR is now running in " + (this.empty ? "emptying mode." : "normal Operation")); + } + + + + public static class HTGRMaterials{ + + private static class CustomHTGRSimpleSubItemClass extends SimpleSubItemClass{ + HashMap<Integer, String> tooltip = null; + public CustomHTGRSimpleSubItemClass(HashMap<Integer, String> tooltip, String... tex){ + super(tex); + this.tooltip = tooltip; + } + @Override + @SuppressWarnings("unchecked") + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + if(tooltip.containsKey(getDamage(p_77624_1_))) + aList.add(tooltip.get(getDamage(p_77624_1_))); + aList.add("Material for High Temperature Gas-cooled Reactor"); + super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_); + } + } + + private static class Base_{ + public String sName; + public String sEnglish; + public String sTooltip; + public Base_(String a, String b){ + this.sName = a; + this.sEnglish = b; + this.sTooltip = ""; + } + public Base_(String a, String b, String c){ + this.sName = a; + this.sEnglish = b; + this.sTooltip = c; + } + } + static class Fuel_{ + public String sName; + public String sEnglish; + public ItemStack mainItem; + public ItemStack secondaryItem; + public ItemStack[] recycledItems = { GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI }; + public FluidStack recycledFluid; + public int[] recycleChances; + public String tooltip; + public Fuel_(String sName, String sEnglish, ItemStack mainItem, ItemStack secondaryItem, FluidStack recycledFluid, ItemStack[] recycledItems, int[] recycleChances, String tooltip){ + this.sName = sName; + this.sEnglish = sEnglish; + this.mainItem = mainItem; + this.secondaryItem = secondaryItem; + this.recycledFluid = recycledFluid; + for(int i = 0; i < recycledItems.length; i++) + this.recycledItems[i] = recycledItems[i]; + this.recycleChances = recycleChances; + this.tooltip = tooltip; + } + } + private static class LangEntry_{ + public String sName; + public String sEnglish; + public LangEntry_(String a, String b){ + this.sName = a; + this.sEnglish = b; + } + } + + static final Base_[] sHTGR_Bases = new Base_[]{ + new Base_("HTGRFuelMixture", "HTGR fuel mixture"), + new Base_("BISOPebbleCompound", "BISO pebble compound"), + new Base_("TRISOPebbleCompound", "TRISO pebble compound"), + new Base_("TRISOBall", "TRISO ball"), + new Base_("TRISOPebble", "TRISO pebble"), + new Base_("BurnedOutTRISOBall", "Burned out TRISO Ball"), + new Base_("BurnedOutTRISOPebble", "Burned out TRISO Pebble"), + }; + static final int MATERIALS_PER_FUEL = sHTGR_Bases.length; + static final int USABLE_FUEL_INDEX = 4; + static final int BURNED_OUT_FUEL_INDEX = 5; + static final Fuel_[] sHTGR_Fuel = new Fuel_[]{ + new Fuel_("Thorium", "Thorium", WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 64), Materials.Uranium235.getDust(4), + GT_Values.NF, new ItemStack[]{ + Materials.Silicon.getDust(1), Materials.Graphite.getDust(1), Materials.Carbon.getDust(1), + Materials.Lutetium.getDust(1), WerkstoffLoader.Thorium232.get(OrePrefixes.dust,1)}, + new int[]{9000, 9000, 9000, 9000, 1000}, "Multiplies coolant by 1"), + new Fuel_("Uranium", "Uranium", Materials.Uranium.getDust(64), Materials.Uranium235.getDust(8), + FluidRegistry.getFluidStack("krypton", 8), new ItemStack[]{ + Materials.Silicon.getDust(1), Materials.Graphite.getDust(1), Materials.Carbon.getDust(1), + Materials.Lead.getDust(1), + Materials.Uranium.getDust(1)}, + new int[]{9000, 9000, 9000, 7000, 1000}, "Multiplies coolant by 1.5"), + new Fuel_("Plutonium", "Plutonium", Materials.Plutonium.getDust(64), Materials.Plutonium241.getDust(4), + FluidRegistry.getFluidStack("xenon", 8), new ItemStack[]{ + Materials.Silicon.getDust(1), Materials.Graphite.getDust(1), Materials.Carbon.getDust(1), + Materials.Lead.getDust(1), + Materials.Plutonium.getDust(1)}, + new int[]{9000, 9000, 9000, 7000, 1000}, "Multiplies coolant by 2"), + }; + static final CustomHTGRSimpleSubItemClass aHTGR_Materials; + static final ArrayList<LangEntry_> aHTGR_Localizations = new ArrayList<LangEntry_>(); + static{ + String[] sHTGR_Materials = new String[sHTGR_Bases.length*sHTGR_Fuel.length]; + HashMap<Integer, String> tooltip = new HashMap<Integer, String>(); + int i = 0; + for(Fuel_ fuel : sHTGR_Fuel) + for(Base_ base : sHTGR_Bases) + { + sHTGR_Materials[i] = "HTGR" + base.sName + fuel.sName; + aHTGR_Localizations.add(new LangEntry_("item." + sHTGR_Materials[i] + ".name", base.sEnglish + " (" + fuel.sEnglish + ")")); + if(((i+1) % MATERIALS_PER_FUEL == (USABLE_FUEL_INDEX + 1)) && fuel.tooltip != null && fuel.tooltip != "") + tooltip.put(i, fuel.tooltip); + i++; + } + aHTGR_Materials = new CustomHTGRSimpleSubItemClass(tooltip, sHTGR_Materials); + } + + + public static void registeraTHR_Materials(){ + for(LangEntry_ iName : aHTGR_Localizations) + GT_LanguageManager.addStringLocalization(iName.sName, iName.sEnglish); + GameRegistry.registerItem(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials,"bw.HTGRMaterials"); + } + + public static void registerTHR_Recipes(){ + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + new ItemStack(GregTech_API.sBlockCasings3,1,12), + GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Europium,6), + GT_OreDictUnificator.get(OrePrefixes.screw,Materials.Europium,24) + }, + Materials.Lead.getMolten(1296), + new ItemStack(GregTech_API.sBlockCasings8,1,5), + 200, + BW_Util.getMachineVoltageFromTier(6) + ); + int i = 0; + for(Fuel_ fuel : sHTGR_Fuel){ + GT_Values.RA.addMixerRecipe(fuel.mainItem, fuel.secondaryItem ,GT_Utility.getIntegratedCircuit(1),null,null,null,new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i),400,30); + GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i), Materials.Carbon.getDust(64),new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 1),40,30); + GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 1), Materials.Silicon.getDust(64),new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 2),40,30); + GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 2), Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 3),40,30); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false, new ItemStack[]{new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 3), GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4)}, null, null, null, null, 32000, 30, 0); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false, new ItemStack[]{new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 5), GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 6)}, null, null, null, null,48000,30,0); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 6), GT_Values.NI, GT_Values.NF, + fuel.recycledFluid, + fuel.recycledItems[0], + fuel.recycledItems[1], + fuel.recycledItems[2], + fuel.recycledItems[3], + fuel.recycledItems[4], + fuel.recycledItems[5], + fuel.recycleChances, + 1200, 30); + i += sHTGR_Bases.length; + } + } + + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java index c7a06914f5..cb0a454dce 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java @@ -22,6 +22,10 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis; +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.IStructureElement; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; @@ -36,12 +40,14 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.objects.XSTR; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -49,16 +55,55 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; + import java.util.Arrays; -public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { +public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_THTR> { private static final int BASECASINGINDEX = 44; + + private static final String STRUCTURE_PIECE_MAIN = "main"; + private static final IStructureDefinition<GT_TileEntity_THTR> STRUCTURE_DEFINITION = StructureDefinition.<GT_TileEntity_THTR>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ + {" BBBBBBB "," BBBBBBBBB ","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB","BBBBBBBBBBB"," BBBBBBBBB "," BBBBBBB "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" ccccccc "," c-------c ","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c","c---------c"," c-------c "," ccccccc "}, + {" bbb~bbb "," bbbbbbbbb ","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb","bbbbbbbbbbb"," bbbbbbbbb "," bbbbbbb "}, + })) + .addElement('c', ofBlock(GregTech_API.sBlockCasings3, 12)) + .addElement('b', ofChain( + ofHatchAdder(GT_TileEntity_THTR::addOutputToMachineList, BASECASINGINDEX, 1), + ofHatchAdder(GT_TileEntity_THTR::addMaintenanceToMachineList, BASECASINGINDEX, 1), + ofHatchAdder(GT_TileEntity_THTR::addEnergyInputToMachineList, BASECASINGINDEX, 1), + ofBlock(GregTech_API.sBlockCasings3, 12) + )) + .addElement('B', ofHatchAdderOptional(GT_TileEntity_THTR::addInputToMachineList, BASECASINGINDEX, 2, GregTech_API.sBlockCasings3, 12)) + .build(); + + + + private static final int HELIUM_NEEDED = 730000; + private static final int powerUsage = BW_Util.getMachineVoltageFromTier(5)/2; + private static final int maxcapacity = 675000; + private static final int mincapacity = 100000; private int HeliumSupply; - private int BISOPeletSupply, savedBISO; - private int TRISOPeletSupply, savedTRISO; + private int fuelsupply; private boolean empty; + private int coolanttaking = 0; public GT_TileEntity_THTR(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -74,13 +119,66 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { } @Override + public IStructureDefinition<GT_TileEntity_THTR> getStructureDefinition() { + return STRUCTURE_DEFINITION; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("High Temperature Reactor") + .addInfo("Controller block for the Thorium High Temperature Reactor (THTR)") + .addInfo("Needs a constant supply of coolant while running") + .addInfo("Needs at least 100k Fuel pebbles to start operation (can hold up to 675k pebbles)") + .addInfo("Consumes up to 0.5% of total Fuel Pellets per Operation depending on efficiency") + .addInfo("Efficiency is calculated exponentially depending on the amount of pebbles in the internal buffer") + .addInfo("Reactor will take 4 800L/t of coolant multiplied by efficiency") + .addInfo("Uses " + GT_Utility.formatNumbers(powerUsage) + " EU/t") + .addInfo("One Operation takes 9 hour") + .addSeparator() + .beginStructureBlock(11, 12, 11, true) + .addController("Front bottom center") + .addCasingInfo("Radiation Proof Casings", 0) + .addStructureInfo("Corners and the 2 touching blocks are air (cylindric)") + .addInputBus("Any top layer casing", 2) + .addInputHatch("Any top layer casing", 2) + .addOutputBus("Any bottom layer casing", 1) + .addOutputHatch("Any bottom layer casing", 1) + .addEnergyHatch("Any bottom layer casing", 1) + .addMaintenanceHatch("Any bottom layer casing", 1) + .toolTipFinisher("Bartworks"); + return tt; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped(); + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 5, 11, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) { + return ( + checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0) && + this.mMaintenanceHatches.size() == 1 && + this.mInputHatches.size() > 0 && + this.mOutputHatches.size() > 0 && + this.mInputBusses.size() > 0 && + this.mOutputBusses.size() > 0 && + this.mEnergyHatches.size() > 0 + ); + } + + @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.HeliumSupply = aNBT.getInteger("HeliumSupply"); - this.BISOPeletSupply = aNBT.getInteger("BISOPeletSupply"); - this.TRISOPeletSupply = aNBT.getInteger("TRISOPeletSupply"); - this.savedBISO = aNBT.getInteger("savedBISO"); - this.savedTRISO = aNBT.getInteger("savedTRISO"); + this.fuelsupply = aNBT.getInteger("fuelsupply"); + this.coolanttaking = aNBT.getInteger("coolanttaking"); this.empty = aNBT.getBoolean("EmptyMode"); } @@ -88,101 +186,80 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("HeliumSupply", this.HeliumSupply); - aNBT.setInteger("BISOPeletSupply", this.BISOPeletSupply); - aNBT.setInteger("TRISOPeletSupply", this.TRISOPeletSupply); - aNBT.setInteger("savedBISO", this.savedBISO); - aNBT.setInteger("savedTRISO", this.savedTRISO); + aNBT.setInteger("fuelsupply", this.fuelsupply); + aNBT.setInteger("coolanttaking", this.coolanttaking); aNBT.setBoolean("EmptyMode", this.empty); } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()){ + if (aBaseMetaTileEntity.isServerSide() && !this.empty){ if (this.HeliumSupply < GT_TileEntity_THTR.HELIUM_NEEDED){ for (FluidStack fluidStack : this.getStoredFluids()){ - if (fluidStack.isFluidEqual(Materials.Helium.getGas(1000))) { - while (this.HeliumSupply < GT_TileEntity_THTR.HELIUM_NEEDED && fluidStack.amount > 0) { - this.HeliumSupply++; - fluidStack.amount--; - } + if (fluidStack.isFluidEqual(Materials.Helium.getGas(1))) { + int toget = Math.min(GT_TileEntity_THTR.HELIUM_NEEDED - this.HeliumSupply, fluidStack.amount); + fluidStack.amount -= toget; + this.HeliumSupply += toget; + if(GT_TileEntity_THTR.HELIUM_NEEDED == this.HeliumSupply && fluidStack.amount == 0) + fluidStack = null; } } } - for (ItemStack itemStack : this.getStoredInputs()) { - if (GT_Utility.areStacksEqual(itemStack, new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 3))) { - if (this.BISOPeletSupply + this.TRISOPeletSupply < 675000) { - while (this.BISOPeletSupply + this.TRISOPeletSupply < 675000 && itemStack.stackSize > 0) { - itemStack.stackSize--; - this.TRISOPeletSupply++; - } - this.updateSlots(); - } - } else if (GT_Utility.areStacksEqual(itemStack, new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 1))) { - if (this.BISOPeletSupply + this.TRISOPeletSupply < 675000) { - while (this.BISOPeletSupply + this.TRISOPeletSupply < 675000 && itemStack.stackSize > 0) { - itemStack.stackSize--; - this.BISOPeletSupply++; - - } - this.updateSlots(); + if(this.fuelsupply < maxcapacity){ + for (ItemStack itemStack : this.getStoredInputs()) { + if (GT_Utility.areStacksEqual(itemStack, new ItemStack(THTRMaterials.aTHTR_Materials, 1, THTRMaterials.MATERIAL_FUEL_INDEX))) { + int toget = Math.min(maxcapacity - this.fuelsupply, itemStack.stackSize); + if(toget == 0) continue; + itemStack.stackSize -= toget; + this.fuelsupply += toget; } } + this.updateSlots(); } } } @Override public boolean checkRecipe(ItemStack controllerStack) { - - if (!(this.HeliumSupply >= GT_TileEntity_THTR.HELIUM_NEEDED && this.BISOPeletSupply + this.TRISOPeletSupply >= 100000)) + + if(this.empty) + { + if(this.HeliumSupply > 0 || this.fuelsupply > 0){ + this.mEfficiency = 10000; + this.mMaxProgresstime = 100; + return true; + } + return false; + } + if (!(this.HeliumSupply >= GT_TileEntity_THTR.HELIUM_NEEDED && this.fuelsupply >= mincapacity)) return false; - reduceSupply(); - addBurnedOutBalls(); - this.updateSlots(); - - this.mOutputFluids = new FluidStack[]{FluidRegistry.getFluidStack("ic2hotcoolant",0)}; - - this.mEUt=0; - this.mMaxProgresstime=648000; - return true; - } + double eff = Math.min(Math.pow((double)(this.fuelsupply - mincapacity)/((maxcapacity-mincapacity)/10D), 2D)+1, 100D)/100D - ((double)(getIdealStatus() - getRepairStatus()) / 10D); + if(eff <= 0D) + return false; - private void reduceSupply() { - int toReduce = new XSTR().nextInt(MathUtils.floorInt(((double)this.BISOPeletSupply + (double)this.TRISOPeletSupply) / 200D)); - - this.savedBISO = BISOPeletSupply; - this.savedTRISO = TRISOPeletSupply; - - if (new XSTR().nextBoolean()) { - if (this.BISOPeletSupply > 0) - this.BISOPeletSupply -= toReduce; - else - this.TRISOPeletSupply -= toReduce; - } else { - if (this.TRISOPeletSupply > 0) - this.TRISOPeletSupply -= toReduce; - else - this.BISOPeletSupply -= toReduce; - } - } + int toReduce = MathUtils.floorInt((double)this.fuelsupply * 0.005D * eff); - private void addBurnedOutBalls() { - int burnedTRISO = this.savedTRISO - this.TRISOPeletSupply; - int burnedBISO = this.savedBISO - this.BISOPeletSupply; - int burnedTRISOBall = burnedTRISO / 64; - int burnedBISOBall = burnedBISO / 64; + this.fuelsupply -= toReduce; + int burnedballs = toReduce/64; + if(burnedballs > 0) + toReduce -= burnedballs*64; - burnedBISO -= (burnedBISOBall*64); - burnedTRISO -= (burnedTRISOBall*64); + int meta = THTRMaterials.MATERIAL_USED_FUEL_INDEX; this.mOutputItems = new ItemStack[] { - new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, burnedTRISOBall, 6), - new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, burnedTRISO, 8), - new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, burnedBISOBall, 7), - new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, burnedBISO, 9) + new ItemStack(THTRMaterials.aTHTR_Materials, burnedballs, meta), + new ItemStack(THTRMaterials.aTHTR_Materials, toReduce, meta + 1) }; + + // this.updateSlots(); not needed ? + + this.coolanttaking = (int)(4800D * eff); + this.mEfficiency = (int)(eff*10000D); + this.mEUt=-powerUsage; + this.mMaxProgresstime=648000; + return true; } @Override @@ -190,92 +267,38 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { if (this.empty){ this.addOutput(Materials.Helium.getGas(this.HeliumSupply)); - this.addOutput(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, this.TRISOPeletSupply, 3)); - this.addOutput(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, this.BISOPeletSupply, 1)); + this.addOutput(new ItemStack(THTRMaterials.aTHTR_Materials, this.fuelsupply, THTRMaterials.MATERIAL_FUEL_INDEX)); this.HeliumSupply = 0; - this.TRISOPeletSupply = 0; - this.BISOPeletSupply = 0; - this.savedTRISO = 0; - this.savedBISO = 0; + this.fuelsupply = 0; + this.updateSlots(); return true; } - long accessibleCoolant = 0; - for (FluidStack fluidStack : this.getStoredFluids()) { - if (fluidStack.isFluidEqual(FluidRegistry.getFluidStack("ic2coolant",1))) { - accessibleCoolant += fluidStack.amount; - } - } - - accessibleCoolant = Math.min((long) ((0.00711111111111111111111111111111D*(double)this.savedTRISO + 0.00474074074074074074074074074074D*(double)this.savedBISO)), accessibleCoolant); + if(!super.onRunningTick(aStack)) + return false; - for (FluidStack fluidStack : this.getStoredFluids()) { - if (fluidStack.isFluidEqual(FluidRegistry.getFluidStack("ic2coolant",1))) { - if (accessibleCoolant >= fluidStack.amount) { - accessibleCoolant -= fluidStack.amount; - fluidStack.amount = 0; - } else if (accessibleCoolant > 0) { - fluidStack.amount -= accessibleCoolant; - accessibleCoolant = 0; + int takecoolant = coolanttaking; + int drainedamount = 0; + + for(GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches){ + if (isValidMetaTileEntity(tHatch)) { + FluidStack tLiquid = tHatch.getFluid(); + if (tLiquid != null && tLiquid.isFluidEqual(FluidRegistry.getFluidStack("ic2coolant",1))){ + FluidStack drained = tHatch.drain(takecoolant, true); + takecoolant -= drained.amount; + drainedamount += drained.amount; + if(takecoolant <= 0) + break; } } } - this.mOutputFluids[0].amount += accessibleCoolant; - this.updateSlots(); - return true; - } + + if(drainedamount > 0) + addOutput(FluidRegistry.getFluidStack("ic2hotcoolant", drainedamount)); - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) { - byte xz = 5; - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * xz; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * xz; - for (int x = -xz; x <= xz; x++) { - for (int z = -xz; z <= xz; z++) { - for (int y = 0; y < 12; y++) { - if (y == 0 || y == 11) { - if ( - !((Math.abs(z) == xz-1 && Math.abs(x) == xz)) && - !((Math.abs(z) == xz && Math.abs(x) == xz-1)) && - !((Math.abs(x) == Math.abs(z) && Math.abs(x) == xz)) - ) { - if (x + xDir == 0 && y == 0 && z + zDir == 0) - continue; - if (!(aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir + x, y, zDir + z) == 12)) { - if ( - ( - !(this.addInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), GT_TileEntity_THTR.BASECASINGINDEX) && y == 11) && - !(this.addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), GT_TileEntity_THTR.BASECASINGINDEX) && y == 0)) && - !this.addMaintenanceToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), GT_TileEntity_THTR.BASECASINGINDEX) - ) { - return false; - } - } - } - } - - -// else if (!((Math.abs(x) == 4 && Math.abs(z) == 4) || (Math.abs(x) == 3 && Math.abs(z) == 3)) && !(Math.abs(x) < 3 || Math.abs(z) < 3) && !((Math.abs(x) == Math.abs(z) && Math.abs(x) == 3) || Math.abs(x) == 4 || Math.abs(z) == 4)) { - else if (!((Math.abs(z) == xz-1 && Math.abs(x) == xz))) - if (!((Math.abs(z) == xz && Math.abs(x) == xz-1))) - if (!((Math.abs(x) == Math.abs(z) && Math.abs(x) == xz))) - if (!(Math.abs(x) < xz && Math.abs(z) != xz)) - - { - if (!(aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir + x, y, zDir + z) == 12)) { - if ( - !this.addMaintenanceToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), GT_TileEntity_THTR.BASECASINGINDEX)) - { - return false; - } - } - } - } - } - - } + this.updateSlots(); - return this.mMaintenanceHatches.size() == 1; + return true; } @Override @@ -307,44 +330,53 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getInfoData() { return new String[]{ - "Progress:", GT_Utility.formatNumbers(this.mProgresstime / 20) + "secs", GT_Utility.formatNumbers(this.mMaxProgresstime / 20) + "secs", - "BISO-Pebbles:", GT_Utility.formatNumbers(this.BISOPeletSupply) + "pcs.", - "TRISO-Pebbles:", GT_Utility.formatNumbers(this.TRISOPeletSupply) + "pcs.", + "Progress:", GT_Utility.formatNumbers(this.mProgresstime / 20) + "secs /" + GT_Utility.formatNumbers(this.mMaxProgresstime / 20) + "secs", + "TRISO-Pebbles:", GT_Utility.formatNumbers(this.fuelsupply) + "pcs. / " + GT_Utility.formatNumbers(this.fuelsupply) + "psc.", "Helium-Level:", GT_Utility.formatNumbers(this.HeliumSupply) + "L / " + GT_Utility.formatNumbers(GT_TileEntity_THTR.HELIUM_NEEDED) + "L", - "Coolant/t:", GT_Utility.formatNumbers(this.savedBISO+this.savedTRISO >= 100000 ? (long) ((0.00711111111111111111111111111111D * (double) this.savedTRISO + 0.00474074074074074074074074074074D * (double) this.savedBISO)) : 0) + "L/t", + "Coolant/t:", GT_Utility.formatNumbers(this.mProgresstime == 0 ? 0 : coolanttaking) + "L/t", "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus()) }; } @Override - public String[] getDescription() { - return BW_Tooltip_Reference.getTranslatedBrandedTooltip("tooltip.tile.htr.0.name"); - } - - @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return aSide == aFacing ? new ITexture[]{Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX), TextureFactory.of(aActive ? TextureFactory.of(TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE), TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).glow().build()) : TextureFactory.of(TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER), TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).glow().build()))} : new ITexture[]{Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX)}; + if (aSide == aFacing) { + if (aActive) + return new ITexture[]{ + Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow().build()}; + return new ITexture[]{ + Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), + TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build()}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX)}; } @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if(this.mMaxProgresstime > 0) + { + GT_Utility.sendChatToPlayer(aPlayer, "THTR mode cannot be changed while the machine is running."); + return; + } this.empty = !this.empty; - GT_Utility.sendChatToPlayer(aPlayer, this.empty ? "THTR will now empty itself." : "THTR is back in normal Operation"); + GT_Utility.sendChatToPlayer(aPlayer, "THTR is now running in " + (this.empty ? "emptying mode." : "normal Operation")); } public static class THTRMaterials{ static final SimpleSubItemClass aTHTR_Materials = new SimpleSubItemClass( - "BISOPelletCompound", - "BISOPellet", - "TRISOPelletCompound", - "TRISOPellet", - "BISOPelletBall", - "TRISOPelletBall", - "BurnedOutBISOPelletBall", - "BurnedOutTRISOPelletBall", - "BurnedOutBISOPellet", - "BurnedOutTRISOPellet" + "BISOPelletCompound", // 0 + "BISOPelletBall", // 1 + "TRISOPelletCompound", // 2 + "TRISOPelletBall", // 3 + "TRISOPellet", // 4 + "BurnedOutTRISOPelletBall", // 5 + "BurnedOutTRISOPellet" // 6 ); + public static final int MATERIAL_FUEL_INDEX = 4; + public static final int MATERIAL_USED_FUEL_INDEX = 5; public static void registeraTHR_Materials(){ GameRegistry.registerItem(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,"bw.THTRMaterials"); } @@ -354,8 +386,8 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { Materials.Thorium.getDust(1),GT_Values.NI,GT_Values.NF,GT_Values.NF, Materials.Thorium.getDustSmall(2),Materials.Thorium.getDustSmall(1), WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1), - WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),Materials.Lutetium.getDustTiny(1), - new int[]{1600,1500,200,200,50,50}, + WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),GT_Values.NI, + new int[]{1600,1500,200,200,50}, 10000, BW_Util.getMachineVoltageFromTier(4)); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.plateDense,Materials.Lead,6), @@ -366,20 +398,19 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { 40, BW_Util.getMachineVoltageFromTier(5) ); - GT_Values.RA.addMixerRecipe(WerkstoffLoader.Thorium232.get(OrePrefixes.dust,10),Materials.Uranium235.getDust(1),GT_Utility.getIntegratedCircuit(1),null,null,null,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),400,30); - GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),40,30); + GT_Values.RA.addMixerRecipe(WerkstoffLoader.Thorium232.get(OrePrefixes.dust,10),Materials.Uranium235.getDust(1),GT_Utility.getIntegratedCircuit(2),null,null,null,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),400,30); + GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,1),40,30); + GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,1),Materials.Silicon.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),40,30); + GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,3),40,30); ItemStack[] pellets = new ItemStack[6]; - Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,1)); - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,24000,30,0); - GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),Materials.Silicon.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),40,30); - GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),40,30); - pellets = new ItemStack[6]; - Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,3)); - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,48000,30,0); - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,6),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,8)},null,null,null,null,48000,30,0); - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,7),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,9)},null,null,null,null,48000,30,0); - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,8)},new ItemStack[]{Materials.Lutetium.getDustSmall(2)},null,null,null,null,1200,30,0); - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,9)},new ItemStack[]{Materials.Lutetium.getDustSmall(4)},null,null,null,null,1200,30,0); + Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,4)); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,3),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,48000,30,0); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,6)},null,null,null,null,48000,30,0); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 6), GT_Values.NI, GT_Values.NF, GT_Values.NF, + Materials.Lead.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, + new int[]{300}, + 1200, 30); } } diff --git a/src/main/resources/assets/bartworks/lang/de_DE.lang b/src/main/resources/assets/bartworks/lang/de_DE.lang index dfeb3cfd6e..98a94abc98 100644 --- a/src/main/resources/assets/bartworks/lang/de_DE.lang +++ b/src/main/resources/assets/bartworks/lang/de_DE.lang @@ -18,9 +18,6 @@ BW_Machinery_Casings.1.name=Transformer-Wicklungs Block GT_LESU_CASING.0.name=LESU Hülle filled.item.petriDish.name=Petri Schale mit einer Kultur item.Agarose.name=Agarose -item.BISOPellet.name=BISO Kügelchen -item.BISOPelletBall.name=BISO Kügelchen Ball -item.BISOPelletCompound.name=BISO Kügelchen Material item.BW_CombinedRotor.name=Primitiver Multi-Material Rotor (nur Wind) item.BW_LeatherRotor.name=Primitiver Leder Rotor (nur Wind) item.BW_PaperRotor.name=Primitiver Papier Rotor (nur Wind) @@ -39,9 +36,6 @@ item.GT_Teslastaff_Item.name=Teslastab item.IncubationModule.name=Incubations Modul item.PlasmaMembrane.name=Plasma Membran item.PlasmidCell.name=Plasmid-Proben Flasche -item.TRISOPellet.name=TRISO Kügelchen -item.TRISOPelletBall.name=TRISO Kügelchen Ball -item.TRISOPelletCompound.name=TRISO Kügelchen Material item.completed_grindstone.name=Mahlstein item.grindstone_bottom.name=Unteres Teil des Mahlsteins item.grindstone_top.name=Oberes Teil des Mahlsteins @@ -112,7 +106,6 @@ tooltip.tile.bvat.0.name=Controller Block for the Bacterial Vat;Size(WxHxD): 5x4 tooltip.tile.diode.0.name=A Simple diode that will allow Energy Flow in only one direction. tooltip.tile.eic.0.name=Controller Block for the Electric Implosion Compressor;Size(WxHxD): 3x9x3;Uses Electricity instead of Explosives;Controller: Layer 3, front, center;Layer 1 and Layer 9: Solid Steel Machine Casings, each: 1 Energy Hatch in the middle;Layer 2,3,7,8: Middle: Nickel-Zinc-Ferrit Blocks, Outer: Transformer-Winding Blocks;Layer 4,5,6: Neutronium Blocks;1+ Input Bus, 1+ Output Bus, 1 Maintenance Hatch at any Solid Steel Machine Casing;Do NOT Obstruct or mine the Moving parts while in Operation, will explode if you do so! tooltip.tile.energydistributor.0.name=Splits Amperage into several Sides. -tooltip.tile.htr.0.name=Controller Block für den Thorium Hoch Temperatur Reaktor;Größe(BxHxL): 11x12x11 (Innen Leer);Controller: Vorne Mitte, Unterste Schicht;Ecken und die 2 beührenden Blöcke sind Luft (Zylinder);Once build, Helium is inserted into the Fluid Input Hatch until it doesnt accept any more;1+ Output Hatch (Any Bottom casing);1+ Input Hatch (Any Top casing);1+ Input Bus (Any Top casing);1x Maintenance Hatch (Any casing);Raidation Proof Casings for the Rest;Needs a constant supply of coolant while running, will output after complete Operation;Needs at least 100k Fuel pebbles to start operation (can hold up to 675k pebbles);Consumes 1 Fuel Pellet per Operation;TRISO pebbles provide 30% more Energy;Each pebble increases the amount of converted coolant;One Operation takes 27 Ingame Days tooltip.tile.lesu.0.name=Controller Block for the GT2-Styled L.E.S.U.;Size: ANY tooltip.tile.lesu.1.name=Storage per LESU Casing: tooltip.tile.lesu.2.name=Output EU: LESU Casings amount;Input EU: Next Voltage Tier to Output EU;Input/Output Amps can be configured via 4 Circuits in GUI;Output Side has a dot on it. diff --git a/src/main/resources/assets/bartworks/lang/en_US.lang b/src/main/resources/assets/bartworks/lang/en_US.lang index 98482e3482..b2a671cd20 100644 --- a/src/main/resources/assets/bartworks/lang/en_US.lang +++ b/src/main/resources/assets/bartworks/lang/en_US.lang @@ -144,15 +144,11 @@ tile.radiohatch.name=Radio Hatch tile.bw.windmill.name=Windmill tile.manutrafo.name=Manual Trafo -tooltip.tile.htr.0.name=Controller Block for the Thorium High Temperature Reactor;Size(WxHxD): 11x12x11 (Hollow);Controller: Front Center, Lowest Layer;Corners and the 2 touching blocks are air (cylindric);Once built, Helium is inserted into the Fluid Input Hatch until it doesn't accept any more;1+ Output Hatch (Any Bottom casing);1+ Input Hatch (Any Top casing);1+ Input Bus (Any Top casing);1x Maintenance Hatch (Any casing);Radiation Proof Casings for the Rest;Needs a constant supply of coolant while running, will output after complete operation;Needs at least 100k Fuel pebbles to start operation (can hold up to 675k pebbles);Consumes up to 0.5% of total Fuel Pellets per Operation;TRISO pebbles provide 30% more Energy;Each pebble increases the amount of converted coolant;One Operation takes 27 Ingame Days item.TRISOPellet.name=TRISO pebble item.TRISOPelletBall.name=TRISO pebble ball item.BISOPelletBall.name=BISO pebble ball -item.BISOPellet.name=BISO pebble item.TRISOPelletCompound.name=TRISO pebble compound item.BISOPelletCompound.name=BISO pebble compound -item.BurnedOutBISOPelletBall.name=Burned Out BISO pebble ball -item.BurnedOutBISOPellet.name=Burned Out BISO pebble item.BurnedOutTRISOPelletBall.name=Burned Out TRISO pebble ball item.BurnedOutTRISOPellet.name=Burned Out TRISO pebble diff --git a/src/main/resources/assets/bartworks/lang/fr_FR.lang b/src/main/resources/assets/bartworks/lang/fr_FR.lang index 4fc3e1890f..1528e26c86 100644 --- a/src/main/resources/assets/bartworks/lang/fr_FR.lang +++ b/src/main/resources/assets/bartworks/lang/fr_FR.lang @@ -144,12 +144,7 @@ tile.radiohatch.name=Trappe Radioactive tile.bw.windmill.name=Eolienne tile.manutrafo.name=Transformateur Manuel -item.TRISOPellet.name=Galet TRISO -item.TRISOPelletBall.name=Boule De Galets TRISO -item.BISOPelletBall.name=Boule De Galets BISO -item.BISOPellet.name=Galet TRISO -item.TRISOPelletCompound.name=Composé De Galet TRISO -item.BISOPelletCompound.name=Composé De Galet BISO + itemGroup.bartworksMetaMaterials=Méta Matériaux De BartWorks tooltip.tile.eic.0.name=Bloc Contrôleur pour le Compresseur à Implosion Electrique;Taille (LxHxP): 3x9x3;Utilise de l'Electricité à la place d'Explosifs;Contrôleur: couche 3, devant, centré;Couches 1 et 9: carter de machine en acier solide, pour chaque couche: 1 Trappe d'Energie au milieu;Couche 2,3,7,8: Milieu: Bloc de Ferrite en Nickel-Zinc, Extérieur: Bloc de bobinage de Transformateur;Couche 4,5,6: Blocs de Neutronium;1+ Bus d'Entrée, 1+ Bus de Sortie, 1 trappe de maintenance n'importe où dans les Blocs Carter en Acier Solide;Ne PAS obstruer ou miner les Parties mobile pendant le fonctionnement, ou explosion garantie! diff --git a/src/main/resources/assets/bartworks/lang/zh_CN.lang b/src/main/resources/assets/bartworks/lang/zh_CN.lang index 419c845f96..f4a1fa6e64 100644 --- a/src/main/resources/assets/bartworks/lang/zh_CN.lang +++ b/src/main/resources/assets/bartworks/lang/zh_CN.lang @@ -144,13 +144,6 @@ tile.radiohatch.name=放射仓 tile.bw.windmill.name=风车 tile.manutrafo.name=手动变压器 -tooltip.tile.htr.0.name=高温钍反应堆的控制器方块;大小(宽x高x长):11x12x11 (中空);控制器:正面中心,最低一层;角落和两个相邻的方块是空气;:一旦搭建完成,需要在输入仓中输入氦气直到不再接受;1+输出仓(任意底部机械方块);1+输入仓(任意顶部机械方块);1+输入总线(任意顶部机械方块);1x维护仓(任意机械方块);其余的为辐射防护机械方块;在运行时需要持续供应冷却液,完成工作后输出;需要至少100k卵石燃料才能开始工作(最多可使用675k个卵石);每次操作消耗1个燃料颗粒;TRISO卵石将提供30%的额外能量;每个卵石都会增加转换冷却剂的需求数量;一次工作耗时27个游戏日 -item.TRISOPellet.name=TRISO卵石 -item.TRISOPelletBall.name=TRISO卵石球 -item.BISOPelletBall.name=BISO卵石球 -item.BISOPellet.name=BISO卵石 -item.TRISOPelletCompound.name=TRISO卵石复合材料 -item.BISOPelletCompound.name=BISO卵石复合材料 itemGroup.bartworksMetaMaterials=BartWorks-meta材料 tooltip.tile.eic.0.name=电气聚爆压缩机的控制器方块;大小(宽x高x长):3x9x3;使用电而不是爆炸物工作;控制器在第三层正面中心;第一到第九层为坚硬钢机械方块,每层中间为能量仓;第2,3,7,8层:中心为镍锌铁氧体方块,其余的为变压器线圈块;第4,5,6层为中子块;1+输入总线,1+输出总线,1个维护仓于坚硬钢机械方块;在操作过程中,请勿遮挡或挖掘移动方块,这会上演爆炸的艺术!! diff --git a/src/main/resources/assets/bartworks/textures/items/BISOPellet.png b/src/main/resources/assets/bartworks/textures/items/BISOPellet.png Binary files differdeleted file mode 100644 index 4fb39c473b..0000000000 --- a/src/main/resources/assets/bartworks/textures/items/BISOPellet.png +++ /dev/null diff --git a/src/main/resources/assets/bartworks/textures/items/BurnedOutBISOPellet.png b/src/main/resources/assets/bartworks/textures/items/BurnedOutBISOPellet.png Binary files differdeleted file mode 100644 index 573d4b309e..0000000000 --- a/src/main/resources/assets/bartworks/textures/items/BurnedOutBISOPellet.png +++ /dev/null diff --git a/src/main/resources/assets/bartworks/textures/items/BurnedOutBISOPelletBall.png b/src/main/resources/assets/bartworks/textures/items/BurnedOutBISOPelletBall.png Binary files differdeleted file mode 100644 index 72ba51bbe0..0000000000 --- a/src/main/resources/assets/bartworks/textures/items/BurnedOutBISOPelletBall.png +++ /dev/null diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.png Binary files differnew file mode 100644 index 0000000000..18ab91de32 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.png Binary files differnew file mode 100644 index 0000000000..26f20f97f1 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.png Binary files differnew file mode 100644 index 0000000000..53c59ec79c --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.png Binary files differnew file mode 100644 index 0000000000..714b4806dd --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.png Binary files differnew file mode 100644 index 0000000000..2be7586764 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.png Binary files differnew file mode 100644 index 0000000000..6f95ff5256 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.png Binary files differnew file mode 100644 index 0000000000..e29d9dc953 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.png Binary files differnew file mode 100644 index 0000000000..1e0c684eb1 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.png Binary files differnew file mode 100644 index 0000000000..1cbc98794d --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.png Binary files differnew file mode 100644 index 0000000000..7858c997d4 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.png Binary files differnew file mode 100644 index 0000000000..19b94a07cb --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.png Binary files differnew file mode 100644 index 0000000000..324df7101b --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.png Binary files differnew file mode 100644 index 0000000000..28432d2d9b --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.png Binary files differnew file mode 100644 index 0000000000..ada36141c6 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.png Binary files differnew file mode 100644 index 0000000000..7054c76741 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.png Binary files differnew file mode 100644 index 0000000000..b3b36e3bdc --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.png Binary files differnew file mode 100644 index 0000000000..ab142635c9 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.png Binary files differnew file mode 100644 index 0000000000..e7ac40c10f --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.png Binary files differnew file mode 100644 index 0000000000..ea22c17f5c --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.png Binary files differnew file mode 100644 index 0000000000..b2c8003b5c --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.png diff --git a/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.png b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.png Binary files differnew file mode 100644 index 0000000000..0d026c2492 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.png |