aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/generators
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-30 10:56:42 -0800
committerJason Mitchell <mitchej@gmail.com>2023-01-30 10:56:42 -0800
commit0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a (patch)
tree1e2c649f3a6ce3f6b2babd0098a5f4819e9cd0b6 /src/main/java/gregtech/common/tileentities/generators
parentf8cc82edeb9810c45cba762d733a2c909a302faa (diff)
downloadGT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.tar.gz
GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.tar.bz2
GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.zip
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/generators')
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java185
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java182
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java69
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java106
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java221
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java127
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java65
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java149
8 files changed, 401 insertions, 703 deletions
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
index 1b53de5b42..d2304cc948 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
@@ -3,6 +3,10 @@ package gregtech.common.tileentities.generators;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -20,22 +24,22 @@ import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, new String[] {
- "Requires liquid Fuel",
- "Causes "
- + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond
- * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier])
- + " Pollution per second"
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ aTier,
+ new String[] { "Requires liquid Fuel",
+ "Causes "
+ + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond
+ * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier])
+ + " Pollution per second" });
onConfigLoad();
}
@@ -98,8 +102,13 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aTick % 100 == 0 && mFluid != null && mFluid.amount > this.getCapacity()) {
GT_Log.err.println(
- "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() + " Coords: " + aBaseMetaTileEntity.getXCoord()
- + " " + aBaseMetaTileEntity.getYCoord() + " " + aBaseMetaTileEntity.getZCoord());
+ "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName()
+ + " Coords: "
+ + aBaseMetaTileEntity.getXCoord()
+ + " "
+ + aBaseMetaTileEntity.getYCoord()
+ + " "
+ + aBaseMetaTileEntity.getZCoord());
aBaseMetaTileEntity.setToFire();
}
super.onPostTick(aBaseMetaTileEntity, aTick);
@@ -120,152 +129,98 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
if (aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0
&& !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) {
- final double x =
- aBaseMetaTileEntity.getOffsetX(topFacing, 1) + 2D / 16D + XSTR_INSTANCE.nextFloat() * 14D / 16D;
+ final double x = aBaseMetaTileEntity.getOffsetX(topFacing, 1) + 2D / 16D
+ + XSTR_INSTANCE.nextFloat() * 14D / 16D;
final double y = aBaseMetaTileEntity.getOffsetY(topFacing, 1) + 1D / 32D;
- final double z =
- aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D + XSTR_INSTANCE.nextFloat() * 14D / 16D;
-
- new ParticleEventBuilder()
- .setMotion(0D, 0D, 0D)
- .setPosition(x, y, z)
- .setWorld(getBaseMetaTileEntity().getWorld())
- .setIdentifier(ParticleFX.SMOKE)
- .run();
+ final double z = aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D
+ + XSTR_INSTANCE.nextFloat() * 14D / 16D;
+
+ new ParticleEventBuilder().setMotion(0D, 0D, 0D).setPosition(x, y, z)
+ .setWorld(getBaseMetaTileEntity().getWorld()).setIdentifier(ParticleFX.SMOKE).run();
}
}
}
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_FRONT),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_FRONT_GLOW)
- .glow()
- .build()),
- OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_FRONT),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_GLOW).glow().build()),
+ OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_BACK),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_BACK_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_BACK),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_GLOW).glow().build()) };
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_BOTTOM),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_BOTTOM),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_GLOW).glow().build()) };
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_TOP),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_TOP_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_TOP),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_GLOW).glow().build()) };
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_SIDE),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_SIDE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getSides(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_SIDE),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_GLOW).glow().build()) };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW)
- .glow()
- .build()),
- OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW).glow().build()),
+ OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW).glow().build()) };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW).glow().build()) };
}
@Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW).glow().build()) };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE),
- TextureFactory.builder()
- .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE),
+ TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW).glow().build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
index b085d82bab..90b076abaa 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
@@ -18,25 +18,31 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
@Deprecated
public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, new String[] {
- "Requires flammable Gasses",
- "Causes "
- + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond
- * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier])
- + " Pollution per second"
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ aTier,
+ new String[] { "Requires flammable Gasses",
+ "Causes "
+ + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond
+ * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier])
+ + " Pollution per second" });
this.mEfficiency = 100 - aTier * 5;
onConfigLoad();
}
public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier, int mEfficiency) {
- super(aID, aName, aNameRegional, aTier, new String[] {
- "Requires flammable Gasses",
- "Causes "
- + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond
- * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier])
- + " Pollution per second"
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ aTier,
+ new String[] { "Requires flammable Gasses",
+ "Causes "
+ + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond
+ * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier])
+ + " Pollution per second" });
this.mEfficiency = mEfficiency;
onConfigLoad();
}
@@ -55,8 +61,8 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
onConfigLoad();
}
- public GT_MetaTileEntity_GasTurbine(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int mEfficiency) {
+ public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
+ int mEfficiency) {
super(aName, aTier, aDescription, aTextures);
this.mEfficiency = mEfficiency;
onConfigLoad();
@@ -70,7 +76,11 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_GasTurbine(
- this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mEfficiency);
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures,
+ this.mEfficiency);
}
@Override
@@ -84,8 +94,8 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(
- ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, this.mEfficiency);
+ this.mEfficiency = GregTech_API.sMachineFile
+ .get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, this.mEfficiency);
}
@Override
@@ -95,134 +105,84 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_FRONT),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_FRONT_GLOW)
- .glow()
- .build()),
- OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_FRONT),
+ TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_GLOW).glow().build()),
+ OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_BACK),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_BACK_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_BACK),
+ TextureFactory.builder().addIcon(GAS_TURBINE_BACK_GLOW).glow().build()) };
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_BOTTOM),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_BOTTOM_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_BOTTOM),
+ TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_GLOW).glow().build()) };
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_TOP),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_TOP_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_TOP),
+ TextureFactory.builder().addIcon(GAS_TURBINE_TOP_GLOW).glow().build()) };
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_SIDE),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_SIDE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getSides(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_SIDE),
+ TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_GLOW).glow().build()) };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW)
- .glow()
- .build()),
- OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW).glow().build()),
+ OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_BACK_ACTIVE),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_BACK_ACTIVE),
+ TextureFactory.builder().addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW).glow().build()) };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE),
+ TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build()) };
}
@Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_TOP_ACTIVE),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_TOP_ACTIVE),
+ TextureFactory.builder().addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW).glow().build()) };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0],
- TextureFactory.of(
- TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE),
- TextureFactory.builder()
- .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW)
- .glow()
- .build())
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ TextureFactory.of(
+ TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE),
+ TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW).glow().build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
index dbb8931848..2436beba77 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
@@ -2,6 +2,13 @@ package gregtech.common.tileentities.generators;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
@@ -9,54 +16,35 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.render.TextureFactory;
-import net.minecraft.entity.effect.EntityLightningBolt;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMachineBlock {
+
public GT_MetaTileEntity_LightningRod(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 0, "Generates EU From Lightning Bolts");
}
- public GT_MetaTileEntity_LightningRod(
- String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
- public GT_MetaTileEntity_LightningRod(
- String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide != ForgeDirection.UP.ordinal()) {
- return new ITexture[] {
- BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]
- };
+ return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
+ BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] };
}
- if (!aActive)
- return new ITexture[] {
- BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS)
- };
- return new ITexture[] {
- BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder()
- .addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
- .glow()
- .build()
- };
+ if (!aActive) return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
+ TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS) };
+ return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
+ TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
}
@Override
@@ -67,7 +55,11 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LightningRod(
- this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.mInventory.length,
+ this.mDescriptionArray,
+ this.mTextures);
}
@Override
@@ -90,10 +82,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) {
if (isRodValid
- && aBaseMetaTileEntity
- .getBlock(aX, i, aZ)
- .getUnlocalizedName()
- .equals("blockFenceIron")) {
+ && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) {
aRodValue++;
} else {
isRodValid = false;
@@ -105,8 +94,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
}
if (!aWorld.isThundering() && ((aY + aRodValue) < 128)) aRodValue = 0;
if (XSTR_INSTANCE.nextInt(4 * aWorld.getHeight()) < (aRodValue * (aY + aRodValue))) {
- aBaseMetaTileEntity.increaseStoredEnergyUnits(
- maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false);
+ aBaseMetaTileEntity
+ .increaseStoredEnergyUnits(maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false);
aWorld.addWeatherEffect(new EntityLightningBolt(aWorld, aX, aY + aRodValue, aZ));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
index 2e1bfd655f..6bc904d384 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
@@ -20,6 +20,7 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_BasicGenerator {
+
public int mEfficiency;
public GT_MetaTileEntity_MagicEnergyConverter(int aID, String aName, String aNameRegional, int aTier) {
@@ -27,14 +28,14 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
onConfigLoad();
}
- public GT_MetaTileEntity_MagicEnergyConverter(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
onConfigLoad();
}
- public GT_MetaTileEntity_MagicEnergyConverter(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
onConfigLoad();
}
@@ -47,7 +48,10 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_MagicEnergyConverter(
- this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures);
}
@Override
@@ -74,112 +78,64 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
- OVERLAYS_ENERGY_OUT[mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
+ OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0],
- TextureFactory.of(MACHINE_CASING_MAGIC_FRONT),
- TextureFactory.builder()
- .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW)
- .glow()
- .build()
- };
+ return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build() };
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0],
- TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()
- };
+ return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()
- };
+ return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0],
- TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()
- };
+ return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFact