aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/generators
diff options
context:
space:
mode:
authorKiwi <42833050+Kiwi233@users.noreply.github.com>2021-07-05 22:06:44 +0800
committerGitHub <noreply@github.com>2021-07-05 22:06:44 +0800
commit4eaefbb5455dc3402b43dcbf6cba208cea4e301a (patch)
treeb7e34b2e20af663cdd72c616fd7424301304e3e4 /src/main/java/gregtech/common/tileentities/generators
parent36406947fc5c0de1ee71da2644ec057b5fbc8d25 (diff)
parent703a8930bee25b1f908e9c4ea4f52cef24337d03 (diff)
downloadGT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.tar.gz
GT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.tar.bz2
GT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.zip
Merge pull request #3 from GTNewHorizons/experimental
gregtech-5.09.35.00
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/generators')
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java78
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java66
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java88
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java102
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java83
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java116
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java71
8 files changed, 471 insertions, 166 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 c745bfae20..606af204e9 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
@@ -4,20 +4,20 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.item.ItemStack;
-public class GT_MetaTileEntity_DieselGenerator
- extends GT_MetaTileEntity_BasicGenerator {
+import static gregtech.api.enums.Textures.BlockIcons.*;
+
+public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator {
public static final int BASE_POLLUTION = 2;
@@ -40,18 +40,22 @@ public class GT_MetaTileEntity_DieselGenerator
onConfigLoad();
}
+ @Override
public boolean isOutputFacing(byte aSide) {
return aSide == getBaseMetaTileEntity().getFrontFacing();
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
return GT_Recipe.GT_Recipe_Map.sDieselFuels;
}
+ @Override
public int getCapacity() {
return 16000;
}
@@ -60,73 +64,107 @@ public class GT_MetaTileEntity_DieselGenerator
this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 5));
}
+ @Override
public int getEfficiency() {
return this.mEfficiency;
}
+ @Override
public int getFuelValue(ItemStack aStack) {
if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0;
long rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
- rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
+ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3L);
}
- if(rValue> Integer.MAX_VALUE){
+ if (rValue > Integer.MAX_VALUE) {
throw new ArithmeticException("Integer LOOPBACK!");
}
- return (int)rValue;
+ return (int) rValue;
}
@Override
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());
+ 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());
aBaseMetaTileEntity.setToFire();
}
super.onPostTick(aBaseMetaTileEntity, aTick);
}
+ @Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)};
+ 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
public int getPollution() {
- return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1));
+ return (int) (BASE_POLLUTION * Math.pow(2, mTier - 1));
}
}
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 ce03f6b505..02b42e2b2f 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
@@ -2,17 +2,16 @@ package gregtech.common.tileentities.generators;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
-public class GT_MetaTileEntity_GasTurbine
- extends GT_MetaTileEntity_BasicGenerator {
+import static gregtech.api.enums.Textures.BlockIcons.*;
+public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator {
public static final int BASE_POLLUTION = 1;
public int mEfficiency;
@@ -34,18 +33,22 @@ public class GT_MetaTileEntity_GasTurbine
onConfigLoad();
}
+ @Override
public boolean isOutputFacing(byte aSide) {
return aSide == getBaseMetaTileEntity().getFrontFacing();
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
return GT_Recipe.GT_Recipe_Map.sTurbineFuels;
}
+ @Override
public int getCapacity() {
return 16000;
}
@@ -55,52 +58,85 @@ public class GT_MetaTileEntity_GasTurbine
}
+ @Override
public int getEfficiency() {
return this.mEfficiency;
}
+ @Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)};
+ 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
public int getPollution() {
- return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1));
+ return (int) (BASE_POLLUTION * Math.pow(2, mTier - 1));
}
}
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 0057e87670..88d49075e5 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
@@ -1,17 +1,18 @@
package gregtech.common.tileentities.generators;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Textures;
+import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
-import gregtech.api.objects.GT_RenderedTexture;
+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;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
@@ -30,7 +31,20 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],aSide==1?(aActive ? new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) : new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)):Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]};
+ if (aSide != ForgeDirection.UP.ordinal()) {
+ 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()
+ };
}
@Override
@@ -38,6 +52,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
return null;
}
+ @Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
}
@@ -46,13 +61,13 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
World aWorld = aBaseMetaTileEntity.getWorld();
if (!aWorld.isRemote) {
- if(aBaseMetaTileEntity.getStoredEU()>0){
+ if (aBaseMetaTileEntity.getStoredEU() > 0) {
aBaseMetaTileEntity.setActive(true);
- aBaseMetaTileEntity.decreaseStoredEnergyUnits(aBaseMetaTileEntity.getStoredEU()/100+1, false);
- }else {
+ aBaseMetaTileEntity.decreaseStoredEnergyUnits(aBaseMetaTileEntity.getStoredEU() / 100 + 1, false);
+ } else {
aBaseMetaTileEntity.setActive(false);
}
-
+
if (aTick % 256 == 0 && (aWorld.isThundering() || (aWorld.isRaining() && XSTR_INSTANCE.nextInt(10) == 0))) {
int aRodValue = 0;
boolean isRodValid = true;
@@ -60,13 +75,13 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
int aY = aBaseMetaTileEntity.getYCoord();
int aZ = aBaseMetaTileEntity.getZCoord();
- for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight()-1; i++) {
+ for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) {
if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) {
aRodValue++;
} else {
isRodValid = false;
if (aBaseMetaTileEntity.getBlock(aX, i, aZ) != Blocks.air) {
- aRodValue=0;
+ aRodValue = 0;
break;
}
}
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 eda960bf2b..aceab00a02 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
@@ -2,21 +2,28 @@ package gregtech.common.tileentities.generators;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
-public class GT_MetaTileEntity_MagicEnergyConverter
- extends GT_MetaTileEntity_BasicGenerator {
-
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT;
+
+public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
public GT_MetaTileEntity_MagicEnergyConverter(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Put your strange stuff in here", new ITexture[0]);
+ super(aID, aName, aNameRegional, aTier, "Put your strange stuff in here");
onConfigLoad();
}
@@ -30,18 +37,22 @@ public class GT_MetaTileEntity_MagicEnergyConverter
onConfigLoad();
}
+ @Override
public boolean isOutputFacing(byte aSide) {
return aSide == getBaseMetaTileEntity().getFrontFacing();
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
return GT_Recipe.GT_Recipe_Map.sMagicFuels;
}
+ @Override
public int getCapacity() {
return 16000;
}
@@ -51,52 +62,95 @@ public class GT_MetaTileEntity_MagicEnergyConverter
}
+ @Override
public int getEfficiency() {
return this.mEfficiency;
}
+ @Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ return new ITexture[]{
+ super.getSides(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()};
}
+ @Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{
+ super.getFrontActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
+ OVERLAYS_ENERGY_OUT[mTier]};
}
+ @Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE)};
+ return new ITexture[]{
+ super.getBackActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ return new ITexture[]{
+ super.getTopActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ return new ITexture[]{
+ super.getSidesActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
@Override
public int getPollution() {
return 0;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index b92307002e..5516b355fd 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -4,13 +4,16 @@ import com.google.common.base.Enums;
import cpw.mods.fml.common.Loader;
import gregtech.api.GregTech_API;
import gregtech.api.enums.TC_Aspects;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.*;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Config;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDragonEgg;
import net.minecraft.enchantment.Enchantment;
@@ -27,16 +30,31 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.common.util.ForgeDirection;
-import thaumcraft.api.aspects.*;
+import thaumcraft.api.aspects.Aspect;
+import thaumcraft.api.aspects.AspectList;
+import thaumcraft.api.aspects.AspectSourceHelper;
+import thaumcraft.api.aspects.IAspectContainer;
import thaumcraft.api.visnet.VisNetHandler;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import static gregtech.api.enums.ConfigCategories.machineconfig;
import static gregtech.api.enums.GT_Values.MOD_ID_TC;
import static gregtech.api.enums.GT_Values.V;
-import static net.minecraft.util.EnumChatFormatting.*;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+import static net.minecraft.util.EnumChatFormatting.GRAY;
+import static net.minecraft.util.EnumChatFormatting.GREEN;
+import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE;
+import static net.minecraft.util.EnumChatFormatting.RESET;
+import static net.minecraft.util.EnumChatFormatting.UNDERLINE;
+import static net.minecraft.util.EnumChatFormatting.YELLOW;
interface MagicalEnergyBBListener {
void onMagicalEnergyBBUpdate();
@@ -46,17 +64,17 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
private static final boolean THAUMCRAFT_LOADED = Loader.isModLoaded(MOD_ID_TC);
private static final ConcurrentHashMap<UUID, GT_MetaTileEntity_MagicalEnergyAbsorber> sSubscribedCrystals = new ConcurrentHashMap<>(4);
- private static List<Aspect> sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() : new ArrayList<Aspect>();
+ private static final List<Aspect> sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() : new ArrayList<Aspect>();
private static boolean sAllowMultipleEggs = false;
private static GT_MetaTileEntity_MagicalEnergyAbsorber sActiveSiphon = null;
private static int sEnergyPerEndercrystal = 512;
private static int sEnergyFromVis = 20;
private static int sEnergyPerEssentia = 320;
- private static Map<Aspect, Integer> sAspectsEnergy = new HashMap<>();
+ private static final Map<Aspect, Integer> sAspectsEnergy = new HashMap<>();
private static int sDragonEggEnergyPerTick = 2048;
private int mEfficiency;
private int mMaxVisPerDrain;
- private MagicalEnergyBB mMagicalEnergyBB = new MagicalEnergyBB(this, mTier, mTier + 2);
+ private final MagicalEnergyBB mMagicalEnergyBB = new MagicalEnergyBB(this, mTier, mTier + 2);
private long mNextGenerateTickRate = 1;
private int mNoGenerationTicks = 0;
@@ -185,54 +203,84 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC),
- Textures.BlockIcons.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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ 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], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG)};
+ return new ITexture[]{
+ super.getTop(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_DRAGONEGG)};
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ return new ITexture[]{
+ super.getSides(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
+ return new ITexture[]{
+ super.getFrontActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
+ OVERLAYS_ENERGY_OUT[mTier]};
}
@Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE)};
+ return new ITexture[]{
+ super.getBackActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG)};
+ return new ITexture[]{
+ super.getTopActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_DRAGONEGG),
+ TextureFactory.builder().addIcon(MACHINE_CASING_DRAGONEGG_GLOW).glow().build()
+ };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ return new ITexture[]{
+ super.getSidesActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
@Override
@@ -470,12 +518,12 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
* Handles Bounding Box ranged operations for Magic sources
*/
static class MagicalEnergyBB {
- private GT_MetaTileEntity_MagicalEnergyAbsorber mAbsorber;
- private MagicalEnergyBBListener mListener;
- private int mDefaultTier;
+ private final GT_MetaTileEntity_MagicalEnergyAbsorber mAbsorber;
+ private final MagicalEnergyBBListener mListener;
+ private final int mDefaultTier;
private int mTier;
- private int mMaxTier;
- private List<UUID> mLivingCrystalIDs = new ArrayList<>();
+ private final int mMaxTier;
+ private final List<UUID> mLivingCrystalIDs = new ArrayList<>();
private List<Aspect> mAvailableAspects;
/**
@@ -639,4 +687,4 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
index c075fda8a4..0a99a4af05 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
@@ -2,20 +2,21 @@ package gregtech.common.tileentities.generators;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+
public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGenerator {
private int mEfficiency;
public GT_MetaTileEntity_NaquadahReactor(int aID, String aName, String[] aDescription, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, aDescription, new ITexture[0]);
+ super(aID, aName, aNameRegional, aTier, aDescription);
if (aTier > 8 || aTier < 4) {
new Exception("Tier without Recipe Map!").printStackTrace();
}
@@ -30,17 +31,20 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
onConfigLoad();
}
+ @Override
public boolean isOutputFacing(byte aSide) {
return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing());
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_NaquadahReactor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ return new GT_MetaTileEntity_NaquadahReactor(mName, mTier, mDescriptionArray, mTextures);
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
GT_Recipe.GT_Recipe_Map ret;
- switch (this.mTier){
+ switch (mTier) {
case 4: {
ret = GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels;
break;
@@ -57,11 +61,11 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
ret = GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels;
break;
}
- case 8:{
+ case 8: {
ret = GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels;
break;
}
- default:{
+ default: {
ret = null;
break;
}
@@ -70,60 +74,97 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return ret;
}
+ @Override
public int getCapacity() {
- return getRecipes() != null ? getRecipes().mMinimalInputFluids>0 ? 8000*(mTier+1) : 0 : 0 ;
+ return getRecipes() != null ? getRecipes().mMinimalInputFluids > 0 ? 8000 * (mTier + 1) : 0 : 0;
}
+ @Override
public int getEfficiency() {
return mEfficiency == 0 ? onConfigLoad() : mEfficiency;
}
- private int getBaseEff(){
- return mTier == 4 ? 80 : 100 + (50*(mTier-5));
+ private int getBaseEff() {
+ return mTier == 4 ? 80 : 100 + (50 * (mTier - 5));
}
public int onConfigLoad() {
- return this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + this.mTier, getBaseEff());
+ return mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + mTier, getBaseEff());
}
+ @Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)};
+ return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of(
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW).glow().build())};
}
+ @Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK)};
+ return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW).glow().build())};
}
+ @Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM)};
+ return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW).glow().build())};
}
+ @Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)};
+ return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW).glow().build())};
}
+ @Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE)};
+ return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW).glow().build())};
}
+ @Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE)};
+ return new ITexture[]{
+ super.getFrontActive(aColor)[0],
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE)};
+ return new ITexture[]{
+ super.getBackActive(aColor)[0],
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomActive(aColor)[0],
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)};
+ return new ITexture[]{
+ super.getTopActive(aColor)[0],
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW).glow().build()};
}
+ @Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE)};
+ return new ITexture[]{
+ super.getSidesActive(aColor)[0],
+ TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE),
+ TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW).glow().build()};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
index 52c7e1112c..4ab048a0f7 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
@@ -2,21 +2,24 @@ package gregtech.common.tileentities.generators;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
-public class GT_MetaTileEntity_PlasmaGenerator
- extends GT_MetaTileEntity_BasicGenerator {
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT;
+
+public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
public GT_MetaTileEntity_PlasmaGenerator(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Plasma into energy", new ITexture[0]);
+ super(aID, aName, aNameRegional, aTier, "Plasma into energy");
onConfigLoad();
}
@@ -30,73 +33,106 @@ public class GT_MetaTileEntity_PlasmaGenerator
onConfigLoad();
}
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
+ @Override
+ public ITexture[] getFront(byte aColor) {
+ return new ITexture[]{
+ super.getFront(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS),
+ OVERLAYS_ENERGY_OUT[mTier]};
}
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ @Override
+ public ITexture[] getBack(byte aColor) {
+ return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
- public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sPlasmaFuels;
+ @Override
+ public ITexture[] getBottom(byte aColor) {
+ return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
- public int getCapacity() {
- return 16000;
+ @Override
+ public ITexture[] getTop(byte aColor) {
+ return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10,10 + Math.min(90,this.mTier * 10)));
+ @Override
+ public ITexture[] getSides(byte aColor) {
+ return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
-
- public int getEfficiency() {
- return this.mEfficiency;
+ @Override
+ public ITexture[] getFrontActive(byte aColor) {
+ return new ITexture[]{
+ super.getFrontActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build(),
+ OVERLAYS_ENERGY_OUT[mTier]};
}
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ @Override
+ public ITexture[] getBackActive(byte aColor) {
+ return new ITexture[]{
+ super.getBackActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ @Override
+ public ITexture[] getBottomActive(byte aColor) {
+ return new ITexture[]{
+ super.getBottomActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ @Override
+ public ITexture[] getTopActive(byte aColor) {
+ return new ITexture[]{
+ super.getTopActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ @Override
+ public ITexture[] getSidesActive(byte aColor) {
+ return new ITexture[]{
+ super.getSidesActive(aColor)[0],
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ @Override
+ public boolean isOutputFacing(byte aSide) {
+ return aSide == getBaseMetaTileEntity().getFrontFacing();
}
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipes() {
+ return GT_Recipe.GT_Recipe_Map.sPlasmaFuels;
}
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ @Override
+ public int getEfficiency() {
+ return this.mEfficiency;
}
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ @Override
+ public int getCapacity() {
+ return 16000;
}
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10, 10 + Math.min(90, this.mTier * 10)));
}
- @Override
+ @Override
public int getPollution() {
return 0;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
index b248dc5aae..d7b3f03fde 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
@@ -2,16 +2,17 @@ package gregtech.common.tileentities.generators;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import net.minecraftforge.fluids.FluidStack;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+
public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
@@ -33,14 +34,17 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
onConfigLoad();
}
+ @Override
public boolean isOutputFacing(byte aSide) {
return aSide == getBaseMetaTileEntity().getFrontFacing();
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
return null;
}
@@ -55,6 +59,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return desc;
}
+ @Override
public int getCapacity() {
return 24000 * this.mTier;
}
@@ -63,60 +68,92 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier);
}
+ @Override
public int getEfficiency() {
return this.mEfficiency;
}
+ @Override
public int getFuelValue(FluidStack aLiquid) {
if (aLiquid == null) return 0;
- String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid);
- return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0;
+ return GT_ModHandler.isAnySteam(aLiquid) ? 3 : 0;
}
+ @Override
public int consumedFluidPerOperation(FluidStack aLiquid) {
return this.mEfficiency;
}
+ @Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_FRONT),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_GLOW).glow().build()),
+ OVERLAYS_ENERGY_OUT[this.mTier]};
}
+ @Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BACK)};
+ return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_BACK),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_GLOW).glow().build())};
}
+ @Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BOTTOM)};
+ return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_BOTTOM),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_GLOW).glow().build())};
}
+ @Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_TOP)};
+ return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_TOP),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_GLOW).glow().build())};
}
+ @Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE)};
+ return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_SIDE),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_GLOW).glow().build())};
}
+ @Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{super.getFrontActive(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW).glow().build()),
+ OVERLAYS_ENERGY_OUT[this.mTier]};
}
+ @Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BACK_ACTIVE)};
+ return new ITexture[]{super.getBackActive(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_BACK_ACTIVE),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW).glow().build())};
}
+ @Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BOTTOM_ACTIVE)};
+ return new ITexture[]{super.getBottomActive(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_BOTTOM_ACTIVE),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build())};
}
+ @Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_TOP_ACTIVE)};
+ return new ITexture[]{super.getTopActive(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_TOP_ACTIVE),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW).glow().build())};
}
+ @Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE)};
+ return new ITexture[]{super.getSidesActive(aColor)[0], TextureFactory.of(
+ TextureFactory.of(STEAM_TURBINE_SIDE_ACTIVE),
+ TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW).glow().build())};
}
@Override
@@ -126,7 +163,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
- if (aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")) {
+ if (GT_ModHandler.isSuperHeatedSteam(aFluid)) {
aFluid.amount = 0;
aFluid = null;
return false;