aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java')
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java58
1 files changed, 30 insertions, 28 deletions
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
index 73436e3b2a..47bec844ee 100644
--- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
+++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
@@ -29,28 +29,30 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
* @param aSide 0 - 5 = Vanilla Directions of YOUR Block the Energy gets inserted to. 6 = No specific Side (don't do Side checks for this Side)
* @return amount of used Amperes. 0 if not accepted anything.
*/
- public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage);
+ long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage);
/**
* Sided Energy Input
*/
- public boolean inputEnergyFrom(byte aSide);
- default public boolean inputEnergyFrom(byte aSide, boolean waitForActive) {
+ boolean inputEnergyFrom(byte aSide);
+
+ default boolean inputEnergyFrom(byte aSide, boolean waitForActive) {
return inputEnergyFrom(aSide);
}
/**
* Sided Energy Output
*/
- public boolean outputsEnergyTo(byte aSide);
- default public boolean outputsEnergyTo(byte aSide, boolean waitForActive) {
+ boolean outputsEnergyTo(byte aSide);
+
+ default boolean outputsEnergyTo(byte aSide, boolean waitForActive) {
return outputsEnergyTo(aSide);
}
/**
* Utility for the Network
*/
- public static class Util {
+ class Util {
/**
* Emits Energy to the E-net. Also compatible with adjacent IC2 TileEntities.
*
@@ -84,33 +86,33 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
if (rfOut > 32L * GregTech_API.mEUtoRF / 100L) {
int aExplosionPower = rfOut;
float tStrength =
- aExplosionPower < V[0] ? 1.0F :
- aExplosionPower < V[1] ? 2.0F :
- aExplosionPower < V[2] ? 3.0F :
- aExplosionPower < V[3] ? 4.0F :
- aExplosionPower < V[4] ? 5.0F :
- aExplosionPower < V[4] * 2 ? 6.0F :
- aExplosionPower < V[5] ? 7.0F :
- aExplosionPower < V[6] ? 8.0F :
- aExplosionPower < V[7] ? 9.0F :
- aExplosionPower < V[8] ? 10.0F :
- aExplosionPower < V[8] * 2 ? 11.0F :
- aExplosionPower < V[9] ? 12.0F :
- aExplosionPower < V[10] ? 13.0F :
- aExplosionPower < V[11] ? 14.0F :
- aExplosionPower < V[12] ? 15.0F :
- aExplosionPower < V[12] * 2 ? 16.0F :
- aExplosionPower < V[13] ? 17.0F :
- aExplosionPower < V[14] ? 18.0F :
- aExplosionPower < V[15] ? 19.0F : 20.0F;
+ aExplosionPower < V[0] ? 1.0F :
+ aExplosionPower < V[1] ? 2.0F :
+ aExplosionPower < V[2] ? 3.0F :
+ aExplosionPower < V[3] ? 4.0F :
+ aExplosionPower < V[4] ? 5.0F :
+ aExplosionPower < V[4] * 2 ? 6.0F :
+ aExplosionPower < V[5] ? 7.0F :
+ aExplosionPower < V[6] ? 8.0F :
+ aExplosionPower < V[7] ? 9.0F :
+ aExplosionPower < V[8] ? 10.0F :
+ aExplosionPower < V[8] * 2 ? 11.0F :
+ aExplosionPower < V[9] ? 12.0F :
+ aExplosionPower < V[10] ? 13.0F :
+ aExplosionPower < V[11] ? 14.0F :
+ aExplosionPower < V[12] ? 15.0F :
+ aExplosionPower < V[12] * 2 ? 16.0F :
+ aExplosionPower < V[13] ? 17.0F :
+ aExplosionPower < V[14] ? 18.0F :
+ aExplosionPower < V[15] ? 19.0F : 20.0F;
int tX = tTileEntity.xCoord, tY = tTileEntity.yCoord, tZ = tTileEntity.zCoord;
World tWorld = tTileEntity.getWorldObj();
GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ);
tWorld.setBlock(tX, tY, tZ, Blocks.air);
if (GregTech_API.sMachineExplosions)
- if(GT_Mod.gregtechproxy.mPollution)
- GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX,tZ), 100000);
- tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true);
+ if (GT_Mod.gregtechproxy.mPollution)
+ GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), 100000);
+ tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true);
}
}
}