aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bartworks/common/tileentities
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/bartworks/common/tileentities')
-rw-r--r--src/main/java/bartworks/common/tileentities/classic/TileEntityDimIDBridge.java24
-rw-r--r--src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java375
-rw-r--r--src/main/java/bartworks/common/tileentities/classic/TileEntityRotorBlock.java41
-rw-r--r--src/main/java/bartworks/common/tileentities/debug/MTECreativeScanner.java70
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java834
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java672
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEDeepEarthHeatingPump.java336
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java565
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java619
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTELESU.java590
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java363
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java416
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java637
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java430
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java278
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java446
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java465
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaVacuumFreezer.java533
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MegaMultiBlockBase.java212
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java494
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTEAcidGenerator.java155
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTEBioLab.java405
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTECompressedFluidHatch.java57
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTEDiode.java125
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTEEnergyDistributor.java72
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTEGiantOutputHatch.java41
-rw-r--r--src/main/java/bartworks/common/tileentities/tiered/MTEHumongousInputHatch.java41
27 files changed, 9296 insertions, 0 deletions
diff --git a/src/main/java/bartworks/common/tileentities/classic/TileEntityDimIDBridge.java b/src/main/java/bartworks/common/tileentities/classic/TileEntityDimIDBridge.java
new file mode 100644
index 0000000000..6b00b65054
--- /dev/null
+++ b/src/main/java/bartworks/common/tileentities/classic/TileEntityDimIDBridge.java
@@ -0,0 +1,24 @@
+/*
+ * 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 bartworks.common.tileentities.classic;
+
+import net.minecraft.tileentity.TileEntity;
+
+public class TileEntityDimIDBridge extends TileEntity {
+
+ @Override
+ public boolean canUpdate() {
+ return false;
+ }
+}
diff --git a/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java b/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java
new file mode 100644
index 0000000000..3f973e8eea
--- /dev/null
+++ b/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java
@@ -0,0 +1,375 @@
+/*
+ * 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 bartworks.common.tileentities.classic;
+
+import java.util.Arrays;
+import java.util.Optional;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityFurnace;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidEvent;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+import net.minecraftforge.fluids.IFluidTank;
+
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.api.forge.InvWrapper;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.widget.ProgressBar;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
+import bartworks.API.ITileAddsInformation;
+import bartworks.API.ITileDropsContent;
+import bartworks.API.ITileHasDifferentTextureSides;
+import bartworks.API.modularUI.BWUITextures;
+import bartworks.MainMod;
+import bartworks.common.configs.ConfigHandler;
+import gregtech.api.util.GTUtility;
+import gregtech.common.Pollution;
+
+public class TileEntityHeatedWaterPump extends TileEntity implements ITileDropsContent, IFluidHandler, IFluidTank,
+ ITileWithModularUI, ITileAddsInformation, ITileHasDifferentTextureSides {
+
+ public static final int FUELSLOT = 0;
+ public static final Fluid WATER = FluidRegistry.WATER;
+ public ItemStack fuelstack;
+ public FluidStack outputstack = new FluidStack(FluidRegistry.WATER, 0);
+ public int fuel;
+ public byte tick;
+ public int maxfuel;
+ public ItemStack fakestack = new ItemStack(Blocks.water);
+
+ @Override
+ public void writeToNBT(NBTTagCompound compound) {
+ NBTTagCompound subItemStack = new NBTTagCompound();
+ if (this.fuelstack != null) {
+ this.fuelstack.writeToNBT(subItemStack);
+ }
+ compound.setTag("ItemStack", subItemStack);
+ NBTTagCompound subFluidStack = new NBTTagCompound();
+ this.outputstack.writeToNBT(subFluidStack);
+ compound.setTag("FluidStack", subFluidStack);
+ compound.setInteger("fuel", this.fuel);
+ compound.setInteger("maxfuel", this.maxfuel);
+ compound.setByte("tick", this.tick);
+ super.writeToNBT(compound);
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound compound) {
+ this.tick = compound.getByte("tick");
+ this.fuel = compound.getInteger("fuel");
+ this.maxfuel = compound.getInteger("maxfuel");
+ this.outputstack = FluidStack.loadFluidStackFromNBT(compound.getCompoundTag("FluidStack"));
+ if (!compound.getCompoundTag("ItemStack")
+ .equals(new NBTTagCompound()))
+ this.fuelstack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("ItemStack"));
+ super.readFromNBT(compound);
+ }
+
+ private boolean checkPreUpdate() {
+ return (this.fuelstack == null || this.fuelstack.stackSize <= 0) && this.fuel <= 0;
+ }
+
+ private void fixUnderlflow() {
+ if (this.fuel < 0) this.fuel = 0;
+ }
+
+ private void handleRefuel() {
+ if (this.fuelstack != null && this.fuel == 0) {
+ this.fuel = this.maxfuel = TileEntityFurnace.getItemBurnTime(this.fuelstack);
+ --this.fuelstack.stackSize;
+ if (this.fuelstack.stackSize <= 0) this.fuelstack = fuelstack.getItem()
+ .getContainerItem(fuelstack);
+ }
+ }
+
+ private void handleWaterGeneration() {
+ if (this.fuel > 0) {
+ ++this.tick;
+ --this.fuel;
+ if (this.tick % 20 == 0) {
+ if (this.outputstack.amount <= 8000 - ConfigHandler.mbWaterperSec)
+ this.outputstack.amount += ConfigHandler.mbWaterperSec;
+ this.tick = 0;
+ }
+ }
+ }
+
+ @Override
+ public void updateEntity() {
+ if (this.worldObj.isRemote) return;
+
+ this.pushWaterToAdjacentTiles();
+ this.fakestack.setStackDisplayName(this.outputstack.amount + "L Water");
+ if (this.checkPreUpdate()) return;
+
+ this.fixUnderlflow();
+ this.handleRefuel();
+ this.handleWaterGeneration();
+ this.causePollution();
+ }
+
+ private void pushWaterToAdjacentTiles() {
+ Arrays.stream(ForgeDirection.values(), 0, 6) // All but Unknown
+ .forEach(
+ direction -> Optional
+ .ofNullable(
+ this.worldObj.getTileEntity(
+ this.xCoord + direction.offsetX,
+ this.yCoord + direction.offsetY,
+ this.zCoord + direction.offsetZ))
+ .ifPresent(te -> {
+ if (te instanceof IFluidHandler tank) {
+ if (tank.canFill(direction.getOpposite(), this.outputstack.getFluid())) {
+ int drainage = tank.fill(direction.getOpposite(), this.outputstack, false);
+ if (drainage > 0) {
+ tank.fill(direction.getOpposite(), this.outputstack, true);
+ this.drain(drainage, true);
+ }
+ }
+ } else if (te instanceof IFluidTank tank) {
+ int drainage = tank.fill(this.outputstack, false);
+ if (drainage > 0) {
+ tank.fill(this.outputstack, true);
+ this.drain(drainage, true);
+ }
+ }
+ }));
+ }
+
+ private void causePollution() {
+ Optional.ofNullable(this.worldObj)
+ .ifPresent(e -> {
+ if (e.getTotalWorldTime() % 20 == 0) {
+ Optional.ofNullable(e.getChunkFromBlockCoords(this.xCoord, this.zCoord))
+ .ifPresent(c -> Pollution.addPollution(c, ConfigHandler.pollutionHeatedWaterPumpSecond));
+ }
+ });
+ }
+
+ @Override
+ public int[] getAccessibleSlotsFromSide(int side) {
+ return new int[] { 0 };
+ }
+
+ @Override
+ public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
+ return TileEntityFurnace.getItemBurnTime(p_102007_2_) > 0;
+ }
+
+ @Override
+ public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
+ return false;
+ }
+
+ @Override
+ public int getSizeInventory() {
+ return 2;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(int slotIn) {
+ if (slotIn == 0) return this.fuelstack;
+ return this.fakestack;
+ }
+
+ @Override
+ public ItemStack decrStackSize(int slot, int ammount) {
+ if (slot != TileEntityHeatedWaterPump.FUELSLOT || this.fuelstack == null || ammount > this.fuelstack.stackSize)
+ return null;
+
+ return this.fuelstack.splitStack(ammount);
+ }
+
+ @Override
+ public ItemStack getStackInSlotOnClosing(int index) {
+ return null;
+ }
+
+ @Override
+ public void setInventorySlotContents(int slot, ItemStack stack) {
+ if (slot == TileEntityHeatedWaterPump.FUELSLOT) this.fuelstack = stack;
+ else this.fakestack = stack;
+ }
+
+ @Override
+ public String getInventoryName() {
+ return null;
+ }
+
+ @Override
+ public boolean hasCustomInventoryName() {
+ return false;
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 64;
+ }
+
+ @Override
+ public boolean isUseableByPlayer(EntityPlayer player) {
+ return true;
+ }
+
+ @Override
+ public void openInventory() {}
+
+ @Override
+ public void closeInventory() {}
+
+ @Override
+ public boolean isItemValidForSlot(int index, ItemStack stack) {
+ return TileEntityFurnace.getItemBurnTime(stack) > 0 && index == TileEntityHeatedWaterPump.FUELSLOT;
+ }
+
+ @Override
+ public FluidStack getFluid() {
+ return this.outputstack.amount > 0 ? this.outputstack : null;
+ }
+
+ @Override
+ public int getFluidAmount() {
+ return this.outputstack.amount;
+ }
+
+ @Override
+ public int getCapacity() {
+ return 8000;
+ }
+
+ @Override
+ public FluidTankInfo getInfo() {
+ return new FluidTankInfo(this);
+ }
+
+ @Override
+ public int fill(FluidStack resource, boolean doFill) {
+ return 0;
+ }
+
+ @Override
+ public FluidStack drain(int maxDrain, boolean doDrain) {
+ int actualdrain = maxDrain;
+ if (actualdrain > this.outputstack.amount) actualdrain = this.outputstack.amount;
+ FluidStack ret = new FluidStack(TileEntityHeatedWaterPump.WATER, actualdrain);
+ if (ret.amount == 0) ret = null;
+ if (doDrain) {
+ this.outputstack.amount -= actualdrain;
+ FluidEvent.fireEvent(
+ new FluidEvent.FluidDrainingEvent(
+ this.outputstack,
+ this.getWorldObj(),
+ this.xCoord,
+ this.yCoord,
+ this.zCoord,
+ this,
+ actualdrain));
+ }
+ return ret;
+ }
+
+ @Override
+ public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
+ return 0;
+ }
+
+ @Override
+ public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
+ if (resource != null && resource.getFluid() == TileEntityHeatedWaterPump.WATER
+ && this.drain(resource.amount, false) != null) return this.drain(resource.amount, doDrain);
+ return null;
+ }
+
+ @Override
+ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
+ return this.drain(maxDrain, doDrain);
+ }
+
+ @Override
+ public boolean canFill(ForgeDirection from, Fluid fluid) {
+ return false;
+ }
+
+ @Override
+ public boolean canDrain(ForgeDirection from, Fluid fluid) {
+ return fluid == null || fluid == TileEntityHeatedWaterPump.WATER;
+ }
+
+ @Override
+ public FluidTankInfo[] getTankInfo(ForgeDirection from) {
+ return new FluidTankInfo[] { this.getInfo() };
+ }
+
+ @Override
+ public String[] getInfoData() {
+ return new String[] {
+ StatCollector.translateToLocal("tooltip.tile.waterpump.0.name") + " "
+ + GTUtility.formatNumbers(ConfigHandler.mbWaterperSec)
+ + String.format(
+ StatCollector.translateToLocal("tooltip.tile.waterpump.1.name"),
+ ConfigHandler.pollutionHeatedWaterPumpSecond),
+ StatCollector.translateToLocal("tooltip.tile.waterpump.2.name") };
+ }
+
+ @Override
+ public void registerBlockIcons(IIconRegister par1IconRegister) {
+ ITileHasDifferentTextureSides.texture[ForgeDirection.UP.ordinal()] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpTop");
+ ITileHasDifferentTextureSides.texture[ForgeDirection.DOWN.ordinal()] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpDown");
+ for (int i = 2; i < 7; i++) {
+ ITileHasDifferentTextureSides.texture[i] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpSide");
+ }
+ }
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 166);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.bindPlayerInventory(buildContext.getPlayer());
+ final IItemHandlerModifiable invWrapper = new InvWrapper(this);
+
+ builder.widget(
+ new SlotWidget(invWrapper, 0).setFilter(stack -> TileEntityFurnace.getItemBurnTime(stack) > 0)
+ .setPos(55, 52))
+ .widget(
+ SlotWidget.phantom(invWrapper, 1)
+ .disableInteraction()
+ .setPos(85, 32))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) this.fuel / this.maxfuel)
+ .setTexture(BWUITextures.PROGRESSBAR_FUEL, 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(56, 36)
+ .setSize(14, 14));
+
+ return builder.build();
+ }
+}
diff --git a/src/main/java/bartworks/common/tileentities/classic/TileEntityRotorBlock.java b/src/main/java/bartworks/common/tileentities/classic/TileEntityRotorBlock.java
new file mode 100644
index 0000000000..78c7f34710
--- /dev/null
+++ b/src/main/java/bartworks/common/tileentities/classic/TileEntityRotorBlock.java
@@ -0,0 +1,41 @@
+/*
+ * 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 bartworks.common.tileentities.classic;
+
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.entity.player.EntityPlayer;
+
+import bartworks.client.gui.GuiContainerRotorBlock;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator;
+import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator;
+
+public class TileEntityRotorBlock extends TileEntityWindKineticGenerator {
+
+ public int getGrindPower() {
+ return super.getKuOutput();
+ }
+
+ @Override
+ public int getKuOutput() {
+ return 0;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin) {
+ return new GuiContainerRotorBlock(new ContainerWindKineticGenerator(entityPlayer, this));
+ }
+}
diff --git a/src/main/java/bartworks/common/tileentities/debug/MTECreativeScanner.java b/src/main/java/bartworks/common/tileentities/debug/MTECreativeScanner.java
new file mode 100644
index 0000000000..a1ccd7d4e3
--- /dev/null
+++ b/src/main/java/bartworks/common/tileentities/debug/MTECreativeScanner.java
@@ -0,0 +1,70 @@
+/*
+ * 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 bartworks.common.tileentities.debug;
+
+import net.minecraft.util.StatCollector;
+
+import org.apache.commons.lang3.ArrayUtils;
+
+import bartworks.util.BWTooltipReference;
+import gregtech.api.enums.MachineType;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.common.tileentities.machines.basic.MTEScanner;
+
+public class MTECreativeScanner extends MTEScanner {
+
+ public MTECreativeScanner(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier);
+ }
+
+ public MTECreativeScanner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new MTECreativeScanner(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return ArrayUtils.addAll(
+ MachineType.SCANNER.tooltipDescription(),
+ StatCollector.translateToLocal("gt.blockmachines.creativeScanner.desc.1"),
+ BWTooltipReference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get());
+ }
+
+ @Override
+ public long maxEUStore() {
+ return 0;
+ }
+
+ @Override
+ protected boolean hasEnoughEnergyToCheckRecipe() {
+ return true;
+ }
+
+ @Override
+ protected boolean drainEnergyForProcess(long aEUt) {
+ return true;
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ this.mProgresstime = this.mMaxProgresstime;
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+}
diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java
new file mode 100644
index 0000000000..b982c0d886
--- /dev/null
+++ b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java
@@ -0,0 +1,834 @@
+/*
+ * 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 bartworks.common.tileentities.multis;
+
+import static bartworks.util.BWTooltipReference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static bartworks.util.BWUtil.ofGlassTiered;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW;
+import static gregtech.api.util.GTStructureUtility.ofHatchAdder;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.jetbrains.annotations.NotNull;
+
+import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import bartworks.API.SideReference;
+import bartworks.API.recipe.BartWorksRecipeMaps;
+import bartworks.MainMod;
+import bartworks.common.configs.ConfigHandler;
+import bartworks.common.items.ItemLabParts;
+import bartworks.common.loaders.FluidLoader;
+import bartworks.common.net.RendererPacket;
+import bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch;
+import bartworks.util.BWUtil;
+import bartworks.util.BioCulture;
+import bartworks.util.Coords;
+import bartworks.util.MathUtils;
+import bartworks.util.ResultWrongSievert;
+import gregtech.api.GregTechAPI;
+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.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.MTEHatchInput;
+import gregtech.api.metatileentity.implementations.MTEHatchOutput;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.recipe.check.CheckRecipeResultRegistry;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GTRecipe;
+import gregtech.api.util.GTUtility;
+import gregtech.api.util.MultiblockTooltipBuilder;
+import gregtech.api.util.ParallelHelper;
+
+public class MTEBioVat extends MTEEnhancedMultiBlockBase<MTEBioVat> {
+
+ public static final HashMap<Coords, Integer> staticColorMap = new HashMap<>();
+
+ private static final byte TIMERDIVIDER = 20;
+
+ private final HashSet<EntityPlayerMP> playerMPHashSet = new HashSet<>();
+ private final ArrayList<GT_MetaTileEntity_RadioHatch> mRadHatches = new ArrayList<>();
+ private int height = 1;
+ private Fluid mFluid = FluidRegistry.LAVA;
+ private BioCulture mCulture;
+ private ItemStack mStack;
+ private boolean needsVisualUpdate = true;
+ private byte mGlassTier;
+ private int mSievert;
+ private int mNeededSievert;
+ private int mCasing = 0;
+ private int mExpectedMultiplier = 0;
+ private int mTimes = 0;
+ private boolean isVisibleFluid = false;
+
+ public MTEBioVat(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public MTEBioVat(String aName) {
+ super(aName);
+ }
+
+ private static final int CASING_INDEX = 49;
+ private static final String STRUCTURE_PIECE_MAIN = "main";
+ private static final IStructureDefinition<MTEBioVat> STRUCTURE_DEFINITION = StructureDefinition.<MTEBioVat>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccccc", "ccccc", "ccccc", "ccccc", "ccccc" },
+ { "ggggg", "gaaag", "gaaag", "gaaag", "ggggg" }, { "ggggg", "gaaag", "gaaag", "gaaag", "ggggg" },
+ { "cc~cc", "ccccc", "ccccc", "ccccc", "ccccc" }, }))
+ .addElement(
+ 'c',
+ ofChain(
+ ofHatchAdder(MTEBioVat::addMaintenanceToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(MTEBioVat::addOutputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(MTEBioVat::addInputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(MTEBioVat::addRadiationInputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(MTEBioVat::addEnergyInputToMachineList, CASING_INDEX, 1),
+ onElementPass(e -> e.mCasing++, ofBlock(GregTechAPI.sBlockCasings4, 1))))
+ .addElement('a', ofChain(isAir(), ofBlockAnyMeta(FluidLoader.bioFluidBlock)))
+ .addElement(
+ 'g',
+ ofGlassTiered((byte) 1, (byte) 127, (byte) 0, (te, v) -> te.mGlassTier = v, te -> te.mGlassTier, 1))
+ .build();
+
+ @Override
+ public IStructureDefinition<MTEBioVat> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @Override
+ protected MultiblockTooltipBuilder createTooltip() {
+ MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
+ tt.addMachineType("Bacterial Vat")
+