aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDianeXD <64360468+DianeXD@users.noreply.github.com>2022-05-10 01:01:06 +0800
committerGitHub <noreply@github.com>2022-05-09 19:01:06 +0200
commit4b237c95ac70f814d475c1d00e9aecf8685ce1ad (patch)
treed4c38a9bd1d29b18d2ce073491e1c46e8b78dc49 /src/main/java
parent585d881d108d995066edb3c2e77a62dc3b6578fc (diff)
downloadGT5-Unofficial-4b237c95ac70f814d475c1d00e9aecf8685ce1ad.tar.gz
GT5-Unofficial-4b237c95ac70f814d475c1d00e9aecf8685ce1ad.tar.bz2
GT5-Unofficial-4b237c95ac70f814d475c1d00e9aecf8685ce1ad.zip
Add Large Essentia Smeltery (#38)
* Add Large Essentia Smeltery * Add info data * Add Essentia Output Hatch (ME) * fix node power * Bug fix * Solve the problems mentioned * Undo wrong changes
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/goodgenerator/blocks/regularBlock/TEBlock.java33
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java179
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java172
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/LargeEssentiaSmeltery.java479
-rw-r--r--src/main/java/goodgenerator/crossmod/LoadedList.java8
-rw-r--r--src/main/java/goodgenerator/crossmod/thaumcraft/Research.java128
-rw-r--r--src/main/java/goodgenerator/items/MyItemBlocks.java8
-rw-r--r--src/main/java/goodgenerator/loader/Loaders.java13
-rw-r--r--src/main/java/goodgenerator/util/ItemRefer.java9
9 files changed, 1015 insertions, 14 deletions
diff --git a/src/main/java/goodgenerator/blocks/regularBlock/TEBlock.java b/src/main/java/goodgenerator/blocks/regularBlock/TEBlock.java
index b33dbffdec..0d4352e4f9 100644
--- a/src/main/java/goodgenerator/blocks/regularBlock/TEBlock.java
+++ b/src/main/java/goodgenerator/blocks/regularBlock/TEBlock.java
@@ -1,6 +1,8 @@
package goodgenerator.blocks.regularBlock;
import goodgenerator.blocks.tileEntity.EssentiaHatch;
+import goodgenerator.blocks.tileEntity.EssentiaOutputHatch;
+import goodgenerator.blocks.tileEntity.EssentiaOutputHatch_ME;
import goodgenerator.main.GoodGenerator;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -138,9 +140,16 @@ public class TEBlock extends BlockContainer {
@Override
public TileEntity createTileEntity(World world, int meta) {
- if (index == 1)
- return new EssentiaHatch();
- return null;
+ switch (index) {
+ case 1:
+ return new EssentiaHatch();
+ case 2:
+ return new EssentiaOutputHatch();
+ case 3:
+ return new EssentiaOutputHatch_ME();
+ default:
+ return null;
+ }
}
@Override
@@ -159,17 +168,23 @@ public class TEBlock extends BlockContainer {
((EssentiaHatch) tile).setLockedAspect(tLocked);
GT_Utility.sendChatToPlayer(player, String.format(StatCollector.translateToLocal("essentiahatch.chat.0"), tLocked.getLocalizedDescription()));
}
- }
- else {
+ } else {
((EssentiaHatch) tile).setLockedAspect(null);
GT_Utility.sendChatToPlayer(player, StatCollector.translateToLocal("essentiahatch.chat.1"));
}
world.markBlockForUpdate(x, y, z);
return true;
- }
- else return false;
- }
- else return false;
+ } else return false;
+ } else if (index == 2) {
+ if (tile instanceof EssentiaOutputHatch) {
+ ItemStack tItemStack = player.getHeldItem();
+ if (tItemStack == null) {
+ ((EssentiaOutputHatch) tile).clear();
+ GT_Utility.sendChatToPlayer(player, StatCollector.translateToLocal("essentiaoutputhatch.chat.0"));
+ }
+ return true;
+ } else return false;
+ } else return false;
}
}
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java
new file mode 100644
index 0000000000..77d8004446
--- /dev/null
+++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java
@@ -0,0 +1,179 @@
+package goodgenerator.blocks.tileEntity;
+
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraftforge.common.util.ForgeDirection;
+import thaumcraft.api.TileThaumcraft;
+import thaumcraft.api.aspects.Aspect;
+import thaumcraft.api.aspects.AspectList;
+import thaumcraft.api.aspects.IAspectContainer;
+import thaumcraft.api.aspects.IEssentiaTransport;
+
+import java.util.Map;
+
+public class EssentiaOutputHatch extends TileThaumcraft implements IAspectContainer, IEssentiaTransport {
+
+ public static final int CAPACITY = 256;
+ protected AspectList mAspects = new AspectList();
+
+ public void clear() {
+ this.mAspects.aspects.clear();
+ }
+
+ @Override
+ public void markDirty() {
+ super.markDirty();
+ if (this.worldObj.isRemote) return;
+ this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound nbttagcompound) {
+ super.readFromNBT(nbttagcompound);
+ this.mAspects.aspects.clear();
+ NBTTagList tlist = nbttagcompound.getTagList("Aspects", 69);
+ for (int j = 0; j < tlist.tagCount(); ++j) {
+ NBTTagCompound rs = tlist.getCompoundTagAt(j);
+ if (rs.hasKey("key")) mAspects.add(Aspect.getAspect(rs.getString("key")), rs.getInteger("amount"));
+ }
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound nbttagcompound) {
+ super.writeToNBT(nbttagcompound);
+ Aspect[] aspectA = this.mAspects.getAspects();
+ NBTTagList nbtTagList = new NBTTagList();
+ for (Aspect aspect : aspectA) {
+ if (aspect != null) {
+ NBTTagCompound f = new NBTTagCompound();
+ f.setString("key", aspect.getTag());
+ f.setInteger("amount", this.mAspects.getAmount(aspect));
+ nbtTagList.appendTag(f);
+ }
+ }
+ nbttagcompound.setTag("Aspects", nbtTagList);
+ }
+
+ private int remainingCapacity() {
+ return CAPACITY - this.getEssentiaAmount(null);
+ }
+
+ @Override
+ public AspectList getAspects() {
+ return this.mAspects;
+ }
+
+ @Override
+ public void setAspects(AspectList aspectList) {
+ for (Map.Entry<Aspect, Integer> entry : aspectList.aspects.entrySet()) {
+ this.addEssentia(entry.getKey(), entry.getValue(), null);
+ }
+ }
+
+ @Override
+ public boolean doesContainerAccept(Aspect var1) {
+ return true;
+ }
+
+ @Override
+ public int addToContainer(Aspect aspect, int amount) {
+ int remaining = 0;
+ if (amount > this.remainingCapacity()) {
+ remaining = amount - this.remainingCapacity();
+ this.mAspects.add(aspect, this.remainingCapacity());
+ } else this.mAspects.add(aspect, amount);
+ this.markDirty();
+ return remaining;
+ }
+
+ @Override
+ public boolean takeFromContainer(Aspect aspect, int amount) {
+ if (this.mAspects != null && this.mAspects.getAmount(aspect) >= amount) {
+ this.mAspects.remove(aspect, amount);
+ this.markDirty();
+ return true;
+ } else return false;
+ }
+
+ @Override
+ public boolean takeFromContainer(AspectList aspects) {
+ return true;
+ }
+
+ @Override
+ public boolean doesContainerContainAmount(Aspect aspect, int amount) {
+ return this.mAspects.getAmount(aspect) >= amount;
+ }
+
+ @Override
+ public boolean doesContainerContain(AspectList aspectList) {
+ for (Map.Entry<Aspect, Integer> entry : aspectList.aspects.entrySet()) {
+ if (this.mAspects.getAmount(entry.getKey()) < entry.getValue()) return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int containerContains(Aspect aspect) {
+ return this.mAspects.getAmount(aspect);
+ }
+
+ @Override
+ public boolean isConnectable(ForgeDirection var1) {
+ return true;
+ }
+
+ @Override
+ public boolean canInputFrom(ForgeDirection var1) {
+ return false;
+ }
+
+ @Override
+ public boolean canOutputTo(ForgeDirection var1) {
+ return true;
+ }
+
+ @Override
+ public void setSuction(Aspect var1, int var2) {
+ }
+
+ @Override
+ public Aspect getSuctionType(ForgeDirection var1) {
+ return null;
+ }
+
+ @Override
+ public int getSuctionAmount(ForgeDirection var1) {
+ return 0;
+ }
+
+ @Override
+ public int takeEssentia(Aspect aspect, int amount, ForgeDirection var3) {
+ return this.takeFromContainer(aspect, amount) ? amount : 0;
+ }
+
+ @Override
+ public int addEssentia(Aspect aspect, int amount, ForgeDirection direction) {
+ return amount - addToContainer(aspect, amount);
+ }
+
+ @Override
+ public Aspect getEssentiaType(ForgeDirection var1) {
+ return this.mAspects.size() > 0 ? this.mAspects.getAspects()[0] : null;
+ }
+
+ @Override
+ public int getEssentiaAmount(ForgeDirection var1) {
+ return this.mAspects.visSize();
+ }
+
+ @Override
+ public int getMinimumSuction() {
+ return 0;
+ }
+
+ @Override
+ public boolean renderExtendedTube() {
+ return true;
+ }
+}
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java
new file mode 100644
index 0000000000..8f2c4c920f
--- /dev/null
+++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java
@@ -0,0 +1,172 @@
+package goodgenerator.blocks.tileEntity;
+
+import appeng.api.config.Actionable;
+import appeng.api.networking.GridFlags;
+import appeng.api.networking.IGrid;
+import appeng.api.networking.IGridNode;
+import appeng.api.networking.security.IActionHost;
+import appeng.api.networking.security.MachineSource;
+import appeng.api.util.AECableType;
+import appeng.api.util.DimensionalCoord;
+import appeng.me.helpers.AENetworkProxy;
+import appeng.me.helpers.IGridProxyable;
+import appeng.tile.TileEvent;
+import appeng.tile.events.TileEventType;
+import cpw.mods.fml.common.Optional;
+import goodgenerator.util.ItemRefer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import thaumcraft.api.aspects.Aspect;
+import thaumcraft.api.aspects.AspectList;
+import thaumicenergistics.api.grid.IEssentiaGrid;
+import thaumicenergistics.api.grid.IMEEssentiaMonitor;
+
+import java.util.Map;
+
+
+@Optional.InterfaceList(value = {
+ @Optional.Interface(iface = "appeng.api.networking.security.IActionHost", modid = "appliedenergistics2", striprefs = true),
+ @Optional.Interface(iface = "appeng.me.helpers.IGridProxyable", modid = "appliedenergistics2", striprefs = true),})
+public class EssentiaOutputHatch_ME extends EssentiaOutputHatch implements IActionHost, IGridProxyable {
+
+ private AENetworkProxy gridProxy = null;
+ private IMEEssentiaMonitor monitor = null;
+ private MachineSource asMachineSource = new MachineSource(this);
+
+ @Override
+ public void updateEntity() {
+ getProxy();
+ super.updateEntity();
+ }
+
+ @Override
+ public void invalidate() {
+ super.invalidate();
+ this.invalidateAE();
+ }
+
+ @Override
+ public void onChunkUnload() {
+ super.onChunkUnload();
+ this.onChunkUnloadAE();
+ }
+
+ @TileEvent(TileEventType.WORLD_NBT_READ)
+ @Optional.Method(modid = "appliedenergistics2")
+ public void readFromNBT_AENetwork(final NBTTagCompound data) {
+ AENetworkProxy gp = getProxy();
+ if (gp != null)
+ getProxy().readFromNBT(data);
+ }
+
+ @TileEvent(TileEventType.WORLD_NBT_WRITE)
+ @Optional.Method(modid = "appliedenergistics2")
+ public void writeToNBT_AENetwork(final NBTTagCompound data) {
+ AENetworkProxy gp = getProxy();
+ if (gp != null)
+ gp.writeToNBT(data);
+ }
+
+ @Optional.Method(modid = "appliedenergistics2")
+ void onChunkUnloadAE() {
+ AENetworkProxy gp = getProxy();
+ if (gp != null)
+ gp.onChunkUnload();
+ }
+
+ @Optional.Method(modid = "appliedenergistics2")
+ void invalidateAE() {
+ AENetworkProxy gp = getProxy();
+ if (gp != null)
+ gp.invalidate();
+ }
+
+ @Optional.Method(modid = "appliedenergistics2")
+ public IGridNode getGridNode(ForgeDirection forgeDirection) {
+ AENetworkProxy gp = getProxy();
+ return gp != null ? gp.getNode() : null;
+ }
+
+ @Override
+ @Optional.Method(modid = "appliedenergistics2")
+ public void gridChanged() {
+ }
+
+ @Override
+ @Optional.Method(modid = "appliedenergistics2")
+ public AECableType getCableConnectionType(ForgeDirection forgeDirection) {
+ return AECableType.SMART;
+ }
+
+ @Override
+ @Optional.Method(modid = "appliedenergistics2")
+ public void securityBreak() {
+ }
+
+ @Override
+ @Optional.Method(modid = "appliedenergistics2")
+ public AENetworkProxy getProxy() {
+ if (gridProxy == null) {
+ gridProxy = new AENetworkProxy(this, "proxy", ItemRefer.Essentia_Output_Hatch_ME.get(1), true);
+ gridProxy.onReady();
+ gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
+ }
+ return this.gridProxy;
+ }
+
+ @Override
+ @Optional.Method(modid = "appliedenergistics2")
+ public DimensionalCoord getLocation() {
+ return new DimensionalCoord(this.worldObj, this.xCoord, this.yCoord, this.zCoord);
+ }
+
+ @Override
+ @Optional.Method(modid = "appliedenergistics2")
+ public IGridNode getActionableNode() {
+ AENetworkProxy gp = getProxy();
+ return gp != null ? gp.getNode() : null;
+ }
+
+ @Override
+ public boolean takeFromContainer(AspectList aspects) {
+ return false;
+ }
+
+ @Override
+ public boolean takeFromContainer(Aspect aspect, int amount) {
+ return false;
+ }
+
+ @Override
+ public int addEssentia(Aspect aspect, int amount, ForgeDirection side) {
+ return this.addEssentia(aspect, amount, side, Actionable.MODULATE);
+ }
+
+ public int addEssentia(Aspect aspect, int amount, ForgeDirection side, Actionable mode) {
+ long rejectedAmount = amount;
+ if (this.getEssentiaMonitor()) {
+ rejectedAmount = this.monitor.injectEssentia(aspect, amount, mode, this.getMachineSource(), true);
+ }
+
+ long acceptedAmount = (long) amount - rejectedAmount;
+ return (int) acceptedAmount;
+ }
+
+ protected boolean getEssentiaMonitor() {
+ IMEEssentiaMonitor essentiaMonitor = null;
+ IGrid grid = null;
+ IGridNode node = this.getProxy().getNode();
+
+ if (node != null) {
+ grid = node.getGrid();
+ if (grid != null) essentiaMonitor = grid.getCache(IEssentiaGrid.class);
+ }
+ this.monitor = essentiaMonitor;
+ return (this.monitor != null);
+ }
+
+ public MachineSource getMachineSource() {
+ return this.asMachineSource;
+ }
+
+}
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/LargeEssentiaSmeltery.java b/src/main/java/goodgenerator/blocks/tileEntity/LargeEssentiaSmeltery.java
new file mode 100644
index 0000000000..b3b89e1d4a
--- /dev/null
+++ b/src/main/java/goodgenerator/blocks/tileEntity/LargeEssentiaSmeltery.java
@@ -0,0 +1,479 @@
+package goodgenerator.blocks.tileEntity;
+
+import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import goodgenerator.blocks.tileEntity.base.GT_MetaTileEntity_TooltipMultiBlockBase_EM;
+import goodgenerator.crossmod.LoadedList;
+import goodgenerator.loader.Loaders;
+import goodgenerator.util.DescTextLocalization;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.*;
+import gregtech.api.objects.XSTR;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockAir;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import thaumcraft.api.aspects.Aspect;
+import thaumcraft.api.aspects.AspectList;
+import thaumcraft.api.visnet.VisNetHandler;
+import thaumcraft.common.config.ConfigBlocks;
+import thaumcraft.common.lib.crafting.ThaumcraftCraftingManager;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+
+public class LargeEssentiaSmeltery extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable {
+
+ private static final IIconContainer textureFontOn = new Textures.BlockIcons.CustomIcon("icons/LargeEssentiaSmeltery_On");
+ private static final IIconContainer textureFontOn_Glow = new Textures.BlockIcons.CustomIcon("icons/LargeEssentiaSmeltery_On_GLOW");
+ private static final IIconContainer textureFontOff = new Textures.BlockIcons.CustomIcon("icons/LargeEssentiaSmeltery_Off");
+ private static final IIconContainer textureFontOff_Glow = new Textures.BlockIcons.CustomIcon("icons/LargeEssentiaSmeltery_Off_GLOW");
+ private static final String STRUCTURE_PIECE_FIRST = "first";
+ private static final String STRUCTURE_PIECE_LATER = "later";
+ private static final String STRUCTURE_PIECE_LAST = "last";
+ private static final int CASING_INDEX = 1536;
+ private static final int MAX_STRUCTURE_LENGTH = 8;
+ private static final int DEFAULT_STRUCTURE_LENGTH = 3;
+ private static final int MAX_CONFIGURABLE_LENGTH = MAX_STRUCTURE_LENGTH - DEFAULT_STRUCTURE_LENGTH;
+
+ private static final int RECIPE_DURATION = 32;
+ private static final int RECIPE_EUT = 480;
+ private static final float NODE_COST_MULTIPLIER = 1.15f;
+
+ public AspectList mOutputAspects = new AspectList();
+ protected int mCasing = 0;
+ protected double mParallel = 0;
+ protected int nodePower = 0;
+ protected int nodePurificationEfficiency = 0;
+ protected int nodeIncrease = 0;
+
+ private IStructureDefinition<LargeEssentiaSmeltery> multiDefinition = null;
+ private ArrayList<EssentiaOutputHatch> mEssentiaOutputHatches = new ArrayList<>();
+ private int pTier = 0;
+ private XSTR xstr = new XSTR();
+
+ public LargeEssentiaSmeltery(String name) {
+ super(name);
+ }
+
+ public LargeEssentiaSmeltery(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean hintsOnly) {
+ structureBuild_EM(STRUCTURE_PIECE_FIRST, 2, 2, 0, itemStack, hintsOnly);
+ //default
+ structureBuild_EM(STRUCTURE_PIECE_LATER, 2, 2, -1, itemStack, hintsOnly);
+ structureBuild_EM(STRUCTURE_PIECE_LATER, 2, 2, -2, itemStack, hintsOnly);
+ int len = itemStack.stackSize;
+ if (len > MAX_CONFIGURABLE_LENGTH) len = MAX_CONFIGURABLE_LENGTH;
+ structureBuild_EM(STRUCTURE_PIECE_LAST, 2, 2, -len - 3, itemStack, hintsOnly);
+ while (len > 0) {
+ structureBuild_EM(STRUCTURE_PIECE_LATER, 2, 2, -len - 2, itemStack, hintsOnly);
+ len--;
+ }
+ }
+
+ @Override
+ protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
+ this.mCasing = 0;
+ this.mParallel = 0;
+ this.pTier = 0;
+ this.nodePower = 0;
+ this.nodePurificationEfficiency = 0;
+ this.nodeIncrease = 0;
+ this.mEssentiaOutputHatches.clear();
+
+ if (!structureCheck_EM(STRUCTURE_PIECE_FIRST, 2, 2, 0)) return false;
+ if (!structureCheck_EM(STRUCTURE_PIECE_LATER, 2, 2, -1)) return false;
+ if (!structureCheck_EM(STRUCTURE_PIECE_LATER, 2, 2, -2)) return false;
+ int len = 2;
+ while (structureCheck_EM(STRUCTURE_PIECE_LATER, 2, 2, -len - 1)) len++;
+ if (len > MAX_STRUCTURE_LENGTH - 1 || len < DEFAULT_STRUCTURE_LENGTH) return false;
+ if (!structureCheck_EM(STRUCTURE_PIECE_LAST, 2, 2, -len - 1)) return false;
+ if (this.mCasing >= 24 &&
+ this.mMaintenanceHatches.size() == 1 &&
+ this.mInputBusses.size() >= 1 &&
+ this.mEssentiaOutputHatches.size() >= 1) {
+ this.mParallel = Math.floor(this.mParallel += 1 << this.pTier);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ if (this.multiDefinition == null) {
+ this.multiDefinition = StructureDefinition
+ .<LargeEssentiaSmeltery>builder()
+ .addShape("first", transpose(new String[][]{{" A "}, {" AAA "}, {"AA~AA"}, {" AAA "}, {" A "}}))
+ .addShape("later", transpose(new String[][]{{" ABA "}, {"AECEA"}, {"D---D"}, {"AEFEA"}, {" AAA "}}))
+ .addShape("last", transpose(new String[][]{{" A "}, {" AAA "}, {"AAAAA"}, {" AAA "}, {" A "}}))
+ .addElement('C', ofBlock(Loaders.essentiaFilterCasing, 0))
+ .addElement('D', ofBlock(ConfigBlocks.blockCosmeticOpaque, 2))
+ .addElement('F', LoadedList.THAUMIC_BASES ? ofBlock(Block.getBlockFromName("thaumicbases:advAlchFurnace"), 0) : ofBlock(ConfigBlocks.blockStoneDevice, 0))
+ .addElement('E', ofChain(
+ onElementPass(x -> x.onEssentiaCellFound(0),
+ ofBlock(Loaders.essentiaCell, 0)),
+ onElementPass(x -> x.onEssentiaCellFound(1),
+ ofBlock(Loaders.essentiaCell, 1)),
+ onElementPass(x -> x.onEssentiaCellFound(2),
+ ofBlock(Loaders.essentiaCell, 2)),
+ onElementPass(x -> x.onEssentiaCellFound(3),
+ ofBlock(Loaders.essentiaCell, 3))))
+ .addElement('A', ofChain(
+ ofHatchAdder(LargeEssentiaSmeltery::addMaintenanceToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(LargeEssentiaSmeltery::addInputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(LargeEssentiaSmeltery::addEnergyHatchToMachineList, CASING_INDEX, 1),
+ ofTileAdder(LargeEssentiaSmeltery::addEssentiaOutputHatchToMachineList, Loaders.magicCasing, 0),
+ onElementPass(LargeEssentiaSmeltery::onCasingFound, ofBlock(Loaders.magicCasing, 0))))
+ .addElement('B', ofHatchAdder(LargeEssentiaSmeltery::addMufflerToMachineList, CASING_INDEX, 2))
+ .build();
+ }
+ return this.multiDefinition;
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Essentia Smeltery")
+ .addInfo("Controller block for the Large Essentia Smeltery")
+ .addInfo("Necessary evil.")
+ .addInfo("Advanced Essentia smelting technology.")
+ .addInfo("Max parallel dictated by structure size and Essentia Diffusion Cell tier")
+ .addInfo("Energy Hatch tier: HV+")
+ .addInfo("You can find more information about this machine in the Thaumonomicon.")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addInfo("The structure is too complex!")
+ .addInfo(BLUE_PRINT_INFO)
+ .addSeparator()
+ .addController("Front center")
+ .addCasingInfo("Magic Casing", 24)
+ .addMaintenanceHatch("Hint block with dot 1")
+ .addInputBus("Hint block with dot 1")
+ .addInputHatch("Hint block with dot 1")
+ .addEnergyHatch("Hint block with dot 1")
+ .addOtherStructurePart("Essentia Output Hatch", "Hint block with dot 1")
+ .addMufflerHatch("Hint block with dot 2")
+ .toolTipFinisher("Good Generator");
+ return tt;
+ }
+
+ @Override
+ public String[] getStructureDescription(ItemStack itemStack) {
+ return DescTextLocalization.addText("LargeEssentiaSmeltery.hint", 8);
+ }
+
+ @Override
+ public String[] getInfoData() {
+ String[] info = super.getInfoData();
+ info[8] = "Node Power: " + EnumChatFormatting.RED + this.nodePower + EnumChatFormatting.RESET + " Purification Efficiency: " + EnumChatFormatting.AQUA + this.nodePurificationEfficiency + "%" + EnumChatFormatting.RESET + " Speed Up: " + EnumChatFormatting.GRAY + this.nodeIncrease + "%" + EnumChatFormatting.RESET;
+ return info;
+ }
+
+ @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(CASING_INDEX),
+ TextureFactory.of(textureFontOn),
+ TextureFactory.builder().addIcon(textureFontOn_Glow).glow().build()
+ };
+ else return new ITexture[]{
+ Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.of(textureFontOff),
+ TextureFactory.builder().addIcon(textureFontOff_Glow).glow().build()
+ };
+ }
+ return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ }
+
+ protected void onCasingFound() {
+ this.mCasing++;
+ }
+
+ protected void onEssentiaCellFound(int tier) {
+ this.mParallel += (1 << tier) * 0.25f;
+ this.pTier = Math.max(this.pTier, tier);
+ }
+
+ private boolean addEnergyHatchToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ } else {
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
+ if (((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier < 3) return false;
+ ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) {
+ ((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return this.eEnergyMulti.add(((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity));
+ } else {
+ return false;
+ }
+ }
+ }
+
+ private boolean addEssentiaOutputHatchToMachineList(TileEntity aTileEntity) {
+ if (aTileEntity instanceof EssentiaOutputHatch) {
+ return this.mEssentiaOutputHatches.add((EssentiaOutputHatch) aTileEntity);
+ }
+ return false;
+ }
+
+ @Override
+ protected void runMachine(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (!this.isFullPower()) return;
+ super.runMachine(aBaseMetaTileEntity, aTick);
+ }
+
+ @Override
+ public boolean checkRecipe_EM(ItemStack aStack) {
+ if (!isFullPower()) return false;
+
+ ArrayList<ItemStack> tInputList = getStoredInputs();
+// ArrayList<FluidStack> tFluidList = getStoredFluids();
+
+ if (tInputList.size() == 0) return false;
+
+ int p = (int) this.mParallel;
+ for (int i = tInputList.size() - 1; i >= 0; i--) {
+ ItemStack itemStack = tInputList.get(i);
+ int stackSize = itemStack.stackSize;
+ int sur = p - stackSize;
+
+ if (sur > 0) {
+ p -= stackSize;
+ this.mOutputAspects.add(getEssentia(itemStack, stackSize));
+ if (!depleteInput(itemStack)) itemStack.stackSize = 0;
+ } else if (sur == 0) {
+ this.mOutputAspects.add(getEssentia(itemStack, stackSize));
+ if (!depleteInput(itemStack)) itemStack.stackSize = 0;
+ break;
+ } else {
+ this.mOutputAspects.add(getEssentia(itemStack, p));
+ itemStack.stackSize -= p;
+ break;
+ }
+ }
+
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+
+ final World WORLD = this.getBaseMetaTileEntity().getWorld();
+ int x = this.getBaseMetaTileEntity().getXCoord();
+ int y = this.getBaseMetaTileEntity().getYCoord();
+ int z = this.getBaseMetaTileEntity().getZCoord();
+
+ this.drainNodePower(WORLD, x, y, z);
+ this.nodePower -= expectedPower();
+
+ calculatePerfectOverclockedNessMulti(RECIPE_EUT, (int) Math.ceil(this.mOutputAspects.visSize() * RECIPE_DURATION * (1 - this.nodeIncrease * 0.005)), 1, Math.min(Integer.MAX_VALUE, getMaxInputEnergy_EM()));
+
+ this.updateSlots();
+ if (this.mEUt > 0) this.mEUt = -this.mEUt;
+ return true;
+ }
+
+ private AspectList getEssentia(ItemStack itemStack, int amount) {
+ AspectList aspectList = new AspectList();
+ AspectList aspects = ThaumcraftCraftingManager.getObjectTags(itemStack);
+ if (aspects != null && aspects.size() != 0 && aspects.getAspects()[0] != null) {
+ for (int i = 0; i < amount; i++) aspectList.add(aspects);
+ } else aspectList.add(Aspect.ENTROPY, amount);
+ return aspectList;
+ }
+
+ private void fillEssentiaOutputHatch() {
+ for (EssentiaOutputHatch outputHatch : this.mEssentiaOutputHatches) {
+ for (Map.Entry<Aspect, Integer> entry : this.mOutputAspects.aspects.entrySet()) {
+ Aspect aspect = entry.getKey();
+ int amount = entry.getValue();
+ this.mOutputAspects.remove(aspect, outputHatch.addEssentia(aspect, amount, null));
+ }
+ }
+ this.mOutputAspects.aspects.clear();
+ }
+
+ private int expectedPower() {
+ return (int) (Math.pow(this.getMaxEnergyInputTier_EM(), 2) * NODE_COST_MULTIPLIER);
+ }
+
+ private boolean isFullPower() {
+ return this.nodePower > expectedPower();
+ }
+
+ private void generateFluxGas(World world, int x, int y, int z) {
+ world.setBlock(x, y, z, ConfigBlocks.blockFluxGas, 8, 3);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setDouble("mParallel", this.mParallel);
+ aNBT.setDouble("nodePower", this.nodePower);
+ aNBT.setDouble("nodePurificationEfficiency", this.nodePurificationEfficiency);
+ aNBT.setDouble("nodeIncrease", this.nodeIncrease);
+
+ Aspect[] aspectA = this.mOutputAspects.getAspects();
+ NBTTagList nbtTagList = new NBTTagList();
+ for (Aspect aspect : aspectA) {
+ if (aspect != null) {
+ NBTTagCompound f = new NBTTagCompound();
+ f.setString("key", aspect.getTag());
+ f.setInteger("amount", this.mOutputAspects.getAmount(aspect));
+ nbtTagList.appendTag(f);
+ }
+ }
+ aNBT.setTag("Aspects", nbtTagList);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.mParallel = aNBT.getDouble("mParallel");
+ this.nodePower = aNBT.getInteger("nodePower");
+ this.nodePurificationEfficiency = aNBT.getInteger("nodePurificationEfficiency");
+ this.nodeIncrease = aNBT.getInteger("nodeIncrease");
+
+ this.mOutputAspects.aspects.clear();
+ NBTTagList tlist = aNBT.getTagList("Aspects", 69);
+ for (int j = 0; j < tlist.tagCount(); ++j) {
+ NBTTagCompound rs = tlist.getCompoundTagAt(j);
+ if (rs.hasKey("key"))
+ this.mOutputAspects.add(Aspect.getAspect(rs.getString("key")), rs.getInteger("amount"));
+ }
+ super.loadNBTData(aNBT);
+ }
+
+ @Override
+ protected void addClassicOutputs_EM() {
+ super.addClassicOutputs_EM();
+ fillEssentiaOutputHatch();
+ }
+
+ @Override
+ public void stopMachine() {
+ super.stopMachine();
+ this.mOutputAspects.aspects.clear();
+ }
+
+ private void drainNodePower(World world, int x, int y, int z) {
+ int power = this.expectedPower();
+ if (this.nodePower < power * 10) {
+ this.nodePower += VisNetHandler.drainVis(world, x, y, z, Aspect.WATER, power);
+ this.nodePower += VisNetHandler.drainVis(world, x, y, z, Aspect.FIRE, power);
+ }
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (aTick % 5 == 0 && this.mMachine) {
+ final World WORLD = this.getBaseMetaTileEntity().getWorld();
+ int x = this.getBaseMetaTileEntity().getXCoord();
+ int y = this.getBaseMetaTileEntity().getYCoord();
+ int z = this.getBaseMetaTileEntity().getZCoord();
+
+ this.drainNodePower(WORLD, x, y, z);
+
+ this.nodePurificationEfficiency = Math.max(0, this.nodePurificationEfficiency - 1);
+ if (this.nodePurificationEfficiency < 100) {
+ this.nodePurificationEfficiency = (int) Math.min(100, this.nodePurificationEfficiency + Math.ceil(VisNetHandler.drainVis(WORLD, x, y, z, Aspect.ORDER, 100) * 0.05));
+ }
+
+ this.nodeIncrease = Math.min(100, VisNetHandler.drainVis(WORLD, x, y, z, Aspect.ENTROPY, 125));
+ }
+ }
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+ this.nodePurificationEfficiency = Math.max(0, this.nodePurificationEfficiency - 5);
+ if (xstr.nextInt(20) == 0) {
+ if (xstr.nextInt(100) < Math.max(100 - this.nodePurificationEfficiency, 0)) {
+ final World WORLD = this.getBaseMetaTileEntity().getWorld();
+ GT_MetaTileEntity_Hatch_Muffler mufflerHatch = this.mMufflerHatches.get(xstr.next(this.mMufflerHatches.size()));
+ int x = mufflerHatch.getBaseMetaTileEntity().getXCoord();
+ int y = mufflerHatch.getBaseMetaTileEntity().getYCoord();
+ int z = mufflerHatch.getBaseMetaTileEntity().getZCoord();
+
+ ForgeDirection facing = ForgeDirection.getOrientation(mufflerHatch.getBaseMetaTileEntity().getFrontFacing());
+ switch (facing) {
+ case SOUTH:
+ z += 1;
+ break;
+ case NORTH:
+ z -= 1;
+ break;
+ case WEST:
+ x -= 1;
+ break;
+ case EAST:
+ x += 1;
+ break;
+ default:
+ y += 1;
+ }
+ if (WORLD.getBlock(x, y, z) instanceof BlockAir) generateFluxGas(WORLD, x, y, z);
+ }
+ }
+ return super.onRunningTick(aStack);
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return 22 * (100 - this.nodePurificationEfficiency);
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new LargeEssentiaSmeltery(this.mName);
+ }
+
+ @Override
+ protected void maintenance_EM() {
+ super.maintenance_EM();
+ }
+
+}
diff --git a/src/main/java/goodgenerator/crossmod/LoadedList.java b/src/main/java/goodgenerator/crossmod/LoadedList.java
index 372b3004ab..f5a30509f8 100644
--- a/src/main/java/goodgenerator/crossmod/LoadedList.java
+++ b/src/main/java/goodgenerator/crossmod/LoadedList.java
@@ -8,12 +8,20 @@ public class LoadedList {
public static boolean GTNH_CORE;
public static boolean BOTDUSTRIES;
public static boolean EXTRA_CELLS;
+ public static boolean THAUMIC_BASES;
+ public static boolean THAUMIC_TINKERER;
+ public static boolean AUTOMAGY;
+ public static boolean WITCHING_GADGETS;
public static void init() {
GTPP = Loader.isModLoaded("miscutils");
GTNH_CORE = Loader.isModLoaded("dreamcraft");
BOTDUSTRIES = Loader.isModLoaded("botdustries");
EXTRA_CELLS = Loader.isModLoaded("extracells");
+ THAUMIC_BASES = Loader.isModLoaded("thaumicbases");
+ THAUMIC_TINKERER = Loader.isModLoaded("ThaumicTinkerer");
+ AUTOMAGY = Loader.isModLoaded("Automagy");
+ WITCHING_GADGETS = Loader.isModLoaded("WitchingGadgets");
}
}
diff --git a/src/main/java/goodgenerator/crossmod/thaumcraft/Research.java b/src/main/java/goodgenerator/crossmod/thaumcraft/Research.java
index 72b6918521..274ea5643a 100644
--- a/src/main/java/goodgenerator/crossmod/thaumcraft/Research.java
+++ b/src/main/java/goodgenerator/crossmod/thaumcraft/Research.java
@@ -608,5 +608,133 @@ public class Research{
"research.ESSENTIA_UPGRADE_ELECTRIC.page.1"
}
);
+
+ ItemStack nodeLinkDevice = LoadedList.THAUMIC_BASES ? GT_ModHandler.getModItem("thaumicbases", "nodeLinker", 1, 0) : new ItemStack(ConfigBlocks.blockStoneDevice, 1, 11);
+ ItemStack alchemicalFurnace = LoadedList.THAUMIC_BASES ? GT_ModHandler.getModItem("thaumicbases", "advAlchFurnace", 1, 0) : new ItemStack(ConfigBlocks.blockStoneDevice, 1, 0);
+ ItemStack nitor = LoadedList.THAUMIC_TINKERER ? GT_ModHandler.getModItem("ThaumicTinkerer", "brightNitor", 1, 0) : new ItemStack(ConfigItems.itemResource, 1, 1);
+ ItemStack alchemicalBoiler = LoadedList.AUTOMAGY ? GT_ModHandler.getModItem("Automagy", "blockBoiler", 1, 0) : new ItemStack(ConfigBlocks.blockStoneDevice, 1, 1);
+ ItemStack essentiaLocus = LoadedList.AUTOMAGY ? GT_ModHandler.getModItem("Automagy", "blockEssentiaLocus", 1, 0) : new ItemStack(ConfigBlocks.blockJar, 1, 1);
+ ItemStack thauminiteBlock = LoadedList.THAUMIC_BASES ? GT_ModHandler.getModItem("thaumicbases", "thauminiteBlock", 1, 0) : new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 4);
+ GregTech_API.sThaumcraftCompat.addResearch("ESSENTIA_SMELTERY",
+ "Large Essentia Smeltery",
+ "You need a bigger boat.",
+ new String[]{"INFUSION"},
+ "ARTIFICE",
+ ItemRefer.Large_Essentia_Smeltery.get(1),
+ 4, 0, -16, 3,
+ Arrays.asList(
+ new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 10)
+ ),
+ null,
+ new Object[]{
+ "research.ESSENTIA_SMELTERY.page.0",
+ GregTech_API.sThaumcraftCompat.addInfusionRecipe(
+ "ESSENTIA_SMELTERY",
+ ItemList.Casing_Firebox_TungstenSteel.get(1),
+ new ItemStack[]{
+ nodeLinkDevice,
+ nitor,
+ alchemicalFurnace,
+ essentiaLocus,
+ alchemicalBoiler,
+ new ItemStack(ConfigBlocks.blockCrystal, 1, 1),
+ new ItemStack(ConfigBlocks.blockMetalDevice, 1, 3),
+ ItemList.Electric_Piston_IV.get(1),
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.FierySteel, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L)
+ },
+ ItemRefer.Large_Essentia_Smeltery.get(1),
+ 16,
+ Arrays.asList(
+ new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256)
+ )
+ ),
+ "research.ESSENTIA_SMELTERY.page.1",
+ GregTech_API.sThaumcraftCompat.addInfusionRecipe(
+ "ESSENTIA_GENERATOR",
+ ItemList.Hatch_Output_HV.get(1),
+ new ItemStack[]{
+ new ItemStack(ConfigBlocks.blockJar, 1),
+ ItemRefer.Magic_Casing.get(1),
+ new ItemStack(ConfigBlocks.blockTube, 1),
+ ItemList.Electric_Pump_MV.get(1L)
+ },
+ ItemRefer.Essentia_Output_Hatch.get(1),
+ 6,
+ Arrays.asList(
+ new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 64),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 32),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 32)
+ )
+ ),
+ "research.ESSENTIA_SMELTERY.page.2",
+ addArcaneCraftingRecipe(
+ "ESSENTIA_SMELTERY",
+ ItemRefer.Essentia_Filter_Casing.get(1),
+ new AspectList().add(Aspect.AIR, 70).add(Aspect.EARTH, 70).add(Aspect.FIRE, 70).add(Aspect.WATER, 70).add(Aspect.ORDER, 70).add(Aspect.ENTROPY, 70),
+ "ABA", "CDC", "EFE",
+ 'A', new ItemStack(ConfigBlocks.blockTube, 1, 3),
+ 'B', new ItemStack(ConfigBlocks.blockStoneDevice, 1, 14),
+ 'C', GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Void, 1),
+ 'D', new ItemStack(GregTech_API.sBlockCasings3, 1, 11),
+ 'E', GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.NetherStar, 1),
+ 'F', thauminiteBlock
+ )
+ }
+ );
+
+ ItemStack essentiaPump = LoadedList.WITCHING_GADGETS ? GT_ModHandler.getModItem("WitchingGadgets", "WG_MetalDevice", 1, 0) : new ItemStack(ConfigBlocks.blockTube, 1, 4);
+ ItemStack inter = LoadedList.THAUMIC_TINKERER ? GT_ModHandler.getModItem("ThaumicTinkerer", "interface", 1, 0) : new ItemStack(ConfigItems.itemResource, 1, 15);
+ GregTech_API.sThaumcraftCompat.addResearch("ESSENTIA_OUTPUT_HATCH_ME",
+ "Essentia Output Hatch (ME)",
+ "It must exist.",
+ new String[]{"INFUSION"},
+ "ARTIFICE",
+ ItemRefer.Essentia_Output_Hatch_ME.get(1),
+ 3, 0, -15, 3,
+ Arrays.asList(
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 10),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 10)
+ ),
+ null,
+ new Object[]{
+ "research.ESSENTIA_OUTPUT_HATCH_ME.page.0",
+ GregTech_API.sThaumcraftCompat.addInfusionRecipe(
+ "ESSENTIA_OUTPUT_HATCH_ME",
+ ItemRefer.Essentia_Output_Hatch.get(1),
+ new ItemStack[]{
+ GT_ModHandler.getModItem("thaumicenergistics", "thaumicenergistics.block.essentia.provider", 1),
+ new ItemStack(ConfigBlocks.blockEssentiaReservoir,1,0),
+ essentiaPump,
+ inter,
+ },
+ ItemRefer.Essentia_Output_Hatch_ME.get(1),
+ 8,
+ Arrays.asList(
+ new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 256),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 256)
+ )
+ )
+ }
+ );
}
}
diff --git a/src/main/java/goodgenerator/items/MyItemBlocks.java b/src/main/java/goodgenerator/items/MyItemBlocks.java
index d1b4bbe4ec..abb55e7f1d 100644
--- a/src/main/java/goodgenerator/items/MyItemBlocks.java
+++ b/src/main/java/goodgenerator/items/MyItemBlocks.java
@@ -1,6 +1,7 @@
package goodgenerator.items;
import goodgenerator.blocks.regularBlock.TEBlock;
+import goodgenerator.blocks.tileEntity.EssentiaOutputHatch;
import goodgenerator.util.CharExchanger;
import goodgenerator.util.DescTextLocalization;
import cpw.mods.fml.relauncher.Side;
@@ -71,8 +72,11 @@ public class MyItemBlocks extends ItemBlock {
TEBlock tile = (TEBlock) Block.getBlockFromItem(p_77624_1_.getItem());
if (tile.getIndex() == 1)
p_77624_3_.addAll(Arrays.asList(DescTextLocalization.addText("EssentiaHatch.tooltip", 2)));
- }
- else p_77624_3_.add(mNoTileEntityToolTip);
+ if (tile.getIndex() == 2) {
+ p_77624_3_.add(StatCollector.translateToLocal("EssentiaOutputHatch.tooltip.0"));
+ p_77624_3_.add(StatCollector.translateToLocal("EssentiaOutputHatch.tooltip.1") + " " + EssentiaOutputHatch.CAPACITY);
+ }
+ } else p_77624_3_.add(mNoTileEntityToolTip);
if (Block.getBlockFromItem(p_77624_1_.getItem()).equals(yottaFluidTankCell)) {
StringBuilder cap = new StringBuilder();
diff --git a/src/main/java/goodgenerator/loader/Loaders.java b/src/main/java/goodgenerator/loader/Loaders.java
index f53598eb51..b6ac0d18f6 100644
--- a/src/main/java/goodgenerator/loader/Loaders.java
+++ b/src/main/java/goodgenerator/loader/Loaders.java
@@ -92,7 +92,10 @@ public class Loaders {
public static final Block pressureResistantWalls = new Casing("pressureResistantWalls", new String[]{GoodGenerator.MOD_ID+":pressureResistantWalls"});
public static final Block preciseUnitCasing = new Casing("preciseUnitCasing", new String[]{GoodGenerator.MOD_ID+":preciseUnitCasing/1", GoodGenerator.MOD_ID+":preciseUnitCasing/2", GoodGenerator.MOD_ID+":preciseUnitCasing/3"});
public static final Block compactFusionCoil = new Casing("compactFusionCoil", new String[]{GoodGenerator.MOD_ID+":fuison/1", GoodGenerator.MOD_ID+":fuison/2", GoodGenerator.MOD_ID+":fuison/3", GoodGenerator.MOD_ID+":fuison/4", GoodGenerator.MOD_ID+":fuison/5"});
+ public static final Block essentiaFilterCasing = new Casing("essentiaFilterCasing", new String[]{GoodGenerator.MOD_ID + ":essentiaFilterCasing"});
public static Block essentiaHatch;
+ public static Block essentiaOutputHatch;
+ public static Block essentiaOutputHatch_ME;
public static ItemStack MAR;
public static ItemStack FRF;
@@ -105,6 +108,7 @@ public class Loaders {
public static ItemStack SCTurbine;
public static ItemStack XHE;
public static ItemStack PA;
+ public static ItemStack LES;
public static ItemStack[] LFC = new ItemStack[5];
public static ItemStack[] NeutronAccelerators = new ItemStack[9];
@@ -198,11 +202,20 @@ public class Loaders {
LargeEssentiaEnergyData.processEssentiaData();
GameRegistry.registerItem(upgradeEssentia, "upgradeEssentia", GoodGenerator.MOD_ID);
GameRegistry.registerTileEntity(EssentiaHatch.class, "EssentiaHatch");
+ GameRegistry.registerTileEntity(EssentiaOutputHatch.class, "EssentiaOutputHatch");
+ GameRegistry.registerTileEntity(EssentiaOutputHatch_ME.class, "EssentiaOutputHatch_ME");
Loaders.LEG = new LargeEssentiaGenerator(IDOffset + 1, "LargeEssentiaGenerator", "Large Essentia Generator").getStackForm(1L);
+ Loaders.LES = new LargeEssentiaSmeltery(IDOffset + 23, "LargeEssentiaSmeltery", "Large Essentia Smeltery").getStackForm(1L);
essentiaHatch = new TEBlock("essentiaHatch", new String[]{GoodGenerator.MOD_ID + ":essentiaHatch"}, 1);
+ essentiaOutputHatch = new TEBlock("essentiaOutputHatch", new String[]{GoodGenerator.MOD_ID + ":essentiaOutputHatch"}, 2);
+ essentiaOutputHatch_ME = new TEBlock("essentiaOutputHatch_ME", new String[]{GoodGenerator.MOD_ID + ":essentiaOutputHatch_ME"}, 3);
GameRegistry.registerBlock(magicCasing, MyItemBlocks.class, "magicCasing");
GameRegistry.registerBlock(essentiaCell, MyItemBlocks.class, "essentiaCell");
GameRegistry.registerBlock(essentiaHatch, MyItemBlocks.class, "essentiaHatch");
+ GameRegistry.registerBlock(essentiaOutputHatch, MyItemBlocks.class, "essentiaOutputHatch");
+ GameRegistry.registerBlock(essentiaFilterCasing, MyItemBlocks.class, "essentiaFilterCasing");
+ GameRegistry.registerBlock(essentiaOutputHatch_ME, MyItemBlocks.class, "essentiaOutputHatch_ME");
+
Textures.BlockIcons.casingTexturePages[GoodGeneratorTexturePage][0] = TextureFactory.of(magicCasing);
}
}
diff --git a/src/main/java/goodgenerator/util/ItemRefer.java b/src/main/java/goodgenerator/util/ItemRefer.java
index c23ac559c9..5d59bf8fb6 100644
--- a/src/main/java/goodgenerator/util/ItemRefer.java
+++ b/src/main/java/goodgenerator/util/ItemRefer.java
@@ -1,6 +1,5 @@
package goodgenerator.util;
-import goodgenerator.blocks.tileEntity.ExtremeHeatExchanger;
import gregtech.api.util.GT_Utility;
import ic2.core.Ic2Items;
import net.minecraft.block.Block;
@@ -127,6 +126,9 @@ public final class ItemRefer {
public static ItemRefer Compact_Fusion_Coil_T2 = getItemStack(compactFusionCoil, 2);
public static ItemRefer Compact_Fusion_Coil_T3 = getItemStack(compactFusionCoil, 3);
public static ItemRefer Compact_Fusion_Coil_T4 = getItemStack(compactFusionCoil, 4);
+ public static ItemRefer Essentia_Filter_Casing = getItemStack(essentiaFilterCasing);
+ public static ItemRefer Essentia_Output_Hatch = getItemStack(essentiaOutputHatch);
+ public static ItemRefer Essentia_Output_Hatch_ME = getItemStack(essentiaOutputHatch_ME);
public static ItemRefer Large_Naquadah_Reactor = getItemStack(MAR);
public static ItemRefer Naquadah_Fuel_Refinery = getItemStack(FRF);
@@ -143,6 +145,7 @@ public final class ItemRefer {
public static ItemRefer Compact_Fusion_MK3 = getItemStack(LFC[2]);
public static ItemRefer Compact_Fusion_MK4 = getItemStack(LFC[3]);
public static ItemRefer Compact_Fusion_MK5 = getItemStack(LFC[4]);
+ public static ItemRefer Large_Essentia_Smeltery = getItemStack(LES);
private Item mItem = null;
private Block mBlock = null;
@@ -186,8 +189,8 @@ public final class ItemRefer {
mItemStack = itemStack;
}
- public ItemStack get(int amount){
- if (mItem != null ) return new ItemStack(mItem, amount, mMeta);
+ public ItemStack get(int amount) {
+ if (mItem != null) return new ItemStack(mItem, amount, mMeta);
if (mBlock != null) return new ItemStack(mBlock, amount, mMeta);
if (mItemStack != null) return GT_Utility.copyAmount(amount, mItemStack);
return new ItemStack(_null_, amount, 0);