From 22c2f16509e7c1ddbd960275a7f442643e3c9da8 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 30 Oct 2017 09:18:40 +0800 Subject: [PATCH 01/33] GT6 styled pipe and wire connection --- src/main/java/gregtech/GT_Mod.java | 1 + src/main/java/gregtech/api/GregTech_API.java | 11 +- .../metatileentity/IConnectable.java | 16 ++ .../metatileentity/BaseMetaPipeEntity.java | 8 + .../api/metatileentity/MetaPipeEntity.java | 39 +++- .../GT_MetaPipeEntity_Cable.java | 95 ++++++---- .../GT_MetaPipeEntity_Fluid.java | 170 +++++++++++++----- .../GT_MetaPipeEntity_Frame.java | 6 + .../GT_MetaPipeEntity_Item.java | 129 +++++++------ src/main/java/gregtech/common/GT_Client.java | 2 +- src/main/java/gregtech/common/GT_Proxy.java | 1 + .../common/blocks/GT_Item_Machines.java | 4 + .../items/GT_MetaGenerated_Tool_01.java | 2 +- 13 files changed, 340 insertions(+), 144 deletions(-) create mode 100644 src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 848791bb..cf1c27b8 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -280,6 +280,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.enableBasaltOres = GregTech_API.sWorldgenFile.get("general", "enableBasaltOres", gregtechproxy.enableBasaltOres); gregtechproxy.enableGCOres = GregTech_API.sWorldgenFile.get("general", "enableGCOres", gregtechproxy.enableGCOres); gregtechproxy.enableUBOres = GregTech_API.sWorldgenFile.get("general", "enableUBOres", gregtechproxy.enableUBOres); + gregtechproxy.gt6Pipe = tMainConfig.get("general", "GT6StyledPipesAndWiresConnection", true).getBoolean(true); Materials[] tDisableOres = new Materials[]{Materials.Chrome, Materials.Naquadria, Materials.Silicon, Materials.Cobalt, Materials.Cadmium, Materials.Indium, Materials.Tungsten, Materials.Adamantium, Materials.Mithril, Materials.DarkIron, Materials.Rutile, Materials.Alduorite, Materials.Magnesium, Materials.Nikolite}; diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index b5b38c6c..4dcc76a9 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -127,7 +127,7 @@ public class GregTech_API { /** * The List of Tools, which can be used. Accepts regular damageable Items and Electric Items */ - public static final GT_HashSet sToolList = new GT_HashSet(), sCrowbarList = new GT_HashSet(), sScrewdriverList = new GT_HashSet(), sWrenchList = new GT_HashSet(), sSoftHammerList = new GT_HashSet(), sHardHammerList = new GT_HashSet(), sSolderingToolList = new GT_HashSet(), sSolderingMetalList = new GT_HashSet(); + public static final GT_HashSet sToolList = new GT_HashSet(), sCrowbarList = new GT_HashSet(), sScrewdriverList = new GT_HashSet(), sWrenchList = new GT_HashSet(), sSoftHammerList = new GT_HashSet(), sHardHammerList = new GT_HashSet(), sWireCutterList = new GT_HashSet(), sSolderingToolList = new GT_HashSet(), sSolderingMetalList = new GT_HashSet(); /** * The List of Hazmat Armors */ @@ -575,6 +575,15 @@ public class GregTech_API { return registerTool(aTool, sHardHammerList); } + /** + * Register a Wire Cutter to interact with Machines + *

+ * You need to register Tools in the Load Phase, because otherwise the Autodetection will assign a Tool Type in certain Cases during postload (When IToolWrench or similar Interfaces are implemented). + */ + public static boolean registerWireCutter(ItemStack aTool) { + return registerTool(aTool, sWireCutterList); + } + /** * Register a Soldering Tool to interact with Machines *

diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java new file mode 100644 index 00000000..db8e812c --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -0,0 +1,16 @@ +package gregtech.api.interfaces.metatileentity; + +/** + * For pipes, wires, and other MetaTiles which should be decided whether they should connect to the block at each side. + */ +public interface IConnectable { + /** + * Try to connect to the Block at the specified side + * returns the connection state. Non-positive values for failed, others for succeeded. + */ + public int connect(byte aSide); + /** + * Try to disconnect to the Block at the specified side + */ + public void disconnect(byte aSide); +} diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index e5fba09a..453522f3 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -816,6 +816,14 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE return true; } + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList)) { + if (mMetaTileEntity.onWireCutterRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { + GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); + GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord); + } + return true; + } + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) { if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) { mStrongRedstone ^= (1 << tSide); diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 96532f52..1f4b7883 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -2,7 +2,9 @@ package gregtech.api.metatileentity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; +import gregtech.api.interfaces.metatileentity.IConnectable; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; @@ -45,7 +47,7 @@ import static gregtech.api.enums.GT_Values.V; * Call the Constructor like the following example inside the Load Phase, to register it. * "new GT_MetaTileEntity_E_Furnace(54, "GT_E_Furnace", "Automatic E-Furnace");" */ -public abstract class MetaPipeEntity implements IMetaTileEntity { +public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { /** * The Inventory of the MetaTileEntity. Amount of Slots can be larger than 256. HAYO! */ @@ -203,6 +205,10 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { return false; } + public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + return false; + } + @Override public void onExplosion() {/*Do nothing*/} @@ -689,4 +695,35 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { public String getAlternativeModeText() { return ""; } + + public String trans(String aKey, String aEnglish){ + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); + } + + @Override + public int connect(byte aSide) { + if (aSide >= 6) return 0; + mConnections |= (1 << aSide); + if (GT_Mod.gregtechproxy.gt6Pipe) { + byte tSide = GT_Utility.getOppositeSide(aSide); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + IMetaTileEntity tPipe = tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() : null; + if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) == 0) + ((MetaPipeEntity) tPipe).connect(tSide); + } + return 1; + } + + @Override + public void disconnect(byte aSide) { + if (aSide >= 6) return; + mConnections &= ~(1 << aSide); + if (GT_Mod.gregtechproxy.gt6Pipe) { + byte tSide = GT_Utility.getOppositeSide(aSide); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); + if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) != 0) + ((MetaPipeEntity) tPipe).disconnect(tSide); + } + } } \ No newline at end of file diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index af157b0a..0f5f4a5a 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -21,6 +21,7 @@ import gregtech.common.GT_Client; import ic2.api.energy.tile.IEnergySink; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -34,7 +35,7 @@ import java.util.Arrays; import static gregtech.api.enums.GT_Values.VN; -public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable { +public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable{ public final float mThickNess; public final Materials mMaterial; public final long mCableLossPerMeter, mAmperage, mVoltage; @@ -42,6 +43,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile public long mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredVoltageLast20 = 0; public long mRestRF; public short mOverheat; + private boolean mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe; public GT_MetaPipeEntity_Cable(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) { super(aID, aName, aNameRegional, 0); @@ -241,46 +243,56 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (aTick % 20 == 0) { mTransferredVoltageLast20 = 0; mTransferredAmperageLast20 = 0; - mConnections = 0; - for (byte i = 0, j = 0; i < 6; i++) { - j = GT_Utility.getOppositeSide(i); - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity) || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity) || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity)) { - TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i); - if (tTileEntity instanceof IColoredTileEntity) { - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); - if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) continue; - } - } - if (tTileEntity instanceof IEnergyConnected && (((IEnergyConnected) tTileEntity).inputEnergyFrom(j) || ((IEnergyConnected) tTileEntity).outputsEnergyTo(j))) { - mConnections |= (1 << i); - continue; - } - if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof IMetaTileEntityCable) { - if (((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).alwaysLookConnected(j, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).letsEnergyIn(j, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).letsEnergyOut(j, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), ((IGregTechTileEntity) tTileEntity))) { - mConnections |= (1 << i); - continue; - } - } - if (tTileEntity instanceof IEnergySink && ((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) aBaseMetaTileEntity, ForgeDirection.getOrientation(j))) { - mConnections |= (1 << i); - continue; - } - if (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { - mConnections |= (1 << i); - continue; - } - /* - if (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter)tTileEntity).emitsEnergyTo((TileEntity)aBaseMetaTileEntity, ForgeDirection.getOrientation(j))) { - mConnections |= (1<= 6) return rConnect; + byte tSide = GT_Utility.getOppositeSide(aSide); + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aSide); + if (getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).alwaysLookConnected(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) { + if (tTileEntity instanceof IColoredTileEntity) { + if (getBaseMetaTileEntity().getColorization() >= 0) { + byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); + if (tColor >= 0 && tColor != getBaseMetaTileEntity().getColorization()) + return rConnect; + } + } + if ((tTileEntity instanceof IEnergyConnected && (((IEnergyConnected) tTileEntity).inputEnergyFrom(tSide) || ((IEnergyConnected) tTileEntity).outputsEnergyTo(tSide))) + || (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof IMetaTileEntityCable + && (((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).letsEnergyIn(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).letsEnergyOut(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)))) + || (tTileEntity instanceof IEnergySink && ((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) getBaseMetaTileEntity(), ForgeDirection.getOrientation(tSide))) + || (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(tSide))) + /*|| (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter)tTileEntity).emitsEnergyTo((TileEntity)getBaseMetaTileEntity(), ForgeDirection.getOrientation(tSide)))*/) { + rConnect = 1; + } + } + if (rConnect > 0) { + super.connect(aSide); + } + return rConnect; + } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; @@ -302,17 +314,22 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public float getThickNess() { - if(GT_Mod.instance.isClientSide() && GT_Client.hideValue==1) return 0.0625F; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; return mThickNess; } @Override public void saveNBTData(NBTTagCompound aNBT) { - // + if (GT_Mod.gregtechproxy.gt6Pipe) + aNBT.setByte("mConnections", mConnections); } @Override public void loadNBTData(NBTTagCompound aNBT) { - // + if (GT_Mod.gregtechproxy.gt6Pipe) { + if (!aNBT.hasKey("mConnections")) + mCheckConnections = true; + mConnections = aNBT.getByte("mConnections"); + } } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index d3ed7178..a45e40cc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -16,6 +16,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; @@ -32,13 +33,18 @@ import java.util.concurrent.ConcurrentHashMap; import static gregtech.api.enums.GT_Values.D1; -public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { +public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ public final float mThickNess; public final Materials mMaterial; public final int mCapacity, mHeatResistance; public final boolean mGasProof; public FluidStack mFluid; public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0; + private boolean mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe; + /** + * Bitmask for whether disable fluid input form each side. + */ + public byte mDisableInput = 0; public GT_MetaPipeEntity_Fluid(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { super(aID, aName, aNameRegional, 0); @@ -121,12 +127,22 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public void saveNBTData(NBTTagCompound aNBT) { if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom); + if (GT_Mod.gregtechproxy.gt6Pipe) { + aNBT.setByte("mConnections", mConnections); + aNBT.setByte("mDisableInput", mDisableInput); + } } @Override public void loadNBTData(NBTTagCompound aNBT) { mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom"); + if (GT_Mod.gregtechproxy.gt6Pipe) { + if (!aNBT.hasKey("mConnections")) + mCheckConnections = false; + mConnections = aNBT.getByte("mConnections"); + mDisableInput = aNBT.getByte("mDisableInput"); + } } @Override @@ -212,55 +228,19 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (mLastReceivedFrom == oLastReceivedFrom) { ConcurrentHashMap tTanks = new ConcurrentHashMap(); - - mConnections = 0; - + for (byte tSide = 0, i = 0, j = (byte) aBaseMetaTileEntity.getRandomNumber(6); i < 6; i++) { - tSide = (byte) ((j + i) % 6); - - IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(tSide); - if (tTileEntity != null) { - if (tTileEntity instanceof IGregTechTileEntity) { - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = ((IGregTechTileEntity) tTileEntity).getColorization(); - if (tColor >= 0 && (tColor & 15) != (aBaseMetaTileEntity.getColorization() & 15)) { - continue; - } - } - } - FluidTankInfo[] tInfo = tTileEntity.getTankInfo(ForgeDirection.getOrientation(tSide).getOpposite()); - if (tInfo != null && tInfo.length > 0) { - if (tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(tSide)).alwaysLookConnected(GT_Utility.getOppositeSide(tSide), ((ICoverable) tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(tSide)), ((ICoverable) tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(tSide)), ((ICoverable) tTileEntity))) { - mConnections |= (1 << tSide); - } - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).letsFluidIn(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), null, aBaseMetaTileEntity)) { - mConnections |= (1 << tSide); - } - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).letsFluidOut(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), null, aBaseMetaTileEntity)) { - mConnections |= (1 << tSide); - if (((1 << tSide) & mLastReceivedFrom) == 0) - tTanks.put(tTileEntity, ForgeDirection.getOrientation(tSide).getOpposite()); - } - - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), aBaseMetaTileEntity)) { - mConnections |= (1 << tSide); - } - }else if(tInfo != null && tInfo.length == 0){ - IGregTechTileEntity tSideTile = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(tSide); - if(tSideTile!=null){ - ItemStack tCover = tSideTile.getCoverItemAtSide(GT_Utility.getOppositeSide(tSide)); - if (tCover!=null &&(GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_LV.get(1, new Object[]{},true)) || - GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_MV.get(1, new Object[]{},true)) || - GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_HV.get(1, new Object[]{},true)) || - GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_EV.get(1, new Object[]{},true)) || - GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_IV.get(1, new Object[]{},true)))) { - mConnections |= (1 << tSide); - } - } - } - } + tSide = (byte) ((i + j) % 6); + if (mCheckConnections || (mConnections & (1 << tSide)) != 0) + switch (connect(tSide)) { + case 0: + disconnect(tSide); break; + case 2: + tTanks.put(aBaseMetaTileEntity.getITankContainerAtSide(tSide), ForgeDirection.getOrientation(tSide).getOpposite()); break; + } } - + if (GT_Mod.gregtechproxy.gt6Pipe) mCheckConnections = false; + if (mFluid != null && mFluid.amount > 0) { int tAmount = Math.max(1, Math.min(mCapacity * 10, mFluid.amount / 2)), tSuccessfulTankAmount = 0; @@ -295,6 +275,88 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); } + @Override + public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Mod.gregtechproxy.gt6Pipe) { + byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); + byte tMask = (byte) (1 << tSide); + if (aPlayer.isSneaking()) { + if ((mDisableInput & tMask) != 0) { + mDisableInput &= ~tMask; + GT_Utility.sendChatToPlayer(aPlayer, trans("212", "Input enabled")); + } else { + mDisableInput |= tMask; + GT_Utility.sendChatToPlayer(aPlayer, trans("213", "Input disabled")); + } + } else { + if ((mConnections & tMask) == 0) + connect(tSide); + else + disconnect(tSide); + } + return true; + } + return false; + } + + @Override + public int connect(byte aSide) { + int rConnect = 0; + if (aSide >= 6) return rConnect; + IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(aSide); + GT_MetaPipeEntity_Fluid tFluidPipe = null; + byte tSide = GT_Utility.getOppositeSide(aSide); + if (tTileEntity != null) { + if (tTileEntity instanceof IGregTechTileEntity) { + if (getBaseMetaTileEntity().getColorization() >= 0) { + byte tColor = ((IGregTechTileEntity) tTileEntity).getColorization(); + if (tColor >= 0 && (tColor & 15) != (getBaseMetaTileEntity().getColorization() & 15)) { + return rConnect; + } + } + if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Fluid) { + tFluidPipe = (GT_MetaPipeEntity_Fluid) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + } + } + FluidTankInfo[] tInfo = tTileEntity.getTankInfo(ForgeDirection.getOrientation(aSide).getOpposite()); + if (tInfo != null) { + if (tInfo.length > 0) { + if ((tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, ((ICoverable) tTileEntity).getCoverIDAtSide(tSide), ((ICoverable) tTileEntity).getCoverDataAtSide(tSide), ((ICoverable) tTileEntity))) + || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsFluidIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), null, getBaseMetaTileEntity()) + || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).alwaysLookConnected(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) { + rConnect = 1; + } + if (getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsFluidOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), null, getBaseMetaTileEntity())) { + rConnect = 2; + } + } else if (tInfo.length == 0) { + IGregTechTileEntity tSideTile = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + if (tSideTile != null){ + ItemStack tCover = tSideTile.getCoverItemAtSide(tSide); + if (tCover!=null &&(GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_LV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_MV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_HV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_EV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_IV.get(1, new Object[]{},true)))) { + rConnect = 1; + } + } + } + } + } + if (rConnect > 0) { + if (GT_Mod.gregtechproxy.gt6Pipe && tFluidPipe != null) { + if ((mDisableInput == 0 || (tFluidPipe.mDisableInput & (1 << tSide)) == 0)) { + mConnections |= (1 << aSide); + if ((tFluidPipe.mConnections & (1 << tSide)) == 0) tFluidPipe.connect(tSide); + } + } else { + mConnections |= (1 << aSide); + } + } + return rConnect; + } + @Override public void doSound(byte aIndex, double aX, double aY, double aZ) { super.doSound(aIndex, aX, aY, aZ); @@ -409,7 +471,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public float getThickNess() { - if(GT_Mod.instance.isClientSide() && GT_Client.hideValue==1) return 0.0625F; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; return mThickNess; } + + @Override + public boolean isLiquidInput(byte aSide) { + return (mDisableInput & (1 << aSide)) == 0; + } + + @Override + public boolean isLiquidOutput(byte aSide) { + return true; + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java index ee4b2042..d9a2e31c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java @@ -91,4 +91,10 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } + + @Override + public int connect(byte aSide) {return 0;} + + @Override + public void disconnect(byte aSide) {/*Do nothing*/} } \ No newline at end of file diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index 62ea2e41..8a094a1b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -12,6 +12,7 @@ import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; @@ -26,7 +27,7 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; import java.util.concurrent.ConcurrentHashMap; -public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe { +public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe{ public final float mThickNess; public final Materials mMaterial; public final int mStepSize; @@ -34,6 +35,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE public int mTransferredItems = 0; public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0; public boolean mIsRestrictive = false; + private boolean mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe; public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive, int aTickTime) { super(aID, aName, aNameRegional, aInvSlotCount); @@ -141,70 +143,29 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public void saveNBTData(NBTTagCompound aNBT) { aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom); + if (GT_Mod.gregtechproxy.gt6Pipe) + aNBT.setByte("mConnections", mConnections); } @Override public void loadNBTData(NBTTagCompound aNBT) { mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom"); + if (GT_Mod.gregtechproxy.gt6Pipe) { + if (!aNBT.hasKey("mConnections")) + mCheckConnections = true; + mConnections = aNBT.getByte("mConnections"); + } } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide() && aTick % 10 == 0) { - mConnections = 0; if (aTick % mTickTime == 0) mTransferredItems = 0; for (byte i = 0; i < 6; i++) { - TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i); - if (tTileEntity != null) { - boolean temp = GT_Utility.isConnectableNonInventoryPipe(tTileEntity, GT_Utility.getOppositeSide(i)); - if (tTileEntity instanceof IGregTechTileEntity) { - temp = true; - if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() == null) continue; - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = ((IGregTechTileEntity) tTileEntity).getColorization(); - if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { - continue; - } - } - if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity().connectsToItemPipe(GT_Utility.getOppositeSide(i))) { - mConnections |= (1 << i); - continue; - } - } - if (tTileEntity instanceof IInventory) { - temp = true; - if (((IInventory) tTileEntity).getSizeInventory() <= 0) { - continue; - } - } - if (tTileEntity instanceof ISidedInventory) { - temp = true; - int[] tSlots = ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(GT_Utility.getOppositeSide(i)); - if (tSlots == null || tSlots.length <= 0) { - continue; - } - } - if (temp) { - if (tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(i)).alwaysLookConnected(GT_Utility.getOppositeSide(i), ((ICoverable) tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(i)), ((ICoverable) tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(i)), ((ICoverable) tTileEntity))) { - mConnections |= (1 << i); - continue; - } - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity)) { - mConnections |= (1 << i); - continue; - } - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -1, aBaseMetaTileEntity)) { - mConnections |= (1 << i); - continue; - } - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -1, aBaseMetaTileEntity)) { - mConnections |= (1 << i); - continue; - } - } - } + if ((mCheckConnections || (mConnections & (1 << i)) != 0) && connect(i) <= 0) disconnect(i); } + if (GT_Mod.gregtechproxy.gt6Pipe) mCheckConnections = false; if (oLastReceivedFrom == mLastReceivedFrom) { doTickProfilingInThisTick = false; @@ -229,6 +190,70 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); } + @Override + public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Mod.gregtechproxy.gt6Pipe) { + byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); + if ((mConnections & (1 << tSide)) == 0) + connect(tSide); + else + disconnect(tSide); + return true; + } + return false; + } + + @Override + public int connect(byte aSide) { + int rConnect = 0; + if (aSide >= 6) return rConnect; + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aSide); + byte tSide = GT_Utility.getOppositeSide(aSide); + if (tTileEntity != null) { + boolean temp = GT_Utility.isConnectableNonInventoryPipe(tTileEntity, tSide); + if (tTileEntity instanceof IGregTechTileEntity) { + temp = true; + if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() == null) return rConnect; + if (getBaseMetaTileEntity().getColorization() >= 0) { + byte tColor = ((IGregTechTileEntity) tTileEntity).getColorization(); + if (tColor >= 0 && tColor != getBaseMetaTileEntity().getColorization()) { + return rConnect; + } + } + if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity().connectsToItemPipe(tSide)) { + rConnect = 1; + } + } + if (rConnect == 0) { + if (tTileEntity instanceof IInventory) { + temp = true; + if (((IInventory) tTileEntity).getSizeInventory() <= 0) { + return rConnect; + } + } + if (tTileEntity instanceof ISidedInventory) { + temp = true; + int[] tSlots = ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(tSide); + if (tSlots == null || tSlots.length <= 0) { + return rConnect; + } + } + if (temp) { + if ((tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, ((ICoverable) tTileEntity).getCoverIDAtSide(tSide), ((ICoverable) tTileEntity).getCoverDataAtSide(tSide), ((ICoverable) tTileEntity))) + || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).alwaysLookConnected(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) + || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsItemsIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), -1, getBaseMetaTileEntity()) + || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsItemsOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), -1, getBaseMetaTileEntity())) { + rConnect = 1; + } + } + } + } + if (rConnect > 0) { + super.connect(aSide); + } + return rConnect; + } + @Override public boolean incrementTransferCounter(int aIncrement) { mTransferredItems += aIncrement; @@ -315,7 +340,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public float getThickNess() { - if(GT_Mod.instance.isClientSide() && GT_Client.hideValue==1) return 0.0625F; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; return mThickNess; } diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 51264c76..8b781550 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -354,7 +354,7 @@ public class GT_Client extends GT_Proxy TileEntity aTileEntity = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); try { Class.forName("codechicken.lib.vec.Rotation"); - if (((aTileEntity instanceof BaseMetaPipeEntity)) && (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) && ((GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)))) { + if (((aTileEntity instanceof BaseMetaPipeEntity)) && (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) && ((GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList)))) { drawGrid(aEvent); return; } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index c0e1134c..7d941d9b 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -201,6 +201,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean enableBasaltOres = true; public boolean enableGCOres = true; public boolean enableUBOres = true; + public boolean gt6Pipe = true; public GT_Proxy() { GameRegistry.registerFuelHandler(this); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index aa545064..642d77d8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -2,6 +2,7 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.metatileentity.IConnectable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_ItsNotMyFaultException; import gregtech.api.util.GT_LanguageManager; @@ -131,6 +132,9 @@ public class GT_Item_Machines tTileEntity.setOwnerName(aPlayer.getDisplayName()); } tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound()); + if (tTileEntity.getMetaTileEntity() instanceof IConnectable) { + ((IConnectable) tTileEntity.getMetaTileEntity()).connect(GT_Utility.getOppositeSide(side)); + } } } else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) { return false; diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index ec5c20ff..a71cfbb6 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -71,7 +71,7 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { GregTech_API.registerTool(addTool(20, "Crowbar", "Dismounts Covers and Rotates Rails", new GT_Tool_Crowbar(), ToolDictNames.craftingToolCrowbar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)), GregTech_API.sCrowbarList); GregTech_API.registerTool(addTool(22, "Screwdriver", "Adjusts Covers and Machines", new GT_Tool_Screwdriver(), ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sScrewdriverList); addTool(24, "Mortar", "", new GT_Tool_Mortar(), ToolDictNames.craftingToolMortar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); - addTool(26, "Wire Cutter", "", new GT_Tool_WireCutter(), ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)); + GregTech_API.registerTool(addTool(26, "Wire Cutter", "", new GT_Tool_WireCutter(), ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWireCutterList); addTool(28, "Scoop", "", new GT_Tool_Scoop(), ToolDictNames.craftingToolScoop, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.BESTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PANNUS, 2L)); addTool(30, "Branch Cutter", "", new GT_Tool_BranchCutter(), ToolDictNames.craftingToolBranchCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L)); GregTech_API.registerTool(addTool(32, "Universal Spade", "", new GT_Tool_UniversalSpade(), ToolDictNames.craftingToolBlade, ToolDictNames.craftingToolShovel, ToolDictNames.craftingToolCrowbar, ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)), GregTech_API.sCrowbarList); From f96993bd339827161960b1528c589271b3d78573 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 30 Oct 2017 10:03:28 +0800 Subject: [PATCH 02/33] Soldering Tools for cable connection --- src/main/java/gregtech/GT_Mod.java | 1 + .../metatileentity/BaseMetaPipeEntity.java | 5 ++- .../api/metatileentity/MetaPipeEntity.java | 4 ++ .../GT_MetaPipeEntity_Cable.java | 14 ++++++- .../java/gregtech/api/util/GT_ModHandler.java | 39 ++++++++++++------- src/main/java/gregtech/common/GT_Client.java | 2 +- src/main/java/gregtech/common/GT_Proxy.java | 1 + 7 files changed, 49 insertions(+), 17 deletions(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index cf1c27b8..9c07457a 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -281,6 +281,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.enableGCOres = GregTech_API.sWorldgenFile.get("general", "enableGCOres", gregtechproxy.enableGCOres); gregtechproxy.enableUBOres = GregTech_API.sWorldgenFile.get("general", "enableUBOres", gregtechproxy.enableUBOres); gregtechproxy.gt6Pipe = tMainConfig.get("general", "GT6StyledPipesAndWiresConnection", true).getBoolean(true); + gregtechproxy.costlyCableConnection = tMainConfig.get("general", "CableConnectionRequiresSolderingMaterial", true).getBoolean(true); Materials[] tDisableOres = new Materials[]{Materials.Chrome, Materials.Naquadria, Materials.Silicon, Materials.Cobalt, Materials.Cadmium, Materials.Indium, Materials.Tungsten, Materials.Adamantium, Materials.Mithril, Materials.DarkIron, Materials.Rutile, Materials.Alduorite, Materials.Magnesium, Materials.Nikolite}; diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index 453522f3..393009df 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -825,7 +825,10 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) { - if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) { + if (mMetaTileEntity.onSolderingToolRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { + GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 500, aPlayer); + GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord); + } else if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) { mStrongRedstone ^= (1 << tSide); GT_Utility.sendChatToPlayer(aPlayer, trans("091","Redstone Output at Side ") + tSide + trans("092"," set to: ") + ((mStrongRedstone & (1 << tSide)) != 0 ? trans("093","Strong") : trans("094","Weak"))); GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 3.0F, -1, xCoord, yCoord, zCoord); diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 1f4b7883..ab862318 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -209,6 +209,10 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return false; } + public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + return false; + } + @Override public void onExplosion() {/*Do nothing*/} diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index 0f5f4a5a..6937dccf 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -16,6 +16,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; import ic2.api.energy.tile.IEnergySink; @@ -253,10 +254,21 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + return onConnectionToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + } + + @Override + public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + return onConnectionToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + } + + private boolean onConnectionToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (GT_Mod.gregtechproxy.gt6Pipe) { byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); - if ((mConnections & (1 << tSide)) == 0) + if ((mConnections & (1 << tSide)) == 0) { + if (GT_Mod.gregtechproxy.costlyCableConnection && !GT_ModHandler.consumeSolderingMaterial(aPlayer)) return false; connect(tSide); + } else disconnect(tSide); return true; diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index daa1b670..82f3e525 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -1718,21 +1718,12 @@ public class GT_ModHandler { EntityPlayer tPlayer = (EntityPlayer) aPlayer; if (tPlayer.capabilities.isCreativeMode) return true; if (isElectricItem(aStack) && ic2.api.item.ElectricItem.manager.getCharge(aStack) > 1000.0d) { - for (int i = 0; i < tPlayer.inventory.mainInventory.length; i++) { - if (GT_Utility.isStackInList(tPlayer.inventory.mainInventory[i], GregTech_API.sSolderingMetalList)) { - if (tPlayer.inventory.mainInventory[i].stackSize < 1) return false; - if (tPlayer.inventory.mainInventory[i].stackSize == 1) { - tPlayer.inventory.mainInventory[i] = null; - } else { - tPlayer.inventory.mainInventory[i].stackSize--; - } - if (tPlayer.inventoryContainer != null) tPlayer.inventoryContainer.detectAndSendChanges(); - if (canUseElectricItem(aStack, 10000)) { - return GT_ModHandler.useElectricItem(aStack, 10000, (EntityPlayer) aPlayer); - } - GT_ModHandler.useElectricItem(aStack, (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), (EntityPlayer) aPlayer); - return false; + if (consumeSolderingMaterial(tPlayer)) { + if (canUseElectricItem(aStack, 10000)) { + return GT_ModHandler.useElectricItem(aStack, 10000, (EntityPlayer) aPlayer); } + GT_ModHandler.useElectricItem(aStack, (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), (EntityPlayer) aPlayer); + return false; } } } else { @@ -1743,6 +1734,26 @@ public class GT_ModHandler { return false; } + /** + * Simply consumes some soldering material + */ + public static boolean consumeSolderingMaterial(EntityPlayer aPlayer) { + if (aPlayer.capabilities.isCreativeMode) return true; + for (int i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + if (GT_Utility.isStackInList(aPlayer.inventory.mainInventory[i], GregTech_API.sSolderingMetalList)) { + if (aPlayer.inventory.mainInventory[i].stackSize < 1) return false; + if (aPlayer.inventory.mainInventory[i].stackSize == 1) { + aPlayer.inventory.mainInventory[i] = null; + } else { + aPlayer.inventory.mainInventory[i].stackSize--; + } + if (aPlayer.inventoryContainer != null) aPlayer.inventoryContainer.detectAndSendChanges(); + return true; + } + } + return false; + } + /** * Is this an electric Item, which can charge other Items? */ diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 8b781550..aa8da546 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -354,7 +354,7 @@ public class GT_Client extends GT_Proxy TileEntity aTileEntity = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); try { Class.forName("codechicken.lib.vec.Rotation"); - if (((aTileEntity instanceof BaseMetaPipeEntity)) && (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) && ((GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList)))) { + if (((aTileEntity instanceof BaseMetaPipeEntity)) && (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) && ((GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)))) { drawGrid(aEvent); return; } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 7d941d9b..2541ec4e 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -202,6 +202,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean enableGCOres = true; public boolean enableUBOres = true; public boolean gt6Pipe = true; + public boolean costlyCableConnection = true; public GT_Proxy() { GameRegistry.registerFuelHandler(this); From 7b0dc97594ab7cc2a2bf75385060bbecdcd16709 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 30 Oct 2017 16:16:16 +0800 Subject: [PATCH 03/33] Add Quadruple and Nonuple fluid pipes; fix several issues --- .../java/gregtech/api/enums/OrePrefixes.java | 2 + .../java/gregtech/api/enums/TextureSet.java | 4 +- .../GT_MetaPipeEntity_Cable.java | 7 +- .../GT_MetaPipeEntity_Fluid.java | 283 ++++++++++++------ .../GT_MetaPipeEntity_Item.java | 10 +- .../gregtech/api/util/GT_LanguageManager.java | 4 + .../loaders/oreprocessing/ProcessingPipe.java | 12 + .../preload/GT_Loader_MetaTileEntities.java | 6 + .../materialicons/DIAMOND/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/DIAMOND/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/DULL/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/DULL/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/EMERALD/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/EMERALD/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/FIERY/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/FIERY/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/FINE/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/FINE/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/FLINT/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/FLINT/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/FLUID/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/FLUID/pipeQuadruple.png | Bin 0 -> 521 bytes .../GEM_HORIZONTAL/pipeNonuple.png | Bin 0 -> 497 bytes .../GEM_HORIZONTAL/pipeQuadruple.png | Bin 0 -> 521 bytes .../GEM_VERTICAL/pipeNonuple.png | Bin 0 -> 497 bytes .../GEM_VERTICAL/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/GLASS/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/GLASS/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/LAPIS/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/LAPIS/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/LEAF/pipeNonuple.png | Bin 0 -> 433 bytes .../materialicons/LEAF/pipeQuadruple.png | Bin 0 -> 448 bytes .../materialicons/LIGNITE/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/LIGNITE/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/MAGNETIC/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/MAGNETIC/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/METALLIC/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/METALLIC/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/NETHERSTAR/pipeNonuple.png | Bin 0 -> 497 bytes .../NETHERSTAR/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/NONE/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/NONE/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/OPAL/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/OPAL/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/PAPER/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/PAPER/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/POWDER/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/POWDER/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/QUARTZ/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/QUARTZ/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/ROUGH/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/ROUGH/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/RUBY/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/RUBY/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/SAND/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/SAND/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/SHARDS/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/SHARDS/pipeQuadruple.png | Bin 0 -> 521 bytes .../materialicons/SHINY/pipeNonuple.png | Bin 0 -> 497 bytes .../materialicons/SHINY/pipeQuadruple.png | Bin 0 -> 521 bytes .../blocks/materialicons/WOOD/pipeNonuple.png | Bin 0 -> 433 bytes .../materialicons/WOOD/pipeQuadruple.png | Bin 0 -> 448 bytes 62 files changed, 228 insertions(+), 100 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/pipeQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/pipeNonuple.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/pipeQuadruple.png diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index ecc6d946..9c9e8296 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -188,6 +188,8 @@ public enum OrePrefixes { pipeMedium("Medium Pipes", "Medium ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 3, 64, 80), pipeLarge("Large pipes", "Large ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 6, 64, 81), pipeHuge("Huge Pipes", "Huge ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 12, 64, 82), + pipeQuadruple("Quadruple Pipes", "Quadruple ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M *12, 64, 84), + pipeNonuple("Nonuple Pipes", "Nonuple ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 9, 64, 85), pipeRestrictiveTiny("Tiny Restrictive Pipes", "Tiny Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M / 2, 64, 78), pipeRestrictiveSmall("Small Restrictive Pipes", "Small Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 1, 64, 79), pipeRestrictiveMedium("Medium Restrictive Pipes", "Medium Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 3, 64, 80), diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index 891a8085..aa893780 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -103,8 +103,8 @@ public class TextureSet { mTextures[81] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + "/pipeLarge"); mTextures[82] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + "/pipeHuge"); mTextures[83] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + "/frameGt"); - mTextures[84] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + aTextVoidDir); - mTextures[85] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + aTextVoidDir); + mTextures[84] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + "/pipeQuadruple"); + mTextures[85] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + "/pipeNonuple"); mTextures[86] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + aTextVoidDir); mTextures[87] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + aTextVoidDir); mTextures[88] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + mSetName + aTextVoidDir); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index 6937dccf..1885b2f8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -267,10 +267,13 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); if ((mConnections & (1 << tSide)) == 0) { if (GT_Mod.gregtechproxy.costlyCableConnection && !GT_ModHandler.consumeSolderingMaterial(aPlayer)) return false; - connect(tSide); + if (connect(tSide) > 0) + GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); } - else + else { disconnect(tSide); + GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); + } return true; } return false; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index a45e40cc..6ebc0ff4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -36,9 +36,9 @@ import static gregtech.api.enums.GT_Values.D1; public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ public final float mThickNess; public final Materials mMaterial; - public final int mCapacity, mHeatResistance; + public final int mCapacity, mHeatResistance, mPipeAmount; public final boolean mGasProof; - public FluidStack mFluid; + public final FluidStack[] mFluids; public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0; private boolean mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe; /** @@ -47,21 +47,34 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ public byte mDisableInput = 0; public GT_MetaPipeEntity_Fluid(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { - super(aID, aName, aNameRegional, 0); + this(aID, aName, aNameRegional, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); + } + + public GT_MetaPipeEntity_Fluid(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { + super(aID, aName, aNameRegional, 0); mThickNess = aThickNess; mMaterial = aMaterial; mCapacity = aCapacity; mGasProof = aGasProof; mHeatResistance = aHeatResistance; + mPipeAmount = aFluidTypes; + mFluids = new FluidStack[mPipeAmount]; } + @Deprecated public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { + this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); + } + + public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { super(aName, 0); mThickNess = aThickNess; mMaterial = aMaterial; mCapacity = aCapacity; mGasProof = aGasProof; mHeatResistance = aHeatResistance; + mPipeAmount = aFluidTypes; + mFluids = new FluidStack[mPipeAmount]; } @Override @@ -71,7 +84,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof); + return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount); } @Override @@ -88,6 +101,10 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; if (tThickNess < 0.874F)//0.825 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + if (mPipeAmount == 4) + return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + if (mPipeAmount == 9) + return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; } return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; @@ -125,7 +142,9 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public void saveNBTData(NBTTagCompound aNBT) { - if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); + for (int i = 0; i < mPipeAmount; i++) + if (mFluids[i] != null) + aNBT.setTag("mFluid"+(i==0?"":i), mFluids[i].writeToNBT(new NBTTagCompound())); aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom); if (GT_Mod.gregtechproxy.gt6Pipe) { aNBT.setByte("mConnections", mConnections); @@ -135,7 +154,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public void loadNBTData(NBTTagCompound aNBT) { - mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); + for (int i = 0; i < mPipeAmount; i++) + mFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"+(i==0?"":i))); mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom"); if (GT_Mod.gregtechproxy.gt6Pipe) { if (!aNBT.hasKey("mConnections")) @@ -147,13 +167,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { - if (mFluid != null && (((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) { - int tTemperature = mFluid.getFluid().getTemperature(mFluid); - if (tTemperature > 320 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { - GT_Utility.applyHeatDamage((EntityLivingBase) aEntity, (tTemperature - 300) / 50.0F); - } else if (tTemperature < 260 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { - GT_Utility.applyFrostDamage((EntityLivingBase) aEntity, (270 - tTemperature) / 25.0F); - } + if ((((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) { + for (FluidStack tFluid : mFluids) { + if (tFluid != null) { + int tTemperature = tFluid.getFluid().getTemperature(tFluid); + if (tTemperature > 320 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { + GT_Utility.applyHeatDamage((EntityLivingBase) aEntity, (tTemperature - 300) / 50.0F); break; + } else if (tTemperature < 260 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { + GT_Utility.applyFrostDamage((EntityLivingBase) aEntity, (270 - tTemperature) / 25.0F); break; + } + } + } } } @@ -193,36 +217,38 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ mLastReceivedFrom = 0; } - if (mFluid != null && mFluid.amount > 0) { - int tTemperature = mFluid.getFluid().getTemperature(mFluid); - if (tTemperature > mHeatResistance) { - if (aBaseMetaTileEntity.getRandomNumber(100) == 0) { - aBaseMetaTileEntity.setToFire(); - return; - } - aBaseMetaTileEntity.setOnFire(); - } - if (!mGasProof && mFluid.getFluid().isGaseous(mFluid)) { - mFluid.amount -= 5; - sendSound((byte) 9); - if (tTemperature > 320) { - try { - for (EntityLivingBase tLiving : (ArrayList) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 2, getBaseMetaTileEntity().getYCoord() - 2, getBaseMetaTileEntity().getZCoord() - 2, getBaseMetaTileEntity().getXCoord() + 3, getBaseMetaTileEntity().getYCoord() + 3, getBaseMetaTileEntity().getZCoord() + 3))) { - GT_Utility.applyHeatDamage(tLiving, (tTemperature - 300) / 25.0F); - } - } catch (Throwable e) { - if (D1) e.printStackTrace(GT_Log.err); - } - } else if (tTemperature < 260) { - try { - for (EntityLivingBase tLiving : (ArrayList) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 2, getBaseMetaTileEntity().getYCoord() - 2, getBaseMetaTileEntity().getZCoord() - 2, getBaseMetaTileEntity().getXCoord() + 3, getBaseMetaTileEntity().getYCoord() + 3, getBaseMetaTileEntity().getZCoord() + 3))) { - GT_Utility.applyFrostDamage(tLiving, (270 - tTemperature) / 12.5F); - } - } catch (Throwable e) { - if (D1) e.printStackTrace(GT_Log.err); + for (FluidStack tFluid : mFluids) { + if (tFluid != null && tFluid.amount > 0) { + int tTemperature = tFluid.getFluid().getTemperature(tFluid); + if (tTemperature > mHeatResistance) { + if (aBaseMetaTileEntity.getRandomNumber(100) == 0) { + aBaseMetaTileEntity.setToFire(); + return; } + aBaseMetaTileEntity.setOnFire(); + } + if (!mGasProof && tFluid.getFluid().isGaseous(tFluid)) { + tFluid.amount -= 5; + sendSound((byte) 9); + if (tTemperature > 320) { + try { + for (EntityLivingBase tLiving : (ArrayList) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 2, getBaseMetaTileEntity().getYCoord() - 2, getBaseMetaTileEntity().getZCoord() - 2, getBaseMetaTileEntity().getXCoord() + 3, getBaseMetaTileEntity().getYCoord() + 3, getBaseMetaTileEntity().getZCoord() + 3))) { + GT_Utility.applyHeatDamage(tLiving, (tTemperature - 300) / 25.0F); + } + } catch (Throwable e) { + if (D1) e.printStackTrace(GT_Log.err); + } + } else if (tTemperature < 260) { + try { + for (EntityLivingBase tLiving : (ArrayList) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 2, getBaseMetaTileEntity().getYCoord() - 2, getBaseMetaTileEntity().getZCoord() - 2, getBaseMetaTileEntity().getXCoord() + 3, getBaseMetaTileEntity().getYCoord() + 3, getBaseMetaTileEntity().getZCoord() + 3))) { + GT_Utility.applyFrostDamage(tLiving, (270 - tTemperature) / 12.5F); + } + } catch (Throwable e) { + if (D1) e.printStackTrace(GT_Log.err); + } + } + if (tFluid.amount <= 0) tFluid = null; } - if (mFluid.amount <= 0) mFluid = null; } } @@ -241,28 +267,31 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ } if (GT_Mod.gregtechproxy.gt6Pipe) mCheckConnections = false; - if (mFluid != null && mFluid.amount > 0) { - int tAmount = Math.max(1, Math.min(mCapacity * 10, mFluid.amount / 2)), tSuccessfulTankAmount = 0; + for (int i = 0, j = aBaseMetaTileEntity.getRandomNumber(mPipeAmount); i < mPipeAmount; i++) { + int index = (i + j) % mPipeAmount; + if (mFluids[index] != null && mFluids[index].amount > 0) { + int tAmount = Math.max(1, Math.min(mCapacity * 10, mFluids[index].amount / 2)), tSuccessfulTankAmount = 0; - for (Entry tEntry : tTanks.entrySet()) - if (tEntry.getKey().fill(tEntry.getValue(), drain(tAmount, false), false) > 0) - tSuccessfulTankAmount++; + for (Entry tEntry : tTanks.entrySet()) + if (tEntry.getKey().fill(tEntry.getValue(), drainFromIndex(tAmount, false, index), false) > 0) + tSuccessfulTankAmount++; - if (tSuccessfulTankAmount > 0) { - if (tAmount >= tSuccessfulTankAmount) { - tAmount /= tSuccessfulTankAmount; - for (Entry tTileEntity : tTanks.entrySet()) { - if (mFluid == null || mFluid.amount <= 0) break; - int tFilledAmount = tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tAmount, false), false); - if (tFilledAmount > 0) - tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tFilledAmount, true), true); - } - } else { - for (Entry tTileEntity : tTanks.entrySet()) { - if (mFluid == null || mFluid.amount <= 0) break; - int tFilledAmount = tTileEntity.getKey().fill(tTileEntity.getValue(), drain(mFluid.amount, false), false); - if (tFilledAmount > 0) - tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tFilledAmount, true), true); + if (tSuccessfulTankAmount > 0) { + if (tAmount >= tSuccessfulTankAmount) { + tAmount /= tSuccessfulTankAmount; + for (Entry tTileEntity : tTanks.entrySet()) { + if (mFluids[index] == null || mFluids[index].amount <= 0) break; + int tFilledAmount = tTileEntity.getKey().fill(tTileEntity.getValue(), drain(tAmount, false), false); + if (tFilledAmount > 0) + tTileEntity.getKey().fill(tTileEntity.getValue(), drainFromIndex(tFilledAmount, true, index), true); + } + } else { + for (Entry tTileEntity : tTanks.entrySet()) { + if (mFluids[index] == null || mFluids[index].amount <= 0) break; + int tFilledAmount = tTileEntity.getKey().fill(tTileEntity.getValue(), drainFromIndex(mFluids[index].amount, false, index), false); + if (tFilledAmount > 0) + tTileEntity.getKey().fill(tTileEntity.getValue(), drainFromIndex(tFilledAmount, true, index), true); + } } } } @@ -284,15 +313,21 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ if ((mDisableInput & tMask) != 0) { mDisableInput &= ~tMask; GT_Utility.sendChatToPlayer(aPlayer, trans("212", "Input enabled")); + if ((mConnections & tMask) == 0) + connect(tSide); } else { mDisableInput |= tMask; GT_Utility.sendChatToPlayer(aPlayer, trans("213", "Input disabled")); } } else { - if ((mConnections & tMask) == 0) - connect(tSide); - else + if ((mConnections & tMask) == 0) { + if (connect(tSide) > 0) + GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); + } + else { disconnect(tSide); + GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); + } } return true; } @@ -346,10 +381,10 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ } if (rConnect > 0) { if (GT_Mod.gregtechproxy.gt6Pipe && tFluidPipe != null) { - if ((mDisableInput == 0 || (tFluidPipe.mDisableInput & (1 << tSide)) == 0)) { + if ((mDisableInput & (1 << aSide)) == 0 || (tFluidPipe.mDisableInput & (1 << tSide)) == 0) { mConnections |= (1 << aSide); if ((tFluidPipe.mConnections & (1 << tSide)) == 0) tFluidPipe.connect(tSide); - } + } else rConnect = 0; } else { mConnections |= (1 << aSide); } @@ -370,7 +405,25 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public final int getCapacity() { - return mCapacity * 20; + return mCapacity * 20 * mPipeAmount; + } + + @Override + public FluidTankInfo getInfo() { + for (FluidStack tFluid : mFluids) { + if (tFluid != null) + return new FluidTankInfo(tFluid, mCapacity * 20); + } + return new FluidTankInfo(null, mCapacity * 20); + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; + ArrayList tList = new ArrayList<>(); + for (FluidStack tFluid : mFluids) + tList.add(new FluidTankInfo(tFluid, mCapacity * 20)); + return tList.toArray(new FluidTankInfo[mPipeAmount]); } @Override @@ -385,46 +438,72 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public final FluidStack getFluid() { - return mFluid; + for (FluidStack tFluid : mFluids) { + if (tFluid != null) + return tFluid; + } + return null; } @Override public final int getFluidAmount() { - return mFluid != null ? mFluid.amount : 0; + int rAmount = 0; + for (FluidStack tFluid : mFluids) { + if (tFluid != null) + rAmount += tFluid.amount; + } + return rAmount; } @Override public final int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { if (aFluid == null || aFluid.getFluid().getID() <= 0) return 0; - if (mFluid == null || mFluid.getFluid().getID() <= 0) { - if (aFluid.amount <= getCapacity()) { + int index = -1; + for (int i = 0; i < mPipeAmount; i++) { + if (mFluids[i] != null && mFluids[i].isFluidEqual(aFluid)) { + index = i; break; + } + else if ((mFluids[i] == null || mFluids[i].getFluid().getID() <= 0) && index < 0) { + index = i; + } + } + + return fill_default_intoIndex(aSide, aFluid, doFill, index); + } + + private final int fill_default_intoIndex(ForgeDirection aSide, FluidStack aFluid, boolean doFill, int index) { + if (index < 0 || index >= mPipeAmount) return 0; + if (aFluid == null || aFluid.getFluid().getID() <= 0) return 0; + + if (mFluids[index] == null || mFluids[index].getFluid().getID() <= 0) { + if (aFluid.amount * mPipeAmount <= getCapacity()) { if (doFill) { - mFluid = aFluid.copy(); + mFluids[index] = aFluid.copy(); mLastReceivedFrom |= (1 << aSide.ordinal()); } return aFluid.amount; } if (doFill) { - mFluid = aFluid.copy(); + mFluids[index] = aFluid.copy(); mLastReceivedFrom |= (1 << aSide.ordinal()); - mFluid.amount = getCapacity(); + mFluids[index].amount = getCapacity() / mPipeAmount; } - return getCapacity(); + return getCapacity() / mPipeAmount; } - if (!mFluid.isFluidEqual(aFluid)) return 0; + if (!mFluids[index].isFluidEqual(aFluid)) return 0; - int space = getCapacity() - mFluid.amount; + int space = getCapacity() / mPipeAmount - mFluids[index].amount; if (aFluid.amount <= space) { if (doFill) { - mFluid.amount += aFluid.amount; + mFluids[index].amount += aFluid.amount; mLastReceivedFrom |= (1 << aSide.ordinal()); } return aFluid.amount; } if (doFill) { - mFluid.amount = getCapacity(); + mFluids[index].amount = getCapacity() / mPipeAmount; mLastReceivedFrom |= (1 << aSide.ordinal()); } return space; @@ -432,25 +511,35 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public final FluidStack drain(int maxDrain, boolean doDrain) { - if (mFluid == null) return null; - if (mFluid.amount <= 0) { - mFluid = null; + FluidStack drained = null; + for (int i = 0; i < mPipeAmount; i++) { + if ((drained = drainFromIndex(maxDrain, doDrain, i)) != null) + return drained; + } + return null; + } + + private final FluidStack drainFromIndex(int maxDrain, boolean doDrain, int index) { + if (index < 0 || index >= mPipeAmount) return null; + if (mFluids[index] == null) return null; + if (mFluids[index].amount <= 0) { + mFluids[index] = null; return null; } int used = maxDrain; - if (mFluid.amount < used) - used = mFluid.amount; + if (mFluids[index].amount < used) + used = mFluids[index].amount; if (doDrain) { - mFluid.amount -= used; + mFluids[index].amount -= used; } - FluidStack drained = mFluid.copy(); + FluidStack drained = mFluids[index].copy(); drained.amount = used; - if (mFluid.amount <= 0) { - mFluid = null; + if (mFluids[index].amount <= 0) { + mFluids[index] = null; } return drained; @@ -458,15 +547,23 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ @Override public int getTankPressure() { - return (mFluid == null ? 0 : mFluid.amount) - (getCapacity() / 2); + return getFluidAmount() - (getCapacity() / 2); } @Override public String[] getDescription() { - return new String[]{ - EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, - EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY - }; + if (mPipeAmount == 1) { + return new String[]{ + EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, + EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY + }; + } else { + return new String[]{ + EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, + EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY, + EnumChatFormatting.AQUA + "Pipe Amount: %%%" + mPipeAmount + EnumChatFormatting.GRAY + }; + } } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index 8a094a1b..c471b2d2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -194,10 +194,14 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (GT_Mod.gregtechproxy.gt6Pipe) { byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); - if ((mConnections & (1 << tSide)) == 0) - connect(tSide); - else + if ((mConnections & (1 << tSide)) == 0) { + if (connect(tSide) > 0) + GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected")); + } + else { disconnect(tSide); + GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected")); + } return true; } return false; diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index 59a24ef4..ed874e61 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -317,6 +317,10 @@ public class GT_LanguageManager { // addStringLocalization("Interaction_DESCRIPTION_Index_209", "Grab"); // addStringLocalization("Interaction_DESCRIPTION_Index_210", "Grab"); addStringLocalization("Interaction_DESCRIPTION_Index_211", "Items per side: "); + addStringLocalization("Interaction_DESCRIPTION_Index_212", "Input enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_213", "Input disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_214", "Connected"); + addStringLocalization("Interaction_DESCRIPTION_Index_215", "Disconnected"); } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java index 90d3a09e..c0ac4250 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java @@ -1,5 +1,6 @@ package gregtech.loaders.oreprocessing; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SubTag; @@ -19,6 +20,8 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr OrePrefixes.pipeRestrictiveMedium.add(this); OrePrefixes.pipeRestrictiveSmall.add(this); OrePrefixes.pipeRestrictiveTiny.add(this); + OrePrefixes.pipeQuadruple.add(this); + OrePrefixes.pipeNonuple.add(this); } @Override @@ -44,6 +47,15 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr case pipeRestrictiveTiny: gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Restrictive", ""), null, 1L, false, true), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, aPrefix.mSecondaryMaterial.mAmount / OrePrefixes.ring.mMaterialAmount), GT_Utility.copyAmount(1L, new Object[]{aStack}), (int) (aPrefix.mSecondaryMaterial.mAmount * 400L / OrePrefixes.ring.mMaterialAmount), 4); break; + case pipeQuadruple: + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, new Object[]{aStack}), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PP ", "PP ", " ", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 1L, false, true)}); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 4L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 4), GT_Utility.copyAmount(1L, new Object[]{aStack}), 40 ,8); + break; + case pipeNonuple: + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, new Object[]{aStack}), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "PPP", "PPP", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 1L, false, true)}); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 9L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 9), GT_Utility.copyAmount(1L, new Object[]{aStack}), 60 ,8); + break; + } } } \ No newline at end of file diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index fa1d85ae..b3ecc140 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1424,6 +1424,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5173, "GT_Pipe_Plastic_Large", "Large Plastic Fluid Pipe", 0.75F, Materials.Plastic, 720, 350, true).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5174, "GT_Pipe_Plastic_Huge", "Huge Plastic Fluid Pipe", 0.875F, Materials.Plastic, 1440, 350, true).getStackForm(1L)); generateFluidPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5175, 480, 600, true); + generateFluidMultiPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5200, 480, 600, true); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Ultimate, 1L), 300, 96); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1L), 400, 148); @@ -1649,4 +1650,9 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 3, "GT_Pipe_" + name + "_Large", "Large " + displayName + " Fluid Pipe", 0.75F, aMaterial, baseCapacity * 2, heatCapacity, gasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 4, "GT_Pipe_" + name + "_Huge", "Huge " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity * 4, heatCapacity, gasProof).getStackForm(1L)); } + + private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ + GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 9).getStackForm(1L)); + } } diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..1fa5d941425aa2f6963036c7ead92fd7767b8e60 GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqij_sSey-;TU`T07hf325$qP$<=!i3(L z8PPYyJ92yiZa;d+4Co*8Sc$e_7`3Z5myC#}6Cu zyxx@-S@zGa|M8ECKccQ5ORfIK=pA6XTN-&X+k1f m>Ak!kKv!M6^}pZzgK)i)-yXI2U8=y)WbkzLb6Mw<&;$U0GP~*k literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a1bac9183e0319bb171936439657926b028c3 GIT binary patch literal 497 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{Pf0{UR5(vv zlkJYeAP_})Z`b!T#`qCqj8U9t&OMN-Cyy)vl&k6q+J(W2@CFvb2$9o-6vb>pHevE~%D{E#*P}i-au}i^%d6S-wJl z1^5?{M!9A17WICN91LTIR nF(1qndw|`+z99fyj{m|hVz&aw79~Zt00000NkvXXu0mjf;kneC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/pipeQuadruple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/pipeQuadruple.png new file mode 100644 index 0000000000000000000000000000000000000000..343e8ff5b8775abd1c888fc61d9e2c5d0b69c85a GIT binary patch literal 521 zcmV+k0`~ohP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ1Qro6 z4>k{*SpWb47<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{XGugsR5(v% zlUs|zFcgII4@D70^g$3r^pA>&7eqt^?IlgqHf?De5iDu~PJ<1puB@@2}TlwlYu zrL@**nifT2jH#;XdcEH7_viEZ`~PD?h}mp5oleK&@n|#}4u^xmpsIdMX{e4_#yOu% zCg1K}uZKg5qNI8~;5g2=yWj73yWO%Vvpl1EJz!bZCkfo0PN&^&!;Sk;y&gE9&+pvt z-Eg;BE!Y#CQ2p_Eu+!=E?QS-kjYcC$l32x52RC*+9s#j5rp}$^sZNtbD;0-P6a<0q zOW_Ibao2He%f8)i>~J`MAn@mTj@%l%V--bF7=*rjxw+>$j&0i)>w?v6zu!~dK^REs zQysY3ZnvYnC6f4p>IlNN+b!iSgy(UO>RFbt)oMj~zjC`&N8i|Txum=u*TpTVj*ha$ zVnKPonNS_QX7l+RGdO3xUT-!VFaS5O#{1w+(F1e`eM3jlYy1m;3-Qj(sW%bs00000 LNkvXXu0mjfwBX|x literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/pipeNonuple.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/pipeNonuple.png new file mode 100644 index 0000000000000000000000000000000000000000..1fa5d941425aa2f6963036c7ead92fd7767b8e60 GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqij_sSey-;TU`T07hf325$qP$<=!i3(L z8PPYyJ92yiZa;d+4Co*8Sc$e_7`3Z5myC#}6Cu zyxx@-S@zGa|M8ECKccQ5ORfIK=pA6XTN-&X+k1f m>Ak!kKv!M6^}pZzgK)i)-yXI2U8=y)WbkzLb6Mw<&;$U0GP~*k literal 0 HcmV?d00001 From 77c639c8fbbfd3e7865d1d016158b7afb4257fc4 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 30 Oct 2017 16:24:09 +0800 Subject: [PATCH 04/33] Fix ItemPipe tick time customization --- .../GT_MetaPipeEntity_Item.java | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index c471b2d2..a2332f0b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -47,21 +47,21 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE } public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) { - super(aID, aName, aNameRegional, aInvSlotCount); - mIsRestrictive = aIsRestrictive; - mThickNess = aThickNess; - mMaterial = aMaterial; - mStepSize = aStepSize; - mTickTime = 20; + this(aID, aName, aNameRegional, aThickNess, aMaterial, aInvSlotCount, aStepSize, aIsRestrictive, 20); } + @Deprecated public GT_MetaPipeEntity_Item(String aName, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) { - super(aName, aInvSlotCount); + this(aName, aThickNess, aMaterial, aInvSlotCount, aStepSize, aIsRestrictive, 20); + } + + public GT_MetaPipeEntity_Item(String aName, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive, int aTickTime) { + super(aName, aInvSlotCount); mIsRestrictive = aIsRestrictive; mThickNess = aThickNess; mMaterial = aMaterial; mStepSize = aStepSize; - mTickTime = 20; + mTickTime = aTickTime; } @Override @@ -71,7 +71,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaPipeEntity_Item(mName, mThickNess, mMaterial, mInventory.length, mStepSize, mIsRestrictive); + return new GT_MetaPipeEntity_Item(mName, mThickNess, mMaterial, mInventory.length, mStepSize, mIsRestrictive, mTickTime); } @Override @@ -180,7 +180,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE tPipeList.add(tTileEntity); while (!temp && !isInventoryEmpty() && tTileEntity.sendItemStack(aBaseMetaTileEntity)) for (IMetaTileEntityItemPipe tPipe : tPipeList) - if (!tPipe.incrementTransferCounter(1)) temp = false; + if (!tPipe.incrementTransferCounter(1)) temp = true; } } } @@ -334,7 +334,12 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public String[] getDescription() { - return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", "Routing Value: %%%" + mStepSize}; + if (mTickTime == 20) + return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", "Routing Value: %%%" + mStepSize}; + else if (mTickTime % 20 == 0) + return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + (mTickTime / 20) + "%%% sec", "Routing Value: %%%" + mStepSize}; + else + return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + mTickTime + "%%% ticks", "Routing Value: %%%" + mStepSize}; } private boolean isInventoryEmpty() { From 1e8189e5f9a984f962d64fe92883a564d0d92569 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 30 Oct 2017 16:34:12 +0800 Subject: [PATCH 05/33] Add all the Multi-pipes --- .../loaders/preload/GT_Loader_MetaTileEntities.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index b3ecc140..d0e6b431 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1424,7 +1424,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5173, "GT_Pipe_Plastic_Large", "Large Plastic Fluid Pipe", 0.75F, Materials.Plastic, 720, 350, true).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(Materials.Plastic), new GT_MetaPipeEntity_Fluid(5174, "GT_Pipe_Plastic_Huge", "Huge Plastic Fluid Pipe", 0.875F, Materials.Plastic, 1440, 350, true).getStackForm(1L)); generateFluidPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5175, 480, 600, true); - generateFluidMultiPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5200, 480, 600, true); + generateFluidMultiPipes(Materials.Copper, Materials.Copper.mName, "Copper", 5200, 60, 1000, true); + generateFluidMultiPipes(Materials.Bronze, Materials.Bronze.mName, "Bronze", 5205, 120, 2000, true); + generateFluidMultiPipes(Materials.Steel, Materials.Steel.mName, "Steel", 5210, 240, 2500, true); + generateFluidMultiPipes(Materials.StainlessSteel, Materials.StainlessSteel.mName, "StainlessSteel", 5215, 360, 3000, true); + generateFluidMultiPipes(Materials.Titanium, Materials.Titanium.mName, "Titanium", 5220, 480, 5000, true); + generateFluidMultiPipes(Materials.TungstenSteel, Materials.TungstenSteel.mName, "Bronze", 5225, 600, 7500, true); + generateFluidMultiPipes(Materials.Plastic, Materials.Plastic.mName, "Plastic", 5230, 360, 350, true); + generateFluidMultiPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5235, 480, 600, true); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_EV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Ultimate, 1L), 300, 96); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1L), 400, 148); @@ -1653,6 +1660,6 @@ public class GT_Loader_MetaTileEntities implements Runnable { private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 9).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); } } From 78aa11bd38ae3229c89f348034d165fb9a5c631c Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 30 Oct 2017 19:17:00 +0800 Subject: [PATCH 06/33] Another config to control wire connections, and disable them by default. --- src/main/java/gregtech/GT_Mod.java | 5 ++-- .../metatileentity/IConnectable.java | 2 +- .../GT_MetaPipeEntity_Cable.java | 23 +++++++++++++++---- src/main/java/gregtech/common/GT_Proxy.java | 3 ++- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 9c07457a..cfcc38a6 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -280,8 +280,9 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.enableBasaltOres = GregTech_API.sWorldgenFile.get("general", "enableBasaltOres", gregtechproxy.enableBasaltOres); gregtechproxy.enableGCOres = GregTech_API.sWorldgenFile.get("general", "enableGCOres", gregtechproxy.enableGCOres); gregtechproxy.enableUBOres = GregTech_API.sWorldgenFile.get("general", "enableUBOres", gregtechproxy.enableUBOres); - gregtechproxy.gt6Pipe = tMainConfig.get("general", "GT6StyledPipesAndWiresConnection", true).getBoolean(true); - gregtechproxy.costlyCableConnection = tMainConfig.get("general", "CableConnectionRequiresSolderingMaterial", true).getBoolean(true); + gregtechproxy.gt6Pipe = tMainConfig.get("general", "GT6StyledPipesConnection", true).getBoolean(true); + gregtechproxy.gt6Cable = tMainConfig.get("general", "GT6StyledWiresConnection", false).getBoolean(false); + gregtechproxy.costlyCableConnection = tMainConfig.get("general", "CableConnectionRequiresSolderingMaterial", false).getBoolean(false); Materials[] tDisableOres = new Materials[]{Materials.Chrome, Materials.Naquadria, Materials.Silicon, Materials.Cobalt, Materials.Cadmium, Materials.Indium, Materials.Tungsten, Materials.Adamantium, Materials.Mithril, Materials.DarkIron, Materials.Rutile, Materials.Alduorite, Materials.Magnesium, Materials.Nikolite}; diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index db8e812c..c1391371 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -1,7 +1,7 @@ package gregtech.api.interfaces.metatileentity; /** - * For pipes, wires, and other MetaTiles which should be decided whether they should connect to the block at each side. + * For pipes, wires, and other MetaTiles which need to be decided whether they should connect to the block at each side. */ public interface IConnectable { /** diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index 1885b2f8..d8b03ccf 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -44,7 +44,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile public long mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredVoltageLast20 = 0; public long mRestRF; public short mOverheat; - private boolean mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe; + private boolean mCheckConnections = !GT_Mod.gregtechproxy.gt6Cable; public GT_MetaPipeEntity_Cable(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) { super(aID, aName, aNameRegional, 0); @@ -247,7 +247,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile for (byte i = 0; i < 6; i++) { if ((mCheckConnections || (mConnections & (1 << i)) != 0) && connect(i) <= 0) disconnect(i); } - if (GT_Mod.gregtechproxy.gt6Pipe) mCheckConnections = false; + if (GT_Mod.gregtechproxy.gt6Cable) mCheckConnections = false; } }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); } @@ -263,7 +263,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile } private boolean onConnectionToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Mod.gregtechproxy.gt6Pipe) { + if (GT_Mod.gregtechproxy.gt6Cable) { byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); if ((mConnections & (1 << tSide)) == 0) { if (GT_Mod.gregtechproxy.costlyCableConnection && !GT_ModHandler.consumeSolderingMaterial(aPlayer)) return false; @@ -308,6 +308,19 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile return rConnect; } + @Override + public void disconnect(byte aSide) { + if (aSide >= 6) return; + mConnections &= ~(1 << aSide); + if (GT_Mod.gregtechproxy.gt6Cable) { + byte tSide = GT_Utility.getOppositeSide(aSide); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); + if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) != 0) + ((MetaPipeEntity) tPipe).disconnect(tSide); + } + } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; @@ -335,13 +348,13 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public void saveNBTData(NBTTagCompound aNBT) { - if (GT_Mod.gregtechproxy.gt6Pipe) + if (GT_Mod.gregtechproxy.gt6Cable) aNBT.setByte("mConnections", mConnections); } @Override public void loadNBTData(NBTTagCompound aNBT) { - if (GT_Mod.gregtechproxy.gt6Pipe) { + if (GT_Mod.gregtechproxy.gt6Cable) { if (!aNBT.hasKey("mConnections")) mCheckConnections = true; mConnections = aNBT.getByte("mConnections"); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 2541ec4e..83e53968 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -202,7 +202,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean enableGCOres = true; public boolean enableUBOres = true; public boolean gt6Pipe = true; - public boolean costlyCableConnection = true; + public boolean gt6Cable = false; + public boolean costlyCableConnection = false; public GT_Proxy() { GameRegistry.registerFuelHandler(this); From c648ac6ef07ec0e03813d47f1e788cd2d0d546a4 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Tue, 31 Oct 2017 01:39:13 +0800 Subject: [PATCH 07/33] Visualize fluid pipe input restriction --- .../java/gregtech/api/enums/Textures.java | 4 +- .../GT_MetaPipeEntity_Fluid.java | 74 +++++++++++++----- .../preload/GT_Loader_MetaTileEntities.java | 4 +- .../blocks/iconsets/PIPE_RESTRICTOR_DL.png | Bin 0 -> 410 bytes .../blocks/iconsets/PIPE_RESTRICTOR_DOWN.png | Bin 0 -> 309 bytes .../blocks/iconsets/PIPE_RESTRICTOR_DR.png | Bin 0 -> 406 bytes .../blocks/iconsets/PIPE_RESTRICTOR_LEFT.png | Bin 0 -> 316 bytes .../blocks/iconsets/PIPE_RESTRICTOR_LR.png | Bin 0 -> 428 bytes .../blocks/iconsets/PIPE_RESTRICTOR_ND.png | Bin 0 -> 499 bytes .../blocks/iconsets/PIPE_RESTRICTOR_NL.png | Bin 0 -> 493 bytes .../blocks/iconsets/PIPE_RESTRICTOR_NR.png | Bin 0 -> 498 bytes .../blocks/iconsets/PIPE_RESTRICTOR_NU.png | Bin 0 -> 499 bytes .../blocks/iconsets/PIPE_RESTRICTOR_RIGHT.png | Bin 0 -> 320 bytes .../blocks/iconsets/PIPE_RESTRICTOR_UD.png | Bin 0 -> 408 bytes .../blocks/iconsets/PIPE_RESTRICTOR_UL.png | Bin 0 -> 398 bytes .../blocks/iconsets/PIPE_RESTRICTOR_UP.png | Bin 0 -> 302 bytes .../blocks/iconsets/PIPE_RESTRICTOR_UR.png | Bin 0 -> 408 bytes 17 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DL.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DOWN.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DR.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_LEFT.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_LR.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_ND.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_NL.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_NR.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_NU.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_RIGHT.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UD.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UL.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UP.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UR.png diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index f60fa257..ffde4650 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -103,7 +103,9 @@ public class Textures { OVERLAY_FRONT_PROCESSING_ARRAY, OVERLAY_FRONT_OIL_DRILL_ACTIVE, OVERLAY_FRONT_OIL_DRILL, OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE, OVERLAY_FRONT_DIESEL_ENGINE, OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE, OVERLAY_FRONT_PYROLYSE_OVEN, OVERLAY_FRONT_OIL_CRACKER_ACTIVE, OVERLAY_FRONT_OIL_CRACKER, OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE, OVERLAY_FRONT_DISTILLATION_TOWER, OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE, OVERLAY_FRONT_ASSEMBLY_LINE, OVERLAY_FRONT_ORE_DRILL_ACTIVE, OVERLAY_FRONT_ORE_DRILL, OVERLAY_TOP_CLEANROOM_ACTIVE, OVERLAY_TOP_CLEANROOM, - OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR, OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE; + OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR, OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE, + PIPE_RESTRICTOR_UP, PIPE_RESTRICTOR_DOWN, PIPE_RESTRICTOR_LEFT, PIPE_RESTRICTOR_RIGHT, PIPE_RESTRICTOR_NU, PIPE_RESTRICTOR_ND, PIPE_RESTRICTOR_NL, PIPE_RESTRICTOR_NR, + PIPE_RESTRICTOR_UD, PIPE_RESTRICTOR_UL, PIPE_RESTRICTOR_UR, PIPE_RESTRICTOR_DL, PIPE_RESTRICTOR_DR, PIPE_RESTRICTOR_LR; /** * Icon for Fresh CFoam diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index 6ebc0ff4..0126d422 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -87,27 +87,63 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount); } + protected static final byte[][] sRestrictionArray = new byte[][]{ + {2, 3, 5, 4}, + {2, 3, 4, 5}, + {1, 0, 4, 5}, + {1, 0, 4, 5}, + {1, 0, 2, 3}, + {1, 0, 2, 3}}; + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - if (aConnected) { - float tThickNess = getThickNess(); - if (tThickNess < 0.124F) - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.374F)//0.375 - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.499F)//0.500 - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.749F)//0.750 - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.874F)//0.825 - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (mPipeAmount == 4) - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (mPipeAmount == 9) - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - } - return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + float tThickNess = getThickNess(); + if (mDisableInput == 0) return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + byte tMask = 0; + if (aSide >= 0 && aSide < 6) for (byte i = 0; i < 4; i++) if ((mDisableInput & (1 << sRestrictionArray[aSide][i])) != 0) tMask |= 1 << i; + return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)}; + } + + protected static final ITexture getBaseTexture(float aThickNess, int aPipeAmount, Materials aMaterial, byte aColorIndex) { + if (aPipeAmount >= 9) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aPipeAmount >= 4) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.124F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.374F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.499F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.749F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.874F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + } + + protected static final ITexture getRestrictorTexture(byte aMask) { + switch (aMask) { + case 1: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UP); + case 2: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DOWN); + case 3: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UD); + case 4: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_LEFT); + case 5: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UL); + case 6: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DL); + case 7: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NR); + case 8: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_RIGHT); + case 9: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UR); + case 10: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DR); + case 11: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NL); + case 12: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_LR); + case 13: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_ND); + case 14: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NU); + case 15: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR); + default: return null; + } + } + + @Override + public void onValueUpdate(byte aValue) { + mDisableInput = aValue; + } + + @Override + public byte getUpdateData() { + return mDisableInput; } @Override diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index d0e6b431..710bd3a6 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1659,7 +1659,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { } private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.9F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.9F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); } } diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DL.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DL.png new file mode 100644 index 0000000000000000000000000000000000000000..766311a9524370715ed492d784206945421394b6 GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqd|^E{-7<{&O#H%xX>$VNHu$3_51x?@ZH_>$7Rn69xFUzz$38Y z_+kD@F6_Vdwd^>bP0l+XkKPClEq literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DOWN.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_DOWN.png new file mode 100644 index 0000000000000000000000000000000000000000..285fbf58e83ab4c4c29f0f659ea587068ae55052 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqj~^E{-7<{%d zpq_w&K*8jK#scX!?M)G_%0!|M?LR*8nK1Bt^aDB2-_YR(< x;^^fmbKK>5hXD^~6T|-}k7f7XeK9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqek9E{-7<{&O!GW;X{2uz&cz@Y2DDqC77Y zt~50B@v)U`xY3~GB)6nV@|Qwcf#9P6W<9>bg3b#yJL`Y{;VA$8w{Q1vV>g{bkrSU~ zj+7lcwaI1HvXTceb0?~B%1#JU>Pxoz5PO~D@B}^+-)04l7Y?_#eW;z!R}#y9z4YaQ zx7Q9A%2*ljFz5X4110+p8}L{eoHs6sUCw-ZQ$sPITFZgwFI!fvQrNHZ z>KBu!(AVeL<*xrPJIngKwec0c^5l5(!S|mzeJ>yATI4V-)uKj5VE^%sMI68Xx2&8{ wF>m|6tn~NSnrANST)U68{%Q8-XQ|EhlcM{Y?2l*w!<2!+)78&qol`;+0ClpV(f|Me literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_LEFT.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_LEFT.png new file mode 100644 index 0000000000000000000000000000000000000000..a4e79be13ed9172b61c96323978a5f7c80815910 GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqg2pE{-7<{&UYP4%x;XFA>9W+UL_aJ|&V zpig;9kj;a=?S^ga_s$)>CC(p_{jjZ({nx(sYqQwuUJCgw-TSKX573nip00i_>zopr E0IL3OoB#j- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_LR.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_LR.png new file mode 100644 index 0000000000000000000000000000000000000000..9346841e20dd258552f7ae82d6a07bc2ea1e41c9 GIT binary patch literal 428 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpgmlkE{-7<{!=d-W;YiIuzvU*@N$CV3g>AK zx)A~g9XyzYN(_{o{t2)et0Z`7@hT~WY+!7+u;`djv-7&wg5P)R>@D8ezS_l?d%J0d zvKiC7=Z$So(<9TE6D5-N#x>7cb}+>#k$HCp`|WLxrLoCYb2l{}e%Np|i*;8_-GV(@ zIS(FJ94Xq#GBuSmv^JU9b5erc{N}Dj4eMU#DEJ0Tv@xFA#IyNk5ATyoKHtj@&p(Tc zz2`Oyn0CK@`RWDdFLN%-+|;;g)dCIu1r~jYkz&$6>i^g6Z+~o&vtVbOJY&zI7ZWp| z@rX`n=W20eP&CU~@V?q(5{rCFQhY^tOlifgW(`8q^d R+zA+R44$rjF6*2UngBzKpWy%i literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_ND.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_ND.png new file mode 100644 index 0000000000000000000000000000000000000000..9c759e8446176f8c525f34fcf9255afba3481947 GIT binary patch literal 499 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ2M!E1 zHA{zsEdT%j7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{QAtEWR5(wS zlg(EJKy}BL-+d~x7!WZG{xm|L6Rhh;~2+dg#CVx@H@nMy~bj(z;rrA5Cj;FM(~Cn zT-OD0@_RmyLZN_Su?St)VVWi^%R;qUMZM8LtJQ+t>A>lB;r9FRJP*F_!*Lu?sw#7` z3X;4@FhNH_iQDGNl4SlnpU=^5w?XG~0!`P%fX~$m&1MtC3o{H;4A^WosMTtqD2iSS zla8?4?NBb4L42x8r6L9#4hNJ8)K~8MZ)-f pK9S94L4&~nyPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ2M!E1 zHA{zsEdT%j7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{OG!jQR5(wa zlR<03KoCarqwK*$N+ak&r~w5PL~K1YHdu>TL2N8Fpa&1;;6VfR&%I`I zE);fPkMow9d7pARoj4wk9DJYse$Q^V!}C1W>n~QT6^oArv)PQvWWsnn#;O(0MFZy&1U5R z+wGQ2=2jjctQF!(d*B}qk-gFY5dkfXfHWWo0#sE+5y5x~(!oPx#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+00(qQO+^RZ2M!E1 zHA{zsEdT%j7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{P)S5VR5(wa zQ$1_KP!!FNvV()A3OZykUNx;E~5p1f2SVIjYfAQh; z_g#3~JLi6!bA-#~g7f)|uhR*~;}LNjBMd|Ab^(0f$NGJZ)oO*sVu9IghUs()!!V#v zbZD9efxu7MEb{q0L{Wq!Nswh3l}ZKmdL7MH3!P2}O0NfXFn~51LDzLymIYN+A)Hue z0<#kCdBR`O*wpzRF#Y|n!y!gdD)JN1!Ad2WpCAZ=zn z7W>aVq9{s|O1Yu%U9aExx!sUXry-2TV+@Bw^k4hvzI4%UxAEL)pjxe>TrM-0mLL_S oBrk-2eap07*qoM6N<$f)10(T>t<8 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_NU.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_NU.png new file mode 100644 index 0000000000000000000000000000000000000000..4fdda008b468cf183efcb960ee06c54a9630e986 GIT binary patch literal 499 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpgn<}E{-7<{!=GAW*>48XnpQ}v$=hW+lA%} z9AZ5S64olM3=3&`(8Tsgv2jVn$_}=bjG{I(n%Q};*nfY;_KP_!A>aD`yEE1Odegbj zJvZ)%Oj1dhrRHH~zfwy&AyVwuUptL1rIgK)ce*Xov-~f@wUVU zzINL!O~=@3e%VR&vT5)*i*)Pf9H_B#UmM1pYbHJAbgEgx&X`3(D;vUAi>|t=B`v_h z=(SWRW8)9EziZF2wLJW0S0(txboRolSsNL5-{qV2jpvgM|J$h#l!i_;d^Xn7XDQf#%Cc-_P{Tc;iraSWcWelF{r5}E)=DZm#1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_RIGHT.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_RIGHT.png new file mode 100644 index 0000000000000000000000000000000000000000..87fc09f32ebf3475481df63b88db3bf81a2016f1 GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqhD}E{-7<{&UYPJ|lQIp$yc*mrV2-0Ob5)W*Qh zeM|0XWmdK II;Vst09x*CRsaA1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UD.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UD.png new file mode 100644 index 0000000000000000000000000000000000000000..1fd53d6da35486fac2d59c42f1fcc518b0f6a964 GIT binary patch literal 408 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqg)SY&*vF=|Q5L)s2L|JIi1GYrFq<_nr?NmGg>iT6TfeLTwpOJXmj@sru#3y9De_^N27~l^G%-9nK9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqe+HE{-7<{&Od<i{7 z-h0l+7D*L+FMiAA-d?mWJ0!H#=DebDr$wKlM~&6|g_%+%vF(Wx2EM}6QV$l&+<8~N zV;%ST?}BWMk5n3`2&G0U@i=$*ma1)hAlB=s>kCOlZ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UP.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UP.png new file mode 100644 index 0000000000000000000000000000000000000000..344d254342da6f6877edcc2ead17f5c4a05ebdf8 GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqd^}7sn6_|F;(u`I-$F94^Y`a`3PPHaqeJ z8nXCyMF=|u1qM1B@o)-ruq1VGz571>ZqlOr^`DQF#vYOQIY<3?;fD9tx3_Ivmp?5v zvF@zTWfu;{_qOLO+Y%4h=^m3flD{uivT|Oq2y1Gj($XcXv|jCccF#m(X~h=ZU9Syl p`?pRjl(`tC9OS9M`KR-M_yR7!*=KdV_5t0+;OXk;vd$@?2>@s@WFr6o literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UR.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/PIPE_RESTRICTOR_UR.png new file mode 100644 index 0000000000000000000000000000000000000000..cc316b91d411d78491d89fd98c7b8e0f6a364d1d GIT binary patch literal 408 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p<)L71^VC4M4MkiEpy*OmPqJ0Fj!sdsy`E>K9K#5JNMI6tkV zJh3R1p&&6cuS72|wM4;0&p^+(=h^fCpqg)$X-m}Cl9g$(+QHGg zK%uF_q{%~8X~shPjsypnpd)N9J`0=p_^d2CF5I~@{f4(i`u}+^ZSQQ-neklmu}Pu? z+n3t@ZMlWJ|1MaU9kYMEMi*1%JZ0Zt70)J(t^;gy__Jy zrgQqx?}rT6OFusR&C%!HvRqgqx#O{fqd>#rdzO}m>la9PUS0!ZU6hPmoMjP-ouI3Gmd@SA7`{-Z^Mro wMxzbuv{@V%FxP*#u9&x+`F6$kO^2E1#7>B4U-@k+Fa#JpUHx3vIVCg!0MYT7kN^Mx literal 0 HcmV?d00001 From f6a9bbb2931fe0a640bcf8c8c288a445159875d1 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Wed, 1 Nov 2017 17:10:37 +0800 Subject: [PATCH 08/33] Add the missing condition... --- .../implementations/GT_MetaPipeEntity_Fluid.java | 3 ++- .../gregtech/loaders/preload/GT_Loader_MetaTileEntities.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index 0126d422..7469507f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -298,7 +298,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ case 0: disconnect(tSide); break; case 2: - tTanks.put(aBaseMetaTileEntity.getITankContainerAtSide(tSide), ForgeDirection.getOrientation(tSide).getOpposite()); break; + if ((mLastReceivedFrom & (1 << tSide)) == 0) + tTanks.put(aBaseMetaTileEntity.getITankContainerAtSide(tSide), ForgeDirection.getOrientation(tSide).getOpposite()); break; } } if (GT_Mod.gregtechproxy.gt6Pipe) mCheckConnections = false; diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 710bd3a6..d0e6b431 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1659,7 +1659,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { } private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.9F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.9F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); } } From 682069aa3b8bb06ab63202f9cce83499913ed18a Mon Sep 17 00:00:00 2001 From: Pranav Date: Fri, 3 Nov 2017 22:06:43 -0400 Subject: [PATCH 09/33] Fix the magic energy absorber --- ..._MetaTileEntity_MagicalEnergyAbsorber.java | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index cb4d9886..2ae10062 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.generators; +import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -38,11 +39,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public static boolean sAllowMultipleEggs = true; public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null; public static int sEnergyPerEnderCrystal = 32; - public static int sEnergyFromVis = 12800; + public static int sEnergyFromVis = 512; //really? this high? no wonder no eu was generating... (it was 12800 at the time) public static int sDragonEggEnergyPerTick = 128; public static boolean isThaumcraftLoaded; + public static boolean tLameMode = false; // if you use this... lame. public int mEfficiency; public EntityEnderCrystal mTargetedCrystal; + //public static int[] VoltageOut = {32, 128,512,2048}; // Because what the fuck even is this code. public GT_MetaTileEntity_MagicalEnergyAbsorber(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, "Feasts on magic close to it", new ITexture[0]); @@ -109,34 +112,34 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B // Energyzed node if (isThaumcraftLoaded) { try { + int multFactor = 2; + if (tLameMode){ + multFactor = 10; //Don't do this. Unless you want to be cheaty and lame. + } World tmpWorld = this.getBaseMetaTileEntity().getWorld(); int tmpX = this.getBaseMetaTileEntity().getXCoord(); - int tmpY = this.getBaseMetaTileEntity().getYCoord(); + int tmpY = this.getBaseMetaTileEntity().getYCoord() + 2; //Add 2 because +1 is the node stabiliser and +2 is the node itself int tmpZ = this.getBaseMetaTileEntity().getZCoord(); - int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000); + int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000); // all of these should be 1000 int earth = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.EARTH, 1000); int air = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.AIR, 1000); - int destruction = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000); + int entropy = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000); int order = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ORDER, 1000); int water = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.WATER, 1000); - int visEU = (int) (Math.pow(fire, 4) + Math.pow(earth, 4) + Math.pow(air, 4) + Math.pow(destruction, 4) + Math.pow(order, 4) + Math.pow( - water, 4)); - int mult = 85; - if (fire > 4) - mult += 15; - if (earth > 4) - mult += 15; - if (air > 4) - mult += 15; - if (destruction > 4) - mult += 15; - if (order > 4) - mult += 15; - if (water > 4) - mult += 15; - visEU = (visEU * mult) / 100; - getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU * getEfficiency() / this.sEnergyFromVis), false); + int visEU = (int) (Math.pow(fire, 2) + Math.pow(earth, 2) + Math.pow(air, 2) + Math.pow(entropy, 2) + Math.pow(order, 2) + Math.pow(water, 2)); + int mult = 0; //this should make it more dependant on how big your node is + mult += fire * multFactor; + mult += earth * multFactor; + mult += air * multFactor; + mult += entropy * multFactor; + mult += order * multFactor; + mult += water * multFactor; + visEU = (visEU * mult) / 100; + + getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU * getEfficiency() / sEnergyFromVis), false); + } catch (Throwable e) { + } } // EnderCrystal From 5bfe5a55c8b0727c8f181eef712e400b48d8f88d Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Sat, 4 Nov 2017 11:32:42 -0400 Subject: [PATCH 10/33] Clean up code --- .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index 2ae10062..72974432 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -39,13 +39,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public static boolean sAllowMultipleEggs = true; public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null; public static int sEnergyPerEnderCrystal = 32; - public static int sEnergyFromVis = 512; //really? this high? no wonder no eu was generating... (it was 12800 at the time) + public static int sEnergyFromVis = 512; public static int sDragonEggEnergyPerTick = 128; public static boolean isThaumcraftLoaded; - public static boolean tLameMode = false; // if you use this... lame. public int mEfficiency; public EntityEnderCrystal mTargetedCrystal; - //public static int[] VoltageOut = {32, 128,512,2048}; // Because what the fuck even is this code. public GT_MetaTileEntity_MagicalEnergyAbsorber(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, "Feasts on magic close to it", new ITexture[0]); @@ -113,9 +111,6 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (isThaumcraftLoaded) { try { int multFactor = 2; - if (tLameMode){ - multFactor = 10; //Don't do this. Unless you want to be cheaty and lame. - } World tmpWorld = this.getBaseMetaTileEntity().getWorld(); int tmpX = this.getBaseMetaTileEntity().getXCoord(); int tmpY = this.getBaseMetaTileEntity().getYCoord() + 2; //Add 2 because +1 is the node stabiliser and +2 is the node itself @@ -297,4 +292,4 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public int getPollution() { return 0; } -} \ No newline at end of file +} From 8c80a050ca47b8582164e44b39365836021a51cc Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Sun, 5 Nov 2017 12:44:51 -0500 Subject: [PATCH 11/33] Fix small bug with block position --- .../generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index 72974432..2e4fe229 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -113,7 +113,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B int multFactor = 2; World tmpWorld = this.getBaseMetaTileEntity().getWorld(); int tmpX = this.getBaseMetaTileEntity().getXCoord(); - int tmpY = this.getBaseMetaTileEntity().getYCoord() + 2; //Add 2 because +1 is the node stabiliser and +2 is the node itself + int tmpY = this.getBaseMetaTileEntity().getYCoord(); int tmpZ = this.getBaseMetaTileEntity().getZCoord(); int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000); // all of these should be 1000 int earth = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.EARTH, 1000); From 6bc98744ecc5bff7ad0def905ce74f3ab2356243 Mon Sep 17 00:00:00 2001 From: Pranav Date: Sun, 5 Nov 2017 17:18:31 -0500 Subject: [PATCH 12/33] Add Gasoline --- src/main/java/gregtech/api/enums/Materials.java | 5 ++++- .../loaders/postload/GT_MachineRecipeLoader.java | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 9473bbdd..01814c5b 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -745,7 +745,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC, 14.0F, 3000, 4, 1|2|64|128, 102, 0, 51, 0, "HSSS", "HSS-S", 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))); public static Materials DilutedSulfuricAcid = new MaterialBuilder(640, TextureSet.SET_FLUID, "Diluted Sulfuric Acid").addCell().addFluid().setRGB(192, 120, 32).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(SulfuricAcid, 1)).constructMaterial(); public static Materials EpoxidFiberReinforced = new Materials(610, TextureSet.SET_DULL,3.0F, 64, 1, 1|2|64|128, 160, 112, 16, 0, "EpoxidFiberReinforced", "Fiber-Reinforced Epoxy Resin", 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBrown, 2, Arrays.asList(new MaterialStack(Epoxid, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - + public static Materials Octane = new MaterialBuilder(995, TextureSet.SET_FLUID, "Octane").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setFuelType(MaterialBuilder.DIESEL).setFuelPower(80).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 18)).constructMaterial(); + public static Materials GasolineRaw = new MaterialBuilder(996, TextureSet.SET_FLUID, "Raw Gasoline").addCell().addFluid().setRGB(255,100,0).setColor(Dyes.dyeOrange).constructMaterial(); + public static Materials GasolineRegular = new MaterialBuilder(997, TextureSet.SET_FLUID, "Regular Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(384).constructMaterial(); + public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID, "Premium Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(640).constructMaterial(); /** * Materials which are renamed automatically diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 56f9031a..969ed88c 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -3326,13 +3326,13 @@ if(Loader.isModLoaded("Railcraft")){ Materials.Carbon.getDustTiny(3), 120, 120); GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getLightlyHydroCracked(1000), - new FluidStack[]{Materials.Naphtha.getFluid(800), Materials.Butane.getGas(150), Materials.Propane.getGas(200), Materials.Ethane.getGas(125), Materials.Methane.getGas(125)}, + new FluidStack[]{Materials.Naphtha.getFluid(800), Materials.Octane.getFluid(100), Materials.Butane.getGas(150), Materials.Propane.getGas(200), Materials.Ethane.getGas(125), Materials.Methane.getGas(125)}, GT_Values.NI, 120, 120); GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getModeratelyHydroCracked(1000), - new FluidStack[]{Materials.Naphtha.getFluid(500), Materials.Butane.getGas(200), Materials.Propane.getGas(1100), Materials.Ethane.getGas(400), Materials.Methane.getGas(400)}, + new FluidStack[]{Materials.Naphtha.getFluid(500), Materials.Octane.getFluid(50), Materials.Butane.getGas(200), Materials.Propane.getGas(1100), Materials.Ethane.getGas(400), Materials.Methane.getGas(400)}, GT_Values.NI, 120, 120); GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getSeverelyHydroCracked(1000), - new FluidStack[]{Materials.Naphtha.getFluid(200), Materials.Butane.getGas(125), Materials.Propane.getGas(125), Materials.Ethane.getGas(1500), Materials.Methane.getGas(1500)}, + new FluidStack[]{Materials.Naphtha.getFluid(200), Materials.Octane.getFluid(20), Materials.Butane.getGas(125), Materials.Propane.getGas(125), Materials.Ethane.getGas(1500), Materials.Methane.getGas(1500)}, GT_Values.NI, 120, 120); GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getLightlySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(150), Materials.Naphtha.getFluid(400), Materials.Toluene.getFluid(40), Materials.Benzene.getFluid(200), Materials.Butene.getGas(75), @@ -3346,6 +3346,7 @@ if(Loader.isModLoaded("Railcraft")){ new FluidStack[]{Materials.HeavyFuel.getFluid(50), Materials.Naphtha.getFluid(100), Materials.Toluene.getFluid(30), Materials.Benzene.getFluid(150), Materials.Butene.getGas(65), Materials.Butadiene.getGas(50), Materials.Propane.getGas(50), Materials.Propene.getGas(250), Materials.Ethane.getGas(50), Materials.Ethylene.getGas(250), Materials.Methane.getGas(250)}, Materials.Carbon.getDustTiny(3), 120, 120); + GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getLightlyHydroCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(600), Materials.Naphtha.getFluid(100), Materials.Butane.getGas(100), Materials.Propane.getGas(100), Materials.Ethane.getGas(75), Materials.Methane.getGas(75)}, @@ -3368,6 +3369,10 @@ if(Loader.isModLoaded("Railcraft")){ new FluidStack[]{Materials.LightFuel.getFluid(100), Materials.Naphtha.getFluid(125), Materials.Toluene.getFluid(80), Materials.Benzene.getFluid(400), Materials.Butene.getGas(80), Materials.Butadiene.getGas(50), Materials.Propane.getGas(10), Materials.Propene.getGas(100), Materials.Ethane.getGas(15), Materials.Ethylene.getGas(150), Materials.Methane.getGas(150)}, Materials.Carbon.getDustTiny(3), 120, 120); + //Recipes for gasoline + GT_Values.RA.addMixerRecipe(Materials.LightFuel.getCells(16), Materials.Gas.getCells(2), Materials.Ethanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 200, 120); + GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Lead.getDustTiny(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(10), 10, 120); + GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitricOxide.getCells(6), Materials.Toluene.getCells(1), GT_Values.NF, Materials.GasolinePremium.getFluid(25), ItemList.Cell_Empty.get(29), 200, 120); } public void addPotionRecipes(String aName,ItemStack aItem){ From 83bd3a0120427ba262530c5320bdc9d089ebdbec Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Sun, 5 Nov 2017 18:59:05 -0500 Subject: [PATCH 13/33] Replace lead with toluene --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 969ed88c..b9ba60d3 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -3371,7 +3371,7 @@ if(Loader.isModLoaded("Railcraft")){ Materials.Carbon.getDustTiny(3), 120, 120); //Recipes for gasoline GT_Values.RA.addMixerRecipe(Materials.LightFuel.getCells(16), Materials.Gas.getCells(2), Materials.Ethanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 200, 120); - GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Lead.getDustTiny(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(10), 10, 120); + GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Toluene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(10), 10, 120); GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitricOxide.getCells(6), Materials.Toluene.getCells(1), GT_Values.NF, Materials.GasolinePremium.getFluid(25), ItemList.Cell_Empty.get(29), 200, 120); } From e18f0a186deb9cc6c975b5ae73d7054cbf60224c Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 6 Nov 2017 17:53:15 +0800 Subject: [PATCH 14/33] Fix cover placing issue with such small AABB of metapipes --- .../GT_MetaPipeEntity_Cable.java | 73 ++++++++++++------- .../GT_MetaPipeEntity_Fluid.java | 73 ++++++++++++------- .../GT_MetaPipeEntity_Item.java | 19 ++++- src/main/java/gregtech/common/GT_Client.java | 17 ++++- 4 files changed, 122 insertions(+), 60 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index d8b03ccf..c8602728 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -33,6 +33,7 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import static gregtech.api.enums.GT_Values.VN; @@ -107,34 +108,6 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile GT_Utility.applyElectricityDamage((EntityLivingBase) aEntity, mTransferredVoltageLast20, mTransferredAmperageLast20); } - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - float tSpace = (1f - mThickNess)/2; - float tSide0 = tSpace; - float tSide1 = 1f - tSpace; - float tSide2 = tSpace; - float tSide3 = 1f - tSpace; - float tSide4 = tSpace; - float tSide5 = 1f - tSpace; - - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} - - byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; - if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; - if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; - if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; - if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; - if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; - if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; - - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); - } - @Override public boolean isSimpleMachine() { return true; @@ -360,4 +333,48 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile mConnections = aNBT.getByte("mConnections"); } } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); + else + return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + float tSpace = (1f - mThickNess)/2; + float tSide0 = tSpace; + float tSide1 = 1f - tSpace; + float tSide2 = tSpace; + float tSide3 = 1f - tSpace; + float tSide4 = tSpace; + float tSide5 = 1f - tSpace; + + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} + + byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; + if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; + if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; + if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; + if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; + if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; + if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; + + return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + } + + @Override + public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { + AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); + } + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index 7469507f..db0a0474 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -28,6 +28,7 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import java.util.ArrayList; +import java.util.List; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; @@ -217,34 +218,6 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ } } - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - float tSpace = (1f - mThickNess)/2; - float tSide0 = tSpace; - float tSide1 = 1f - tSpace; - float tSide2 = tSpace; - float tSide3 = 1f - tSpace; - float tSide4 = tSpace; - float tSide5 = 1f - tSpace; - - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} - - byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; - if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; - if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; - if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; - if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; - if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; - if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; - - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); - } - @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide() && aTick % 5 == 0) { @@ -618,4 +591,48 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ public boolean isLiquidOutput(byte aSide) { return true; } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); + else + return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + float tSpace = (1f - mThickNess)/2; + float tSide0 = tSpace; + float tSide1 = 1f - tSpace; + float tSide2 = tSpace; + float tSide3 = 1f - tSpace; + float tSide4 = tSpace; + float tSide5 = 1f - tSpace; + + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} + if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} + + byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; + if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; + if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; + if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; + if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; + if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; + if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; + + return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + } + + @Override + public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { + AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); + } + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index a2332f0b..80da5cd8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -12,6 +12,7 @@ import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; @@ -25,6 +26,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; +import java.util.List; import java.util.concurrent.ConcurrentHashMap; public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe{ @@ -355,6 +357,13 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); + else + return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { float tSpace = (1f - mThickNess)/2; float tSide0 = tSpace; float tSide1 = 1f - tSpace; @@ -379,6 +388,14 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); - + } + + @Override + public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { + AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); + } } } diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index aa8da546..a9eac1c6 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -16,6 +16,7 @@ import gregtech.api.enums.Materials; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.ITurnable; import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Recipe; @@ -563,9 +564,9 @@ public class GT_Client extends GT_Proxy try { EntityPlayer player = Minecraft.getMinecraft().thePlayer; if (player == null) return 0; - ItemStack held = player.getCurrentEquippedItem(); - if (held == null) return 0; - int[] ids = OreDictionary.getOreIDs(held); + ItemStack tCurrentItem = player.getCurrentEquippedItem(); + if (tCurrentItem == null) return 0; + int[] ids = OreDictionary.getOreIDs(tCurrentItem); int hide = 0; for (int i : ids) { if (OreDictionary.getOreName(i).equals("craftingToolSolderingIron")) { @@ -573,6 +574,16 @@ public class GT_Client extends GT_Proxy break; } } + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList) + || GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) { + hide |= 0x2; + } return hide; }catch(Exception e){ return 0; From f17a3efb6bee4e7c0e2cc8d980c00ac12f6f1871 Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Mon, 6 Nov 2017 08:52:18 -0500 Subject: [PATCH 15/33] Remove useless import --- .../generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index 2e4fe229..dc56e7d3 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -1,6 +1,5 @@ package gregtech.common.tileentities.generators; -import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; From af2278736e42d829ea5676e5cba839c50b272128 Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Mon, 6 Nov 2017 08:59:21 -0500 Subject: [PATCH 16/33] Fix missing cell --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index b9ba60d3..9124c208 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -3371,7 +3371,7 @@ if(Loader.isModLoaded("Railcraft")){ Materials.Carbon.getDustTiny(3), 120, 120); //Recipes for gasoline GT_Values.RA.addMixerRecipe(Materials.LightFuel.getCells(16), Materials.Gas.getCells(2), Materials.Ethanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 200, 120); - GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Toluene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(10), 10, 120); + GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Toluene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(11), 10, 120); GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitricOxide.getCells(6), Materials.Toluene.getCells(1), GT_Values.NF, Materials.GasolinePremium.getFluid(25), ItemList.Cell_Empty.get(29), 200, 120); } From 5b13b53c3a7517282236b06feb9e4963c4e0675f Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Mon, 6 Nov 2017 12:25:38 -0500 Subject: [PATCH 17/33] Fix typo --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 9124c208..782debab 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -3372,7 +3372,7 @@ if(Loader.isModLoaded("Railcraft")){ //Recipes for gasoline GT_Values.RA.addMixerRecipe(Materials.LightFuel.getCells(16), Materials.Gas.getCells(2), Materials.Ethanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 200, 120); GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Toluene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(11), 10, 120); - GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitricOxide.getCells(6), Materials.Toluene.getCells(1), GT_Values.NF, Materials.GasolinePremium.getFluid(25), ItemList.Cell_Empty.get(29), 200, 120); + GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitricOxide.getCells(6), Materials.Toluene.getCells(1), GT_Values.NF, Materials.GasolinePremium.getFluid(25000L), ItemList.Cell_Empty.get(29), 200, 120); } public void addPotionRecipes(String aName,ItemStack aItem){ From d30dfe7b3e59ff198b43183a769fb7894f6fa26b Mon Sep 17 00:00:00 2001 From: SuperCoder79 Date: Mon, 6 Nov 2017 21:05:48 -0500 Subject: [PATCH 18/33] Add ethyl tert-butyl ether and rename gasolines --- src/main/java/gregtech/api/enums/Materials.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 01814c5b..81dbc812 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -745,10 +745,11 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC, 14.0F, 3000, 4, 1|2|64|128, 102, 0, 51, 0, "HSSS", "HSS-S", 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))); public static Materials DilutedSulfuricAcid = new MaterialBuilder(640, TextureSet.SET_FLUID, "Diluted Sulfuric Acid").addCell().addFluid().setRGB(192, 120, 32).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(SulfuricAcid, 1)).constructMaterial(); public static Materials EpoxidFiberReinforced = new Materials(610, TextureSet.SET_DULL,3.0F, 64, 1, 1|2|64|128, 160, 112, 16, 0, "EpoxidFiberReinforced", "Fiber-Reinforced Epoxy Resin", 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBrown, 2, Arrays.asList(new MaterialStack(Epoxid, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials AntiKnock = new MaterialBuilder(994, TextureSet.SET_FLUID, "Ethyl Tert-Butyl Ether").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).constructMaterial(); public static Materials Octane = new MaterialBuilder(995, TextureSet.SET_FLUID, "Octane").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setFuelType(MaterialBuilder.DIESEL).setFuelPower(80).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 18)).constructMaterial(); public static Materials GasolineRaw = new MaterialBuilder(996, TextureSet.SET_FLUID, "Raw Gasoline").addCell().addFluid().setRGB(255,100,0).setColor(Dyes.dyeOrange).constructMaterial(); - public static Materials GasolineRegular = new MaterialBuilder(997, TextureSet.SET_FLUID, "Regular Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(384).constructMaterial(); - public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID, "Premium Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(640).constructMaterial(); + public static Materials GasolineRegular = new MaterialBuilder(997, TextureSet.SET_FLUID, "Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(384).constructMaterial(); + public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID, "High Octane Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(640).constructMaterial(); /** * Materials which are renamed automatically From c74b3dc36579c624c917207c11f267f2ec06e5a1 Mon Sep 17 00:00:00 2001 From: Pranav Date: Mon, 6 Nov 2017 22:14:22 -0500 Subject: [PATCH 19/33] Change Gasoline production a little bit --- src/main/java/gregtech/api/enums/Materials.java | 3 ++- .../gregtech/loaders/postload/GT_MachineRecipeLoader.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 81dbc812..3a77796d 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -745,11 +745,12 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC, 14.0F, 3000, 4, 1|2|64|128, 102, 0, 51, 0, "HSSS", "HSS-S", 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))); public static Materials DilutedSulfuricAcid = new MaterialBuilder(640, TextureSet.SET_FLUID, "Diluted Sulfuric Acid").addCell().addFluid().setRGB(192, 120, 32).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(SulfuricAcid, 1)).constructMaterial(); public static Materials EpoxidFiberReinforced = new Materials(610, TextureSet.SET_DULL,3.0F, 64, 1, 1|2|64|128, 160, 112, 16, 0, "EpoxidFiberReinforced", "Fiber-Reinforced Epoxy Resin", 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBrown, 2, Arrays.asList(new MaterialStack(Epoxid, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials NitrousOxide = new MaterialBuilder(658, TextureSet.SET_FLUID, "Nitrous Oxide").addCell().addGas().setRGB(125, 200, 255).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); public static Materials AntiKnock = new MaterialBuilder(994, TextureSet.SET_FLUID, "Ethyl Tert-Butyl Ether").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).constructMaterial(); public static Materials Octane = new MaterialBuilder(995, TextureSet.SET_FLUID, "Octane").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setFuelType(MaterialBuilder.DIESEL).setFuelPower(80).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 18)).constructMaterial(); public static Materials GasolineRaw = new MaterialBuilder(996, TextureSet.SET_FLUID, "Raw Gasoline").addCell().addFluid().setRGB(255,100,0).setColor(Dyes.dyeOrange).constructMaterial(); public static Materials GasolineRegular = new MaterialBuilder(997, TextureSet.SET_FLUID, "Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(384).constructMaterial(); - public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID, "High Octane Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(640).constructMaterial(); + public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID, "High Octane Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(768).constructMaterial(); /** * Materials which are renamed automatically diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 782debab..1c055d33 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -3370,9 +3370,11 @@ if(Loader.isModLoaded("Railcraft")){ Materials.Butadiene.getGas(50), Materials.Propane.getGas(10), Materials.Propene.getGas(100), Materials.Ethane.getGas(15), Materials.Ethylene.getGas(150), Materials.Methane.getGas(150)}, Materials.Carbon.getDustTiny(3), 120, 120); //Recipes for gasoline - GT_Values.RA.addMixerRecipe(Materials.LightFuel.getCells(16), Materials.Gas.getCells(2), Materials.Ethanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 200, 120); + GT_Values.RA.addChemicalRecipe(Materials.Nitrogen.getCells(2), Materials.Oxygen.getCells(1), GT_Values.NF, GT_Values.NF, Materials.NitrousOxide.getCells(3), 200, 30); + GT_Values.RA.addChemicalRecipe(Materials.Ethanol.getCells(1), Materials.Butene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.AntiKnock.getCells(2), 400, 480); + GT_Values.RA.addMixerRecipe(Materials.Naphtha.getCells(16), Materials.Gas.getCells(2), Materials.Methanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 200, 120); GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Toluene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(11), 10, 120); - GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitricOxide.getCells(6), Materials.Toluene.getCells(1), GT_Values.NF, Materials.GasolinePremium.getFluid(25000L), ItemList.Cell_Empty.get(29), 200, 120); + GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitrousOxide.getCells(6), Materials.Toluene.getCells(1), Materials.AntiKnock.getFluid(3000L), Materials.GasolinePremium.getFluid(25000L), ItemList.Cell_Empty.get(29), 200, 120); } public void addPotionRecipes(String aName,ItemStack aItem){ From ced4854069b322b9bef553851068363dbf9aa383 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Wed, 8 Nov 2017 16:09:32 +0800 Subject: [PATCH 20/33] Try to fix the unexpected disconnection caused by those unloaded chunks --- .../GT_MetaPipeEntity_Cable.java | 40 ++++++++++--------- .../GT_MetaPipeEntity_Fluid.java | 6 ++- .../GT_MetaPipeEntity_Item.java | 4 +- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index c8602728..a7d5ce14 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -37,7 +37,7 @@ import java.util.List; import static gregtech.api.enums.GT_Values.VN; -public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable{ +public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable { public final float mThickNess; public final Materials mMaterial; public final long mCableLossPerMeter, mAmperage, mVoltage; @@ -218,7 +218,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile mTransferredVoltageLast20 = 0; mTransferredAmperageLast20 = 0; for (byte i = 0; i < 6; i++) { - if ((mCheckConnections || (mConnections & (1 << i)) != 0) && connect(i) <= 0) disconnect(i); + if ((mCheckConnections || (mConnections & (1 << i)) != 0) && connect(i) == 0) disconnect(i); } if (GT_Mod.gregtechproxy.gt6Cable) mCheckConnections = false; } @@ -258,23 +258,25 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (aSide >= 6) return rConnect; byte tSide = GT_Utility.getOppositeSide(aSide); TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aSide); - if (getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).alwaysLookConnected(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) { - if (tTileEntity instanceof IColoredTileEntity) { - if (getBaseMetaTileEntity().getColorization() >= 0) { - byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); - if (tColor >= 0 && tColor != getBaseMetaTileEntity().getColorization()) - return rConnect; - } - } - if ((tTileEntity instanceof IEnergyConnected && (((IEnergyConnected) tTileEntity).inputEnergyFrom(tSide) || ((IEnergyConnected) tTileEntity).outputsEnergyTo(tSide))) - || (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof IMetaTileEntityCable - && (((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).letsEnergyIn(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).letsEnergyOut(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)))) - || (tTileEntity instanceof IEnergySink && ((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) getBaseMetaTileEntity(), ForgeDirection.getOrientation(tSide))) - || (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(tSide))) - /*|| (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter)tTileEntity).emitsEnergyTo((TileEntity)getBaseMetaTileEntity(), ForgeDirection.getOrientation(tSide)))*/) { - rConnect = 1; - } - } + if (tTileEntity != null) { + if (getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).alwaysLookConnected(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity()) || getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) { + if (tTileEntity instanceof IColoredTileEntity) { + if (getBaseMetaTileEntity().getColorization() >= 0) { + byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); + if (tColor >= 0 && tColor != getBaseMetaTileEntity().getColorization()) + return rConnect; + } + } + if ((tTileEntity instanceof IEnergyConnected && (((IEnergyConnected) tTileEntity).inputEnergyFrom(tSide) || ((IEnergyConnected) tTileEntity).outputsEnergyTo(tSide))) + || (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof IMetaTileEntityCable + && (((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).letsEnergyIn(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)) || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(tSide).letsEnergyOut(tSide, ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(tSide), ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(tSide), ((IGregTechTileEntity) tTileEntity)))) + || (tTileEntity instanceof IEnergySink && ((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) getBaseMetaTileEntity(), ForgeDirection.getOrientation(tSide))) + || (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(tSide))) + /*|| (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter)tTileEntity).emitsEnergyTo((TileEntity)getBaseMetaTileEntity(), ForgeDirection.getOrientation(tSide)))*/) { + rConnect = 1; + } + } + } if (rConnect > 0) { super.connect(aSide); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index db0a0474..1c33a8c4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.BaseTileEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.XSTR; @@ -34,7 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; import static gregtech.api.enums.GT_Values.D1; -public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ +public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public final float mThickNess; public final Materials mMaterial; public final int mCapacity, mHeatResistance, mPipeAmount; @@ -388,6 +389,9 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{ } } } + } else if (getBaseMetaTileEntity().getOffsetX(aSide, 1) >> 4 != getBaseMetaTileEntity().getXCoord() >> 4 + || getBaseMetaTileEntity().getOffsetZ(aSide, 1) >> 4 != getBaseMetaTileEntity().getZCoord() >> 4) { // if chunk unloaded + rConnect = -1; } if (rConnect > 0) { if (GT_Mod.gregtechproxy.gt6Pipe && tFluidPipe != null) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index 80da5cd8..2ec7b99f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -29,7 +29,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.ConcurrentHashMap; -public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe{ +public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe { public final float mThickNess; public final Materials mMaterial; public final int mStepSize; @@ -165,7 +165,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if (aTick % mTickTime == 0) mTransferredItems = 0; for (byte i = 0; i < 6; i++) { - if ((mCheckConnections || (mConnections & (1 << i)) != 0) && connect(i) <= 0) disconnect(i); + if ((mCheckConnections || (mConnections & (1 << i)) != 0) && connect(i) == 0) disconnect(i); } if (GT_Mod.gregtechproxy.gt6Pipe) mCheckConnections = false; From 1245f31d277e78a907ac2bb08c3c9e834c9c6f0a Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 8 Nov 2017 08:03:14 -0500 Subject: [PATCH 21/33] Fix Material Index --- src/main/java/gregtech/api/enums/Materials.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 3a77796d..b29dcedd 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -745,7 +745,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC, 14.0F, 3000, 4, 1|2|64|128, 102, 0, 51, 0, "HSSS", "HSS-S", 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))); public static Materials DilutedSulfuricAcid = new MaterialBuilder(640, TextureSet.SET_FLUID, "Diluted Sulfuric Acid").addCell().addFluid().setRGB(192, 120, 32).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(SulfuricAcid, 1)).constructMaterial(); public static Materials EpoxidFiberReinforced = new Materials(610, TextureSet.SET_DULL,3.0F, 64, 1, 1|2|64|128, 160, 112, 16, 0, "EpoxidFiberReinforced", "Fiber-Reinforced Epoxy Resin", 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBrown, 2, Arrays.asList(new MaterialStack(Epoxid, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials NitrousOxide = new MaterialBuilder(658, TextureSet.SET_FLUID, "Nitrous Oxide").addCell().addGas().setRGB(125, 200, 255).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); + public static Materials NitrousOxide = new MaterialBuilder(993, TextureSet.SET_FLUID, "Nitrous Oxide").addCell().addGas().setRGB(125, 200, 255).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); public static Materials AntiKnock = new MaterialBuilder(994, TextureSet.SET_FLUID, "Ethyl Tert-Butyl Ether").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).constructMaterial(); public static Materials Octane = new MaterialBuilder(995, TextureSet.SET_FLUID, "Octane").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setFuelType(MaterialBuilder.DIESEL).setFuelPower(80).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 18)).constructMaterial(); public static Materials GasolineRaw = new MaterialBuilder(996, TextureSet.SET_FLUID, "Raw Gasoline").addCell().addFluid().setRGB(255,100,0).setColor(Dyes.dyeOrange).constructMaterial(); From 51334d19db4208e876e6fd52f19102a7677b7c0d Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Thu, 9 Nov 2017 15:50:03 +0800 Subject: [PATCH 22/33] Draw the cross in the hint grid --- .../GT_MetaPipeEntity_Fluid.java | 16 ++-- src/main/java/gregtech/common/GT_Client.java | 74 +++++++++++++++++-- 2 files changed, 74 insertions(+), 16 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index 1c33a8c4..0b6edbe2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -89,19 +89,19 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount); } - protected static final byte[][] sRestrictionArray = new byte[][]{ - {2, 3, 5, 4}, - {2, 3, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 2, 3}, - {1, 0, 2, 3}}; - @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { float tThickNess = getThickNess(); if (mDisableInput == 0) return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; byte tMask = 0; + byte[][] sRestrictionArray = new byte[][]{ + {2, 3, 5, 4}, + {2, 3, 4, 5}, + {1, 0, 4, 5}, + {1, 0, 4, 5}, + {1, 0, 2, 3}, + {1, 0, 2, 3} + }; if (aSide >= 0 && aSide < 6) for (byte i = 0; i < 4; i++) if ((mDisableInput & (1 << sRestrictionArray[aSide][i])) != 0) tMask |= 1 << i; return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)}; } diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index a9eac1c6..41efcd81 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -137,14 +137,72 @@ public class GT_Client extends GT_Proxy GL11.glLineWidth(2.0F); GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.5F); GL11.glBegin(1); - GL11.glVertex3d(0.5D, 0.0D, -0.25D); - GL11.glVertex3d(-0.5D, 0.0D, -0.25D); - GL11.glVertex3d(0.5D, 0.0D, 0.25D); - GL11.glVertex3d(-0.5D, 0.0D, 0.25D); - GL11.glVertex3d(0.25D, 0.0D, -0.5D); - GL11.glVertex3d(0.25D, 0.0D, 0.5D); - GL11.glVertex3d(-0.25D, 0.0D, -0.5D); - GL11.glVertex3d(-0.25D, 0.0D, 0.5D); + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, +.50D); + GL11.glVertex3d(-.25D, .0D, -.50D); + GL11.glVertex3d(-.25D, .0D, +.50D); + int[][] GridSwitchArr = new int[][]{ + {0, 5, 3, 1, 2, 4}, + {5, 0, 1, 3, 2, 4}, + {1, 3, 0, 5, 2, 4}, + {3, 1, 5, 0, 2, 4}, + {4, 2, 3, 1, 0, 5}, + {2, 4, 3, 1, 5, 0}, + }; + switch (GridSwitchArr[aEvent.target.sideHit][GT_Utility.determineWrenchingSide((byte) aEvent.target.sideHit, (float) aEvent.target.hitVec.xCoord - (float) aEvent.target.blockX, (float) aEvent.target.hitVec.yCoord - (float) aEvent.target.blockY, (float) aEvent.target.hitVec.zCoord - (float) aEvent.target.blockZ)]) { + case 0: + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.25D); + break; + case 1: + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, +.50D); + break; + case 2: + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + break; + case 3: + GL11.glVertex3d(-.25D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + break; + case 4: + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.25D); + break; + case 5: + GL11.glVertex3d(+.50D, .0D, +.50D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, +.50D); + GL11.glVertex3d(+.50D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, -.25D); + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + GL11.glVertex3d(-.50D, .0D, +.50D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glVertex3d(-.50D, .0D, -.50D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, -.50D); + break; + } GL11.glEnd(); GL11.glPopMatrix(); } From 7eeab3e6d40eb3e1f60f8a5f4904396b3c3ebc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Fri, 10 Nov 2017 18:08:55 +0100 Subject: [PATCH 23/33] Resistor recipes now accept Coal, Charcoal, and Carbon --- .../gregtech/loaders/postload/GT_MachineRecipeLoader.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 56f9031a..476fc1e0 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -477,9 +477,12 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1, o), ItemList.Circuit_Parts_PetriDish.get(1, o), ItemList.Electric_Pump_LV.get(1,o), ItemList.Sensor_LV.get(1,o)}, OrePrefixes.circuit.get(Materials.Good), 1, Materials.GrowthMediumSterilized.getFluid(250), ItemList.Circuit_Board_Wetware.get(1, o), 400, 480); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireGt01.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Coal)}); GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Coal)}); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), ItemList.Circuit_Parts_Resistor.get(12, o), 160, 6); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Charcoal)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Carbon)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), ItemList.Circuit_Parts_Resistor.get(12, o), 160, 6); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Charcoal, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), ItemList.Circuit_Parts_Resistor.get(12, o), 160, 6); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), ItemList.Circuit_Parts_Resistor.get(12, o), 160, 6); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4),Materials.Plastic.getMolten(144), ItemList.Circuit_Parts_ResistorSMD.get(24, o), 80, 96); GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1), ItemList.Shape_Mold_Ball.get(0, o), ItemList.Circuit_Parts_Glass_Tube.get(1,o), 160, 8); GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1, o), new Object[]{"PGP","FFF",'G',ItemList.Circuit_Parts_Glass_Tube,'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper)}); From f97b56fec5f8b76e784191ea13d665f5753e061f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Fri, 10 Nov 2017 23:55:39 +0100 Subject: [PATCH 24/33] Added a forgotten LCR Tetrafluoroethylene recipe Decreased the EU/t for producing TFE from 256 to 240 to account for potential cable loss. --- .../loaders/postload/GT_MachineRecipeLoader.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 56f9031a..76039e11 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2872,11 +2872,12 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.Fluorine.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Hydrogen.getGas(1000), GT_Values.NF, Materials.HydrofluoricAcid.getCells(1), 60, 8); GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Fluorine.getGas(1000), GT_Values.NF, Materials.HydrofluoricAcid.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), Materials.HydrofluoricAcid.getCells(4), GT_Values.NF, Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 256); - GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), Materials.Empty.getCells(4), Materials.HydrofluoricAcid.getFluid(4000), Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 256); - GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), Materials.Empty.getCells(2), Materials.Chloroform.getFluid(2000), Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 256); - GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), GT_Utility.getIntegratedCircuit(11), Materials.Chloroform.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(3), 480, 256); - GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.HydrofluoricAcid.getFluid(4000), Materials.DilutedHydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(1), 480, 256); + GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), Materials.HydrofluoricAcid.getCells(4), GT_Values.NF, Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 240); + GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), Materials.Empty.getCells(4), Materials.HydrofluoricAcid.getFluid(4000), Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 240); + GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), Materials.Empty.getCells(2), Materials.Chloroform.getFluid(2000), Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 240); + GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), GT_Utility.getIntegratedCircuit(11), Materials.Chloroform.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(3), 480, 240); + GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.HydrofluoricAcid.getFluid(4000), Materials.DilutedHydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(1), 480, 240); + GT_Values.RA.addMultiblockChemicalRecipe(null, new FluidStack[]{Materials.HydrofluoricAcid.getFluid(4000), Materials.Methane.getGas(2000), Materials.Chlorine.getGas(12000)}, new FluidStack[]{Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getFluid(6000), Materials.DilutedHydrochloricAcid.getFluid(6000)}, null, 540, 240); GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Tetrafluoroethylene.mGas, Materials.Tetrafluoroethylene.getCells(1), Materials.Polytetrafluoroethylene.mStandardMoltenFluid); From e9e88db6dda1db98957f322f15cb75c11300fe58 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 13 Nov 2017 14:31:56 +0800 Subject: [PATCH 25/33] Make the cross show which direction the pipe is connecting with --- .../api/metatileentity/MetaPipeEntity.java | 24 ++-- src/main/java/gregtech/common/GT_Client.java | 123 ++++++++++-------- .../preload/GT_Loader_MetaTileEntities.java | 4 +- 3 files changed, 78 insertions(+), 73 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index ab862318..9e4a79be 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -708,13 +708,11 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { public int connect(byte aSide) { if (aSide >= 6) return 0; mConnections |= (1 << aSide); - if (GT_Mod.gregtechproxy.gt6Pipe) { - byte tSide = GT_Utility.getOppositeSide(aSide); - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); - IMetaTileEntity tPipe = tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() : null; - if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) == 0) - ((MetaPipeEntity) tPipe).connect(tSide); - } + byte tSide = GT_Utility.getOppositeSide(aSide); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + IMetaTileEntity tPipe = tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() : null; + if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) == 0) + ((MetaPipeEntity) tPipe).connect(tSide); return 1; } @@ -722,12 +720,10 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { public void disconnect(byte aSide) { if (aSide >= 6) return; mConnections &= ~(1 << aSide); - if (GT_Mod.gregtechproxy.gt6Pipe) { - byte tSide = GT_Utility.getOppositeSide(aSide); - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); - IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); - if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) != 0) - ((MetaPipeEntity) tPipe).disconnect(tSide); - } + byte tSide = GT_Utility.getOppositeSide(aSide); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); + if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) != 0) + ((MetaPipeEntity) tPipe).disconnect(tSide); } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 41efcd81..48713f92 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -145,63 +145,72 @@ public class GT_Client extends GT_Proxy GL11.glVertex3d(+.25D, .0D, +.50D); GL11.glVertex3d(-.25D, .0D, -.50D); GL11.glVertex3d(-.25D, .0D, +.50D); - int[][] GridSwitchArr = new int[][]{ - {0, 5, 3, 1, 2, 4}, - {5, 0, 1, 3, 2, 4}, - {1, 3, 0, 5, 2, 4}, - {3, 1, 5, 0, 2, 4}, - {4, 2, 3, 1, 0, 5}, - {2, 4, 3, 1, 5, 0}, - }; - switch (GridSwitchArr[aEvent.target.sideHit][GT_Utility.determineWrenchingSide((byte) aEvent.target.sideHit, (float) aEvent.target.hitVec.xCoord - (float) aEvent.target.blockX, (float) aEvent.target.hitVec.yCoord - (float) aEvent.target.blockY, (float) aEvent.target.hitVec.zCoord - (float) aEvent.target.blockZ)]) { - case 0: - GL11.glVertex3d(+.25D, .0D, +.25D); - GL11.glVertex3d(-.25D, .0D, -.25D); - GL11.glVertex3d(-.25D, .0D, +.25D); - GL11.glVertex3d(+.25D, .0D, -.25D); - break; - case 1: - GL11.glVertex3d(-.25D, .0D, +.50D); - GL11.glVertex3d(+.25D, .0D, +.25D); - GL11.glVertex3d(-.25D, .0D, +.25D); - GL11.glVertex3d(+.25D, .0D, +.50D); - break; - case 2: - GL11.glVertex3d(-.50D, .0D, -.25D); - GL11.glVertex3d(-.25D, .0D, +.25D); - GL11.glVertex3d(-.50D, .0D, +.25D); - GL11.glVertex3d(-.25D, .0D, -.25D); - break; - case 3: - GL11.glVertex3d(-.25D, .0D, -.50D); - GL11.glVertex3d(+.25D, .0D, -.25D); - GL11.glVertex3d(-.25D, .0D, -.25D); - GL11.glVertex3d(+.25D, .0D, -.50D); - break; - case 4: - GL11.glVertex3d(+.50D, .0D, -.25D); - GL11.glVertex3d(+.25D, .0D, +.25D); - GL11.glVertex3d(+.50D, .0D, +.25D); - GL11.glVertex3d(+.25D, .0D, -.25D); - break; - case 5: - GL11.glVertex3d(+.50D, .0D, +.50D); - GL11.glVertex3d(+.25D, .0D, +.25D); - GL11.glVertex3d(+.50D, .0D, +.25D); - GL11.glVertex3d(+.25D, .0D, +.50D); - GL11.glVertex3d(+.50D, .0D, -.50D); - GL11.glVertex3d(+.25D, .0D, -.25D); - GL11.glVertex3d(+.50D, .0D, -.25D); - GL11.glVertex3d(+.25D, .0D, -.50D); - GL11.glVertex3d(-.50D, .0D, +.50D); - GL11.glVertex3d(-.25D, .0D, +.25D); - GL11.glVertex3d(-.50D, .0D, +.25D); - GL11.glVertex3d(-.25D, .0D, +.50D); - GL11.glVertex3d(-.50D, .0D, -.50D); - GL11.glVertex3d(-.25D, .0D, -.25D); - GL11.glVertex3d(-.50D, .0D, -.25D); - GL11.glVertex3d(-.25D, .0D, -.50D); - break; + GL11.glLineWidth(2.0F); + TileEntity tTile = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); + if (tTile instanceof BaseMetaPipeEntity) { + int[][] GridSwitchArr = new int[][]{ + {0, 5, 3, 1, 2, 4}, + {5, 0, 1, 3, 2, 4}, + {1, 3, 0, 5, 2, 4}, + {3, 1, 5, 0, 2, 4}, + {4, 2, 3, 1, 0, 5}, + {2, 4, 3, 1, 5, 0}, + }; + int tConnections = ((BaseMetaPipeEntity) tTile).mConnections; + for (byte i = 0; i < 6; i++) { + if ((tConnections & (1 << i)) != 0) { + switch (GridSwitchArr[aEvent.target.sideHit][i]) { + case 0: + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.25D); + break; + case 1: + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, +.50D); + break; + case 2: + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + break; + case 3: + GL11.glVertex3d(-.25D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + break; + case 4: + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.25D); + break; + case 5: + GL11.glVertex3d(+.50D, .0D, +.50D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, +.50D); + GL11.glVertex3d(+.50D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, -.25D); + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + GL11.glVertex3d(-.50D, .0D, +.50D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glVertex3d(-.50D, .0D, -.50D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, -.50D); + break; + } + } + } } GL11.glEnd(); GL11.glPopMatrix(); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index d0e6b431..872a2e40 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1659,7 +1659,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { } private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); } } From 2b8cca2565c58f99654840f6e3cafc5142fbd9ca Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Mon, 13 Nov 2017 22:32:39 +0800 Subject: [PATCH 26/33] Unexpected disconnection #2 --- .../GT_MetaPipeEntity_Cable.java | 18 ++++-------------- .../GT_MetaPipeEntity_Item.java | 3 +++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index a7d5ce14..1f1b7c19 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -276,26 +276,16 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile rConnect = 1; } } - } + } else if (getBaseMetaTileEntity().getOffsetX(aSide, 1) >> 4 != getBaseMetaTileEntity().getXCoord() >> 4 + || getBaseMetaTileEntity().getOffsetZ(aSide, 1) >> 4 != getBaseMetaTileEntity().getZCoord() >> 4) { // if chunk unloaded + rConnect = -1; + } if (rConnect > 0) { super.connect(aSide); } return rConnect; } - @Override - public void disconnect(byte aSide) { - if (aSide >= 6) return; - mConnections &= ~(1 << aSide); - if (GT_Mod.gregtechproxy.gt6Cable) { - byte tSide = GT_Utility.getOppositeSide(aSide); - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); - IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); - if (this.getClass().isInstance(tPipe) && (((MetaPipeEntity) tPipe).mConnections & (1 << tSide)) != 0) - ((MetaPipeEntity) tPipe).disconnect(tSide); - } - } - @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index 2ec7b99f..e2fb532d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -253,6 +253,9 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE } } } + } else if (getBaseMetaTileEntity().getOffsetX(aSide, 1) >> 4 != getBaseMetaTileEntity().getXCoord() >> 4 + || getBaseMetaTileEntity().getOffsetZ(aSide, 1) >> 4 != getBaseMetaTileEntity().getZCoord() >> 4) { // if chunk unloaded + rConnect = -1; } if (rConnect > 0) { super.connect(aSide); From 5fbaf373f9cb12a5a21c953ab5b82de7ed8d7c24 Mon Sep 17 00:00:00 2001 From: Dimach Date: Fri, 17 Nov 2017 23:01:30 +0200 Subject: [PATCH 27/33] Added large diesel repair status to NC info panel. --- .../multi/GT_MetaTileEntity_DieselEngine.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index 826cab56..fec22324 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -31,7 +31,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock public GT_MetaTileEntity_DieselEngine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } - + public GT_MetaTileEntity_DieselEngine(String aName) { super(aName); } @@ -222,7 +222,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock public int getPollutionPerTick(ItemStack aStack) { return 16; } - + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; @@ -231,12 +231,13 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock @Override public String[] getInfoData() { return new String[]{ - "Diesel Engine", - "Current Output: "+mEUt*mEfficiency/10000 +" EU/t", - "Fuel Consumption: "+fuelConsumption+"L/t", - "Fuel Value: "+fuelValue+" EU/L", - "Fuel Remaining: "+fuelRemaining+" Litres", - "Current Efficiency: "+(mEfficiency/100)+"%"}; + "Diesel Engine", + "Current Output: " + mEUt * mEfficiency / 10000 + " EU/t", + "Fuel Consumption: " + fuelConsumption + "L/t", + "Fuel Value: " + fuelValue + " EU/L", + "Fuel Remaining: " + fuelRemaining + " Litres", + "Current Efficiency: " + (mEfficiency / 100) + "%", + getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"}; } @Override From a80acab83c80568aa6938d7242d4060802d72d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Tue, 21 Nov 2017 20:04:37 +0100 Subject: [PATCH 28/33] Added IntCircuit to LCR Tetrafluoroethylene recipe for consistency --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 76039e11..65285169 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2877,7 +2877,7 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), Materials.Empty.getCells(2), Materials.Chloroform.getFluid(2000), Materials.Tetrafluoroethylene.getGas(1000), Materials.DilutedHydrochloricAcid.getCells(6), 480, 240); GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), GT_Utility.getIntegratedCircuit(11), Materials.Chloroform.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(3), 480, 240); GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.HydrofluoricAcid.getFluid(4000), Materials.DilutedHydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(1), 480, 240); - GT_Values.RA.addMultiblockChemicalRecipe(null, new FluidStack[]{Materials.HydrofluoricAcid.getFluid(4000), Materials.Methane.getGas(2000), Materials.Chlorine.getGas(12000)}, new FluidStack[]{Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getFluid(6000), Materials.DilutedHydrochloricAcid.getFluid(6000)}, null, 540, 240); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.HydrofluoricAcid.getFluid(4000), Materials.Methane.getGas(2000), Materials.Chlorine.getGas(12000)}, new FluidStack[]{Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getFluid(6000), Materials.DilutedHydrochloricAcid.getFluid(6000)}, null, 540, 240); GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Tetrafluoroethylene.mGas, Materials.Tetrafluoroethylene.getCells(1), Materials.Polytetrafluoroethylene.mStandardMoltenFluid); From b87a55800f2a140ce0ad74b9a951994d9fdba9f5 Mon Sep 17 00:00:00 2001 From: JohannesGaessler Date: Tue, 21 Nov 2017 20:54:14 +0100 Subject: [PATCH 29/33] Removed NEI Large boiler fuel entry for Carbon Dust (#1295) Fixes #1285. Invalid Burn value on Carbon dust in NEI page for Large Boiler Fuels. --- src/main/java/gregtech/GT_Mod.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 22566fca..7cfbeb61 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -1179,7 +1179,6 @@ public class GT_Mod implements IGT_Mod { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Coal, 1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lignite, 1), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), From b78b3af5b1cfd7888192651ffb9bc59cf5bf7fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Tue, 21 Nov 2017 23:32:01 +0100 Subject: [PATCH 30/33] Added recipes for Phenol production from Benzene --- .../java/gregtech/api/enums/Materials.java | 1 + .../postload/GT_MachineRecipeLoader.java | 22 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 9473bbdd..f0680943 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -536,6 +536,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HeavyFuel = new Materials(741, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "HeavyFuel", "Heavy Fuel", 3, 192, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack).setCanBeCracked(true); public static Materials LPG = new Materials(742, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "LPG", "LPG", 1, 256, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow); + public static Materials Chlorobenzene = new MaterialBuilder(605, TextureSet.SET_FLUID, "Chlorobenzene").addCell().addFluid().setRGB(0, 50, 65).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); public static Materials DilutedHydrochloricAcid = new MaterialBuilder(606, TextureSet.SET_FLUID, "Diluted Hydrochloric Acid").setName("DilutedHydrochloricAcid_GT5U").addCell().addFluid().setRGB(153, 167, 163).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1)).constructMaterial(); public static Materials Pyrochlore = new MaterialBuilder(607, TextureSet.SET_METALLIC, "Pyrochlore").addDustItems().addOreItems().setRGB(43, 17, 0).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Calcium, 2), new MaterialStack(Niobium, 2), new MaterialStack(Oxygen, 7)).addElectrolyzerRecipe().constructMaterial(); public static Materials GrowthMediumRaw = new MaterialBuilder(608, TextureSet.SET_FLUID, "Raw Growth Medium").setName("GrowthMediumRaw").addCell().addFluid().setRGB(211, 141, 95).setColor(Dyes.dyeOrange).constructMaterial(); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 56f9031a..cf0491f7 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -3065,10 +3065,10 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.RawStyreneButadieneRubber.getDust(9), Materials.Sulfur.getDust(1), GT_Values.NF, Materials.StyreneButadieneRubber.getMolten(1296), GT_Values.NI, 600); - GT_Values.RA.addChemicalRecipe( Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(4000), Materials.HydrochloricAcid.getFluid(2000), Materials.Dichlorobenzene.getCells(1), 240); - GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(4), GT_Utility.getIntegratedCircuit(1), Materials.Benzene.getFluid(1000), Materials.HydrochloricAcid.getFluid(2000), Materials.Dichlorobenzene.getCells(1), Materials.Empty.getCells(3), 240); + GT_Values.RA.addChemicalRecipe( Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Chlorine.getGas(4000), Materials.HydrochloricAcid.getFluid(2000), Materials.Dichlorobenzene.getCells(1), 240); + GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(4), GT_Utility.getIntegratedCircuit(2), Materials.Benzene.getFluid(1000), Materials.HydrochloricAcid.getFluid(2000), Materials.Dichlorobenzene.getCells(1), Materials.Empty.getCells(3), 240); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Benzene.getCells(1), Materials.Empty.getCells(1), Materials.Chlorine.getGas(4000), Materials.Dichlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(2), GT_Values.NI, 240, 30); - GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(4), GT_Utility.getIntegratedCircuit(11), Materials.Benzene.getFluid(1000), Materials.Dichlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(2), Materials.Empty.getCells(2), 240); + GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(4), GT_Utility.getIntegratedCircuit(12), Materials.Benzene.getFluid(1000), Materials.Dichlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(2), Materials.Empty.getCells(2), 240); GT_Values.RA.addChemicalRecipe(Materials.SodiumSulfide.getDust(1), ItemList.Cell_Air.get(8, new Object[0]), Materials.Dichlorobenzene.getFluid(1000), Materials.PolyphenyleneSulfide.getMolten(1000), Materials.Salt.getDust(2), Materials.Empty.getCells(8), 240, 360); GT_Values.RA.addChemicalRecipe(Materials.SodiumSulfide.getDust(1), Materials.Oxygen.getCells(8), Materials.Dichlorobenzene.getFluid(1000), Materials.PolyphenyleneSulfide.getMolten(1500), Materials.Salt.getDust(2), Materials.Empty.getCells(8), 240, 360); @@ -3102,6 +3102,22 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Methane.getGas(1000), Materials.Hydrogen.getGas(8000), Materials.CarbonDioxide.getCells(1), Materials.Empty.getCells(1), 150, 480); GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Water.getFluid(2000), Materials.Hydrogen.getGas(8000), Materials.Empty.getCells(1), 150, 480); GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(2), GT_Utility.getIntegratedCircuit(12), Materials.Methane.getGas(1000), Materials.Hydrogen.getGas(8000), Materials.Empty.getCells(2), 150, 480); + + GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.HydrochloricAcid.getFluid(1000), Materials.Chlorobenzene.getCells(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Benzene.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.Chlorobenzene.getCells(1), Materials.Empty.getCells(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Benzene.getFluid(1000), Materials.Chlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 240); + + GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorobenzene.getFluid(1000), Materials.Phenol.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.Chlorobenzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.Phenol.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorobenzene.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Phenol.getCells(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.Chlorobenzene.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Water.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Phenol.getCells(1), 240); + + GT_Values.RA.addChemicalRecipe( Materials.SodiumHydroxide.getDust(4), GT_Utility.getIntegratedCircuit(1), Materials.Chlorobenzene.getFluid(4000), Materials.Phenol.getFluid(4000), Materials.Salt.getDust(6), 960); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.SodiumHydroxide.getDust(4), Materials.Empty.getCells(4), Materials.Chlorobenzene.getFluid(4000), GT_Values.NF, Materials.Salt.getDust(6), Materials.Phenol.getCells(4), 960, 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.SodiumHydroxide.getDust(4), Materials.Chlorobenzene.getCells(4), GT_Values.NF, GT_Values.NF, Materials.Salt.getDust(6), Materials.Phenol.getCells(4), 960, 30); + + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Benzene.getFluid(1000), Materials.Chlorine.getGas(2000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.Phenol.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000)}, null, 560, 30); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.SodiumHydroxide.getDust(2), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Benzene.getFluid(2000), Materials.Chlorine.getGas(4000)}, new FluidStack[]{Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(2000)}, new ItemStack[]{Materials.Salt.getDust(3)}, 1120, 30); } private void addOldChemicalRecipes() { From d592d193221d5c18c9903d47d8adb284cbb9c0b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Wed, 22 Nov 2017 23:28:31 +0100 Subject: [PATCH 31/33] Fixed the collision of LCR Hypochlorous Acid recipes --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 56f9031a..12984dd2 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2796,7 +2796,7 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Chlorine.getCells(10), Materials.Mercury.getCells(1), Materials.Water.getFluid(10000), Materials.HypochlorousAcid.getFluid(10000), Materials.Empty.getCells(11), GT_Values.NI, 600, 8); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Water.getCells(10), Materials.Mercury.getCells(1), Materials.Chlorine.getGas(10000), Materials.HypochlorousAcid.getFluid(10000), Materials.Empty.getCells(11), GT_Values.NI, 600, 8); GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Chlorine.getCells(1), Materials.Water.getCells(1), Materials.Mercury.getFluid(100), Materials.HypochlorousAcid.getFluid(1000), Materials.Empty.getCells(2), GT_Values.NI, 60, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Chlorine.getGas(10000), Materials.Water.getFluid(10000), Materials.Mercury.getFluid(1000)}, new FluidStack[]{Materials.HypochlorousAcid.getFluid(10000)}, null, 600, 8); + GT_Values.RA.addMultiblockChemicalRecipe(null, new FluidStack[]{Materials.Chlorine.getGas(10000), Materials.Water.getFluid(10000), Materials.Mercury.getFluid(1000)}, new FluidStack[]{Materials.HypochlorousAcid.getFluid(10000)}, null, 600, 8); GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.HypochlorousAcid.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 120); GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.HypochlorousAcid.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), GT_Values.NI, 120); From 5fc136166e6d34caf6a6856c780d455fcfb2a53c Mon Sep 17 00:00:00 2001 From: JohannesGaessler Date: Fri, 24 Nov 2017 00:58:42 +0100 Subject: [PATCH 32/33] Fixed a bug where restricting Output Hatches caused severe log spam (#1299) --- .../implementations/GT_MetaTileEntity_Hatch_Output.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index e59ba5f8..aabe833b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -103,7 +103,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setByte("mMode", mMode); - aNBT.setString("lockedFluidName", lockedFluidName); + aNBT.setString("lockedFluidName", lockedFluidName == null ? "" : lockedFluidName); } @Override From c7177dcf9aa519499243fd988c5bf49feed7409f Mon Sep 17 00:00:00 2001 From: Dimach Date: Fri, 24 Nov 2017 04:21:05 +0300 Subject: [PATCH 33/33] Added info to small miners tooltip. (#1287) * Added info to small miners tooltip. --- .../implementations/GT_MetaTileEntity_BasicMachine.java | 9 +++++++++ .../machines/basic/GT_MetaTileEntity_Miner.java | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index fe8c22c7..f1fad63e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -83,6 +83,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mNEIName = aNEIName; } + public GT_MetaTileEntity_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String[] aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { + super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); mInputSlotCount = Math.max(0, aInputSlotCount); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java index 9ff143c9..3e0da904 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -36,7 +36,8 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { final static int[] ENERGY = new int[]{8, 8, 32, 128}; //Miner energy consumption per tier public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Digging ore instead of you", 2, 2, "Miner.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); + super(aID, aName, aNameRegional, aTier, 1, new String[]{"Digging ore instead of you", ENERGY[aTier] + " EU/t, " + SPEED[aTier] / 20 + " sec per block", + "Work area " + (RADIUS[aTier] * 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1)}, 2, 2, "Miner.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); } public GT_MetaTileEntity_Miner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {