From bd10bd57d3db003f63a7abd59422a27894358355 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Fri, 10 Apr 2020 18:03:14 +0200 Subject: Void miner adjustments (#262) * Added all Ores to Voidminer in DeepDark + removed Infinity Ore Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> * renormalize line endings Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- .../interfaces/metatileentity/IConnectable.java | 38 ++-- .../metatileentity/IMetaTileEntityItemPipe.java | 202 ++++++++++----------- 2 files changed, 120 insertions(+), 120 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces') diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index 16fe07812f..bc822250fd 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -1,19 +1,19 @@ -package gregtech.api.interfaces.metatileentity; - -/** - * For pipes, wires, and other MetaTiles which need to 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. - */ - int connect(byte aSide); - - /** - * Try to disconnect to the Block at the specified side - */ - void disconnect(byte aSide); - - boolean isConnectedAtSide(int aSide); -} +package gregtech.api.interfaces.metatileentity; + +/** + * For pipes, wires, and other MetaTiles which need to 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. + */ + int connect(byte aSide); + + /** + * Try to disconnect to the Block at the specified side + */ + void disconnect(byte aSide); + + boolean isConnectedAtSide(int aSide); +} diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java index b61fe99904..f136f4f32b 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -1,101 +1,101 @@ -package gregtech.api.interfaces.metatileentity; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.util.GT_Utility; - -import java.util.Map; - -public interface IMetaTileEntityItemPipe extends IMetaTileEntity { - /** - * @return if this Pipe can still be used. - */ - boolean pipeCapacityCheck(); - - /** - * @return if this Pipe can still be used. - */ - boolean incrementTransferCounter(int aIncrement); - - /** - * Sends an ItemStack from aSender to the adjacent Blocks. - * - * @param aSender the BaseMetaTileEntity sending the Stack. - * @return if it was able to send something - */ - boolean sendItemStack(Object aSender); - - /** - * Executes the Sending Code for inserting Stacks into the TileEntities. - * - * @param aSender the BaseMetaTileEntity sending the Stack. - * @param aSide the Side of the PIPE facing the TileEntity. - * @return if this Side was allowed to Output into the Block. - */ - boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); - - /** - * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. - * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities. - * Negative Numbers to "suck" Items into a certain direction are also possible. - */ - int getStepSize(); - - /** - * Utility for the Item Network - */ - class Util { - /** - * @return a List of connected Item Pipes - */ - public static Map scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) { - aStep += aMetaTileEntity.getStepSize(); - if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck()) - if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) { - IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); - aMap.put(aMetaTileEntity, aStep); - for (byte i = 0, j = 0; i < 6; i++) { - if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) - continue; - j = GT_Utility.getOppositeSide(i); - if (aSuckItems) { - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { - IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = tItemPipe.getColorization(); - if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { - continue; - } - } - if (tItemPipe instanceof BaseMetaPipeEntity) { - IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); - if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { - scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); - } - } - } - } else { - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { - IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); - if (tItemPipe != null) { - if (aBaseMetaTileEntity.getColorization() >= 0) { - byte tColor = tItemPipe.getColorization(); - if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { - continue; - } - } - if (tItemPipe instanceof BaseMetaPipeEntity) { - IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); - if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { - scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); - } - } - } - } - } - } - } - return aMap; - } - } -} +package gregtech.api.interfaces.metatileentity; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.util.GT_Utility; + +import java.util.Map; + +public interface IMetaTileEntityItemPipe extends IMetaTileEntity { + /** + * @return if this Pipe can still be used. + */ + boolean pipeCapacityCheck(); + + /** + * @return if this Pipe can still be used. + */ + boolean incrementTransferCounter(int aIncrement); + + /** + * Sends an ItemStack from aSender to the adjacent Blocks. + * + * @param aSender the BaseMetaTileEntity sending the Stack. + * @return if it was able to send something + */ + boolean sendItemStack(Object aSender); + + /** + * Executes the Sending Code for inserting Stacks into the TileEntities. + * + * @param aSender the BaseMetaTileEntity sending the Stack. + * @param aSide the Side of the PIPE facing the TileEntity. + * @return if this Side was allowed to Output into the Block. + */ + boolean insertItemStackIntoTileEntity(Object aSender, byte aSide); + + /** + * Can be used to make flow control Pipes, like Redpowers Restriction Tubes. + * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities. + * Negative Numbers to "suck" Items into a certain direction are also possible. + */ + int getStepSize(); + + /** + * Utility for the Item Network + */ + class Util { + /** + * @return a List of connected Item Pipes + */ + public static Map scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) { + aStep += aMetaTileEntity.getStepSize(); + if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck()) + if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) { + IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); + aMap.put(aMetaTileEntity, aStep); + for (byte i = 0, j = 0; i < 6; i++) { + if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) + continue; + j = GT_Utility.getOppositeSide(i); + if (aSuckItems) { + if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { + IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); + if (aBaseMetaTileEntity.getColorization() >= 0) { + byte tColor = tItemPipe.getColorization(); + if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { + continue; + } + } + if (tItemPipe instanceof BaseMetaPipeEntity) { + IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); + if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { + scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); + } + } + } + } else { + if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { + IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); + if (tItemPipe != null) { + if (aBaseMetaTileEntity.getColorization() >= 0) { + byte tColor = tItemPipe.getColorization(); + if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) { + continue; + } + } + if (tItemPipe instanceof BaseMetaPipeEntity) { + IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); + if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) { + scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); + } + } + } + } + } + } + } + return aMap; + } + } +} -- cgit