diff options
author | Dream-Master <dream-master@gmx.net> | 2020-03-17 22:21:40 +0100 |
---|---|---|
committer | Dream-Master <dream-master@gmx.net> | 2020-03-17 22:21:40 +0100 |
commit | 0f6b03f927b2c482100b2ba46964db72c96156a0 (patch) | |
tree | 141bab113db4dbd76f6b3701d876f1c8e3f28b20 /src/main/java/gregtech/api/interfaces/metatileentity | |
parent | 28ed289c626555dda9f369780b28651a8c5f442e (diff) | |
parent | 5959633bc9eea56859e4e569c2aa8b8a427e5ea2 (diff) | |
download | GT5-Unofficial-0f6b03f927b2c482100b2ba46964db72c96156a0.tar.gz GT5-Unofficial-0f6b03f927b2c482100b2ba46964db72c96156a0.tar.bz2 GT5-Unofficial-0f6b03f927b2c482100b2ba46964db72c96156a0.zip |
Merge branch 'Refactor' into Bees
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/metatileentity')
4 files changed, 24 insertions, 22 deletions
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index 96c03bbd6d..16fe07812f 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -4,15 +4,16 @@ 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.
- */
- public int connect(byte aSide);
- /**
- * Try to disconnect to the Block at the specified side
- */
- public void disconnect(byte aSide);
+ /**
+ * 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);
- public boolean isConnectedAtSide(int 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/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index e973301395..a518b3baaf 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -389,7 +389,7 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand void onColorChangeClient(byte aColor); int getLightOpacity(); - + boolean allowGeneralRedstoneOutput(); void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider); @@ -402,9 +402,9 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand * The onCreated Function of the Item Class redirects here */ void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer); - + boolean hasAlternativeModeText(); - + String getAlternativeModeText(); boolean shouldJoinIc2Enet(); diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java index ead9c8bf8f..a7c1209d24 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java @@ -7,9 +7,9 @@ import java.util.HashSet; public interface IMetaTileEntityCable extends IMetaTileEntity { @Deprecated - public long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList); + long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList); - default public long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet<TileEntity> aAlreadyPassedSet) { + default long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet<TileEntity> aAlreadyPassedSet) { return transferElectricity(aSide, aVoltage, aAmperage, new ArrayList<>(aAlreadyPassedSet)); } }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java index 7187ccb04b..b61fe99904 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -10,12 +10,12 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { /**
* @return if this Pipe can still be used.
*/
- public boolean pipeCapacityCheck();
+ boolean pipeCapacityCheck();
/**
* @return if this Pipe can still be used.
*/
- public boolean incrementTransferCounter(int aIncrement);
+ boolean incrementTransferCounter(int aIncrement);
/**
* Sends an ItemStack from aSender to the adjacent Blocks.
@@ -23,7 +23,7 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { * @param aSender the BaseMetaTileEntity sending the Stack.
* @return if it was able to send something
*/
- public boolean sendItemStack(Object aSender);
+ boolean sendItemStack(Object aSender);
/**
* Executes the Sending Code for inserting Stacks into the TileEntities.
@@ -32,19 +32,19 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { * @param aSide the Side of the PIPE facing the TileEntity.
* @return if this Side was allowed to Output into the Block.
*/
- public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide);
+ 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.
*/
- public int getStepSize();
+ int getStepSize();
/**
* Utility for the Item Network
*/
- public static class Util {
+ class Util {
/**
* @return a List of connected Item Pipes
*/
@@ -55,7 +55,8 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { 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;
+ 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)) {
|