diff options
author | Jason Mitchell <mitchej+github@gmail.com> | 2021-12-30 07:17:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-30 16:17:26 +0100 |
commit | c25c1bce2dd620c2d39b77f33c57c1fc08b1ecb8 (patch) | |
tree | e2156f28be30e48600841f8e770533c32684e51b /src/main/java/gregtech/api/interfaces/tileentity | |
parent | d5cce5f5d51ce2c4b9bd943e59c120ef2e55a5bf (diff) | |
download | GT5-Unofficial-c25c1bce2dd620c2d39b77f33c57c1fc08b1ecb8.tar.gz GT5-Unofficial-c25c1bce2dd620c2d39b77f33c57c1fc08b1ecb8.tar.bz2 GT5-Unofficial-c25c1bce2dd620c2d39b77f33c57c1fc08b1ecb8.zip |
Refactors for easier reading (#839)
* Refactors
* Common functionality to base classes
* GT Pre/Postload broken into more modular pieces
* Extract common (mainly cover related) functionality from BaseMetaTileEntity & BaseMetaPipeEntity
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/tileentity')
-rw-r--r-- | src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index 30a5230168..2b67e680a4 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -1,19 +1,12 @@ package gregtech.api.interfaces.tileentity; import cofh.api.energy.IEnergyReceiver; -import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.util.GT_Utility; -import gregtech.api.util.WorldSpawnedEventBuilder; -import gregtech.common.GT_Pollution; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.GT_Values.V; - /** * Interface for getting Connected to the GregTech Energy Network. * <p/> @@ -84,45 +77,6 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, false); rUsedAmperes++; } - if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && ((IEnergyReceiver) tTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600L) { - 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; - 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), GT_Mod.gregtechproxy.mPollutionOnExplosion); - - new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() - .setStrength(tStrength) - .setSmoking(true) - .setPosition(tX + 0.5, tY + 0.5, tZ + 0.5) - .setWorld(tWorld) - .run(); - } - } } } } |