aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2021-05-20 22:57:12 +0200
committerLéa Gris <lea.gris@noiraude.net>2021-05-21 13:41:21 +0200
commit678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7 (patch)
treef275c84399e59b714bcd9a70f0ffa6d6020f5ffe /src/main/java/gregtech/common
parent04468545985a4fed401d9b6626670e8af5938920 (diff)
downloadGT5-Unofficial-678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7.tar.gz
GT5-Unofficial-678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7.tar.bz2
GT5-Unofficial-678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7.zip
feat(render): implementation-free api texture factory
Provides an implementation-free API Texture factory an builder. Deprecates gregtech.api.objects.GT_*Texture.java classes Once all GregTech add-on will be migrated to the new implemnetation-free API, changes to the implementation will not affect the add-on. For now, this API allow rendering of in-world glow textures. In-inventory/hand rendering of glow texture require implementation changes that are postponed until no add-on uses the deprecated embedded implementation API.
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings1.java6
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings2.java15
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings3.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings4.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings5.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings6.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings8.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores.java23
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java10
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java82
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java156
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java78
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java18
-rw-r--r--src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java123
-rw-r--r--src/main/java/gregtech/common/render/GT_MultiTexture.java58
-rw-r--r--src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java213
-rw-r--r--src/main/java/gregtech/common/render/GT_RenderedTexture.java214
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Block.java22
-rw-r--r--src/main/java/gregtech/common/render/GT_SidedTexture.java75
-rw-r--r--src/main/java/gregtech/common/render/GT_StdRenderedTexture.java36
-rw-r--r--src/main/java/gregtech/common/render/GT_TextureBuilder.java107
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java17
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java19
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java14
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java14
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java17
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java37
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java43
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java57
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java22
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java16
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java25
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java18
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java29
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java44
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java17
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java528
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java14
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java18
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java74
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java108
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java98
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java104
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java23
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java23
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java20
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java7
109 files changed, 2205 insertions, 1361 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
index 03ff557b7f..9669d84883 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
@@ -2,7 +2,7 @@ package gregtech.common.blocks;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -27,8 +27,8 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
public GT_Block_Casings1() {
super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE);
- for (int i = 0; i < 16; i = i+1) {
- Textures.BlockIcons.casingTexturePages[0][i] = new GT_CopiedBlockTexture(this, 6, i);
+ for (int i = 0; i < 16; i++) {
+ Textures.BlockIcons.casingTexturePages[0][i] = TextureFactory.of(this, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
index 381220215a..b534d5dfc9 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
@@ -3,7 +3,7 @@ package gregtech.common.blocks;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
@@ -11,17 +11,18 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
public class GT_Block_Casings2 extends GT_Block_Casings_Abstract {
public GT_Block_Casings2() {
super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE);
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- if (i != 6){
- Textures.BlockIcons.casingTexturePages[0][(i + 16)] = new GT_CopiedBlockTexture(this, 6, i);
- }
- }
+ for (int i = 0; i < 16; i++) {
+ if (i != 6) {
+ Textures.BlockIcons.casingTexturePages[0][(i + 16)] = TextureFactory.of(this, i);
+ }
+ }
//Special handler for Pyrolyse Oven Casing on hatches...
- Textures.BlockIcons.casingTexturePages[0][22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa);
+ Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 0, ForgeDirection.UNKNOWN, Dyes.MACHINE_METAL.mRGBa);
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java
index 66ee88ab56..bd50a559d2 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java
@@ -2,7 +2,7 @@ package gregtech.common.blocks;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -11,7 +11,7 @@ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract {
public GT_Block_Casings3() {
super(GT_Item_Casings3.class, "gt.blockcasings3", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.casingTexturePages[0][(i + 32)] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.casingTexturePages[0][(i + 32)] = TextureFactory.of(this, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Yellow Stripes Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Yellow Stripes Block");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
index b0a532b96e..ae327a0a7b 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
@@ -6,7 +6,7 @@ import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
import net.minecraft.item.ItemStack;
@@ -20,7 +20,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
public GT_Block_Casings4() {
super(GT_Item_Casings4.class, "gt.blockcasings4", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.casingTexturePages[0][(i + 48)] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.casingTexturePages[0][(i + 48)] = TextureFactory.of(this, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Robust Tungstensteel Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java
index 786b6464ad..296bf765b0 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java
@@ -6,7 +6,7 @@ import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IHeatingCoil;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -20,7 +20,7 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea
public GT_Block_Casings5() {
super(GT_Item_Casings5.class, "gt.blockcasings5", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.casingTexturePages[1][i] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.casingTexturePages[1][i] = TextureFactory.of(this, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Cupronickel Coil Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Kanthal Coil Block");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java
index a2fcf614fc..2f8304fab3 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java
@@ -4,7 +4,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -14,7 +14,7 @@ public class GT_Block_Casings6 extends GT_Block_Casings_Abstract {
public GT_Block_Casings6() {
super(GT_Item_Casings6.class, "gt.blockcasings6", GT_Material_Casings.INSTANCE);
for (int i = 0; i < 16; i = (i + 1)) {
- Textures.BlockIcons.casingTexturePages[8][i + 112] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.casingTexturePages[8][i + 112] = TextureFactory.of(this, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Hermetic Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
index 11b608cd9c..bb151afafa 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
@@ -4,7 +4,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -15,7 +15,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract {
public GT_Block_Casings8() {
super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE);
for (int i = 0; i < 5; i = (i + 1)) {
- Textures.BlockIcons.casingTexturePages[1][i+48] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.casingTexturePages[1][i+48] = TextureFactory.of(this, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemically Inert Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "PTFE Pipe Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
index 3d912feb1a..c3f53a7bc5 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
@@ -4,14 +4,19 @@ import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
-import gregtech.api.render.GT_CopiedBlockTexture;
-import gregtech.api.render.GT_StdRenderedTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
+import java.util.Arrays;
+
+import static gregtech.api.enums.Textures.BlockIcons.BASALT_STONE;
+import static gregtech.api.enums.Textures.BlockIcons.GRANITE_BLACK_STONE;
+import static gregtech.api.enums.Textures.BlockIcons.GRANITE_RED_STONE;
+import static gregtech.api.enums.Textures.BlockIcons.MARBLE_STONE;
+
public class GT_Block_Ores extends GT_Block_Ores_Abstract {
public GT_Block_Ores() {
super("gt.blockores", 7, false, Material.rock);
@@ -57,7 +62,15 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract {
}
@Override
- public ITexture[] getTextureSet() { //Must have 16 entries.
- return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_StdRenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_StdRenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_StdRenderedTexture(Textures.BlockIcons.MARBLE_STONE), new GT_StdRenderedTexture(Textures.BlockIcons.BASALT_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)};
+ public ITexture[] getTextureSet() {
+ final ITexture[] rTextures = new ITexture[16]; //Must have 16 entries.
+ Arrays.fill(rTextures, TextureFactory.of(Blocks.stone));
+ rTextures[1] = TextureFactory.of(Blocks.netherrack);
+ rTextures[2] = TextureFactory.of(Blocks.end_stone);
+ rTextures[3] = TextureFactory.builder().addIcon(GRANITE_BLACK_STONE).stdOrient().build();
+ rTextures[4] = TextureFactory.builder().addIcon(GRANITE_RED_STONE).stdOrient().build();
+ rTextures[5] = TextureFactory.builder().addIcon(MARBLE_STONE).stdOrient().build();
+ rTextures[6] = TextureFactory.builder().addIcon(BASALT_STONE).stdOrient().build();
+ return rTextures;
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java
index d597403a20..6749f8d136 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java
@@ -5,7 +5,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
@@ -50,6 +50,6 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract {
@Override
public ITexture[] getTextureSet() { //Must have 16 entries.
- return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)};
+ return new ITexture[]{TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7)};
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java
index 876e71b36d..5d78ab0aa3 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java
@@ -5,7 +5,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
@@ -50,6 +50,6 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract {
@Override
public ITexture[] getTextureSet() { //Must have 16 entries.
- return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)};
+ return new ITexture[]{TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7)};
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java
index 0335276d67..e4111af1c5 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java
@@ -5,7 +5,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
@@ -50,6 +50,6 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract {
@Override
public ITexture[] getTextureSet() { //Must have 16 entries.
- return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)};
+ return new ITexture[]{TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7)};
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
index 27a9dcc909..fd4e5475e2 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -8,7 +8,7 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
import gregtech.api.items.GT_Generic_Block;
-import gregtech.api.render.GT_CopiedBlockTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.WorldSpawnedEventBuilder;
@@ -39,8 +39,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
public GT_Block_Reinforced(String aName) {
super(GT_Item_Storage.class, aName, new GT_Material_Reinforced());
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.casingTexturePages[1][i + 80] = new GT_CopiedBlockTexture(this, 6, i);
+ for (int i = 0; i < 16; i++) {
+ Textures.BlockIcons.casingTexturePages[1][i + 80] = TextureFactory.of(this, i);
}
setStepSound(soundTypeStone);
setCreativeTab(GregTech_API.TAB_GREGTECH);
@@ -70,8 +70,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10));
ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11));
ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12));
- GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1, new Object[0])});
- GT_ModHandler.addCraftingRecipe(ItemList.Block_Powderbarrel.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WSW","GGG","WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', new ItemStack(Items.gunpowder,1),'S',new ItemStack(Items.string,1)});
+ GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Block_Powderbarrel.get(1L),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WSW","GGG","WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', new ItemStack(Items.gunpowder,1),'S',new ItemStack(Items.string,1)});
}
diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
index 1c327afa41..851857fca2 100644
--- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
@@ -7,9 +7,8 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
-import gregtech.api.render.GT_CopiedBlockTexture;
-import gregtech.api.render.GT_StdRenderedTexture;
import gregtech.api.objects.XSTR;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
@@ -23,6 +22,8 @@ import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.Random;
+import static gregtech.api.enums.TextureSet.SET_NONE;
+
public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntity {
public short mMetaData = 0;
public boolean mNatural = false;
@@ -31,7 +32,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
public static byte getHarvestData(short aMetaData, int aBaseBlockHarvestLevel) {
Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)];
byte tByte = aMaterial == null ? 0 : (byte) Math.max(aBaseBlockHarvestLevel, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1)));
- if(GT_Mod.gregtechproxy.mChangeHarvestLevels ) {
+ if (GT_Mod.gregtechproxy.mChangeHarvestLevels) {
tByte = aMaterial == null ? 0 : (byte) Math.max(aBaseBlockHarvestLevel, Math.min(GT_Mod.gregtechproxy.mMaxHarvestLevel, GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - (aMetaData < 16000 ? 0 : 1)));
}
return tByte;
@@ -147,38 +148,38 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
}
public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) {
- if(this.worldObj == null || blockType==null)return;
- this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
- if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
- this.mMetaData = ((short) (this.mMetaData + 1000));
- } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) {
- this.mMetaData = ((short) (this.mMetaData + 2000));
- } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) {
- if (aOverridingStoneBlock == GregTech_API.sBlockGranites) {
- if (aOverridingStoneMeta < 8) {
- this.mMetaData = ((short) (this.mMetaData + 3000));
- } else {
- this.mMetaData = ((short) (this.mMetaData + 4000));
- }
- } else {
+ if (this.worldObj == null || blockType == null) return;
+ this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
+ if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
+ this.mMetaData = ((short) (this.mMetaData + 1000));
+ } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) {
+ this.mMetaData = ((short) (this.mMetaData + 2000));
+ } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) {
+ if (aOverridingStoneBlock == GregTech_API.sBlockGranites) {
+ if (aOverridingStoneMeta < 8) {
this.mMetaData = ((short) (this.mMetaData + 3000));
- }
- } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockStones)) {
- if (aOverridingStoneBlock == GregTech_API.sBlockStones) {
- if (aOverridingStoneMeta < 8) {
- this.mMetaData = ((short) (this.mMetaData + 5000));
- } else {
- this.mMetaData = ((short) (this.mMetaData + 6000));
- }
} else {
+ this.mMetaData = ((short) (this.mMetaData + 4000));
+ }
+ } else {
+ this.mMetaData = ((short) (this.mMetaData + 3000));
+ }
+ } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockStones)) {
+ if (aOverridingStoneBlock == GregTech_API.sBlockStones) {
+ if (aOverridingStoneMeta < 8) {
this.mMetaData = ((short) (this.mMetaData + 5000));
+ } else {
+ this.mMetaData = ((short) (this.mMetaData + 6000));
}
+ } else {
+ this.mMetaData = ((short) (this.mMetaData + 5000));
}
- this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData, ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), 0);
+ }
+ this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData, ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), 0);
}
public void convertOreBlock(World aWorld, int aX, int aY, int aZ) {
- short aMeta = ((short) (int) (this.mMetaData % 1000 + (this.mMetaData / 16000 * 16000)));
+ short aMeta = ((short) (this.mMetaData % 1000 + (this.mMetaData / 16000 * 16000)));
aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1);
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof GT_TileEntity_Ores) {
@@ -196,7 +197,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
}
public ArrayList<ItemStack> getDrops(Block aDroppedOre, int aFortune) {
- ArrayList<ItemStack> rList = new ArrayList();
+ ArrayList<ItemStack> rList = new ArrayList<>();
if (this.mMetaData <= 0) {
rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
return rList;
@@ -214,7 +215,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
}
if (aMaterial != null) {
Random tRandom = new XSTR(this.xCoord ^ this.yCoord ^ this.zCoord);
- ArrayList<ItemStack> tSelector = new ArrayList();
+ ArrayList<ItemStack> tSelector = new ArrayList<>();
ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
@@ -259,15 +260,16 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
tSelector.add(tStack);
}
}
- if (tSelector.size() > 0) {
+ if (!tSelector.isEmpty()) {
int i = 0;
for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) {
- rList.add(GT_Utility.copyAmount(1L, new Object[]{tSelector.get(tRandom.nextInt(tSelector.size()))}));
+ rList.add(GT_Utility.copyAmount(1L, tSelector.get(tRandom.nextInt(tSelector.size()))));
}
}
if (tRandom.nextInt(3 + aFortune) > 1) {
Materials dustMat = ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000 % 16];
- if (dustMat != null) rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L));
+ if (dustMat != null)
+ rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L));
}
}
return rList;
@@ -276,11 +278,21 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
public ITexture[] getTexture(Block aBlock, byte aSide) {
Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
if ((aMaterial != null) && (this.mMetaData < 32000)) {
- GT_StdRenderedTexture aIconSet = new GT_StdRenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa);
+ ITexture iTexture = TextureFactory.builder()
+ .addIcon(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ?
+ OrePrefixes.ore.mTextureIndex :
+ OrePrefixes.oreSmall.mTextureIndex])
+ .setRGBA(aMaterial.mRGBa)
+ .stdOrient()
+ .build();
if (aBlock instanceof GT_Block_Ores_Abstract) {
- return new ITexture[]{((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], aIconSet};
+ return new ITexture[]{
+ ((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture};
}
}
- return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_StdRenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])};
+ return new ITexture[]{
+ TextureFactory.of(Blocks.stone, 0),
+ TextureFactory.builder().addIcon(SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]).stdOrient().build()
+ };
}
}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index 03879f4767..c12a49b73e 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -10,16 +10,12 @@ import gregtech.api.enums.OreDictNames;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
import gregtech.api.enums.TC_Aspects;
-import gregtech.api.enums.Textures;
-import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.IItemBehaviour;
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.items.GT_MetaGenerated_Item_X32;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
import gregtech.api.objects.MaterialStack;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_FoodStat;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_ModHandler;
@@ -74,11 +70,15 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+
public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
public static GT_MetaGenerated_Item_01 INSTANCE;
private final String mToolTipPurify = GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust");
- private final static String aTextArrow = " A";private final static String aTextStick = " S ";private final static String aTextFeather = "F ";
- private final static String aTextEmptyRow = " "; private final static String aTextShape = " P ";
+ private static final String aTextArrow = " A";
+ private static final String aTextStick = " S ";
+ private static final String aTextFeather = "F ";
+ private static final String aTextEmptyRow = " "; private static final String aTextShape = " P ";
public GT_MetaGenerated_Item_01() {
super("metaitem.01", OrePrefixes.dustTiny, OrePrefixes.dustSmall, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.gem, OrePrefixes.nugget, null, OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.cell, OrePrefixes.cellPlasma);
@@ -89,7 +89,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600);
GT_OreDictUnificator.addToBlacklist(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID));
GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID));
- GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE), null);
+ GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), TextureFactory.of(COVER_WOOD_PLATE), null);
ItemStack tStack = new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID);
tStack.setStackDisplayName("The holy Planks of Sengir");
@@ -541,16 +541,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Electric_Pump_UHV.set(addItem(618, "Electric Pump (UHV)", "20.971.520 L/sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L)));
ItemList.Electric_Pump_UEV.set(addItem(619, "Electric Pump (UEV)", "41.943.040 L/sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L)));
- GregTech_API.registerCover(ItemList.Electric_Pump_LV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(32));
- GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(128));
- GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(512));
- GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(2048));
- GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(8192));
- GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(32768));
- GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(131072));
- GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(524288));
- GregTech_API.registerCover(ItemList.Electric_Pump_UHV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(1048576));
- GregTech_API.registerCover(ItemList.Electric_Pump_UEV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_Pump(2097152));
+ GregTech_API.registerCover(ItemList.Electric_Pump_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(32));
+ GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(128));
+ GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(512));
+ GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(2048));
+ GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(8192));
+ GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(32768));
+ GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(131072));
+ GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(524288));
+ GregTech_API.registerCover(ItemList.Electric_Pump_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(1048576));
+ GregTech_API.registerCover(ItemList.Electric_Pump_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(2097152));
ItemList.Steam_Valve_LV.set(addItem(620, "Steam Valve (LV)", "20.480 L/sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)));
ItemList.Steam_Valve_MV.set(addItem(621, "Steam Valve (MV)", "40.960 L/sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)));
@@ -558,11 +558,11 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Steam_Valve_EV.set(addItem(623, "Steam Valve (EV)", "163.840 L/sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)));
ItemList.Steam_Valve_IV.set(addItem(624, "Steam Valve (IV)", "327.680 L/sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)));
- GregTech_API.registerCover(ItemList.Steam_Valve_LV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)), new GT_Cover_SteamValve(1024));
- GregTech_API.registerCover(ItemList.Steam_Valve_MV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)), new GT_Cover_SteamValve(2048));
- GregTech_API.registerCover(ItemList.Steam_Valve_HV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)), new GT_Cover_SteamValve(4096));
- GregTech_API.registerCover(ItemList.Steam_Valve_EV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)), new GT_Cover_SteamValve(8192));
- GregTech_API.registerCover(ItemList.Steam_Valve_IV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)), new GT_Cover_SteamValve(16384));
+ GregTech_API.registerCover(ItemList.Steam_Valve_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(1024));
+ GregTech_API.registerCover(ItemList.Steam_Valve_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(2048));
+ GregTech_API.registerCover(ItemList.Steam_Valve_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(4096));
+ GregTech_API.registerCover(ItemList.Steam_Valve_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(8192));
+ GregTech_API.registerCover(ItemList.Steam_Valve_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(16384));
ItemList.FluidRegulator_LV.set(addItem(tLastID = 660, "Fluid Regulator (LV)", "Configuable up to 640 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click"));
ItemList.FluidRegulator_MV.set(addItem(tLastID = 661, "Fluid Regulator (MV)", "Configuable up to 2.560 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click"));
@@ -573,19 +573,19 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.FluidRegulator_ZPM.set(addItem(tLastID = 666, "Fluid Regulator (ZPM)", "Configuable up to 2.621.440 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click"));
ItemList.FluidRegulator_UV.set(addItem(tLastID = 667, "Fluid Regulator (UV)", "Configuable up to 10.485.760 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click"));
- GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32));
- GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(128));
- GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(512));
- GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(2048));
- GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(8192));
- GregTech_API.registerCover(ItemList.FluidRegulator_LuV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32768));
- GregTech_API.registerCover(ItemList.FluidRegulator_ZPM.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(131072));
- GregTech_API.registerCover(ItemList.FluidRegulator_UV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)), new GT_Cover_FluidRegulator(524288));
+ GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32));
+ GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(128));
+ GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(512));
+ GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(2048));
+ GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(8192));
+ GregTech_API.registerCover(ItemList.FluidRegulator_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32768));
+ GregTech_API.registerCover(ItemList.FluidRegulator_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(131072));
+ GregTech_API.registerCover(ItemList.FluidRegulator_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(524288));
ItemList.FluidFilter.set(addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type"));
- GregTech_API.registerCover(ItemList.FluidFilter.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)), new GT_Cover_Fluidfilter());
+ GregTech_API.registerCover(ItemList.FluidFilter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Fluidfilter());
- /**ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) }));
+ /*ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) }));
ItemList.Rotor_MV.set(addItem(tLastID = 621, "Bronze Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Bronze), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L) }));
ItemList.Rotor_HV.set(addItem(tLastID = 622, "Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Steel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L) }));
ItemList.Rotor_EV.set(addItem(tLastID = 623, "Stainless Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.StainlessSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L) }));
@@ -617,16 +617,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.AnyRubber)});
GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', OrePrefixes.plate.get(Materials.AnySyntheticRubber)});
- GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(400, 1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(100, 1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(20, 1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(4, 1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 1));
- GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 2));
- GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 4));
- GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 8));
- GregTech_API.registerCover(ItemList.Conveyor_Module_UHV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 16));
- GregTech_API.registerCover(ItemList.Conveyor_Module_UEV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[10][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 32));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(400, 1));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(100, 1));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(20, 1));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(4, 1));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 1));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 2));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 4));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 8));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 16));
+ GregTech_API.registerCover(ItemList.Conveyor_Module_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 32));
ItemList.Electric_Piston_LV.set(addItem(640, "Electric Piston (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)));
ItemList.Electric_Piston_MV.set(addItem(641, "Electric Piston (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L)));
@@ -662,16 +662,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)});
GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)});
- GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(400));
- GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(100));
- GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(20));
- GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(4));
- GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_LuV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_ZPM.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_UV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_UHV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(1));
- GregTech_API.registerCover(ItemList.Robot_Arm_UEV.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[10][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)), new GT_Cover_Arm(1));
+ GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(400));
+ GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(100));
+ GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(20));
+ GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(4));
+ GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1));
+ GregTech_API.registerCover(ItemList.Robot_Arm_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1));
+ GregTech_API.registerCover(ItemList.Robot_Arm_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1));
+ GregTech_API.registerCover(ItemList.Robot_Arm_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1));
+ GregTech_API.registerCover(ItemList.Robot_Arm_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1));
+ GregTech_API.registerCover(ItemList.Robot_Arm_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1));
ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye"));
ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star"));
@@ -780,12 +780,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Cover_PlayerDetector.set(addItem(tLastID = 735, "Player Detector Cover", "Gives out close Players as Redstone", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)));
GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), ItemList.Cover_PlayerDetector.get(1L), 3200, 128);
- GregTech_API.registerCover(ItemList.Cover_Controller.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONTROLLER)), new GT_Cover_ControlsWork());
- GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_MultiTexture(new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR), new GT_RenderedGlowTexture(BlockIcons.OVERLAY_ACTIVITYDETECTOR_GLOW))), new GT_Cover_DoesWork());
- GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)), new GT_Cover_LiquidMeter());
- GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ITEMDETECTOR)), new GT_Cover_ItemMeter());
- GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ENERGYDETECTOR)), new GT_Cover_EUMeter());
- GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_MultiTexture(new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR), new GT_RenderedGlowTexture(BlockIcons.OVERLAY_ACTIVITYDETECTOR_GLOW))), new GT_Cover_PlayerDetector());
+ GregTech_API.registerCover(ItemList.Cover_Controller.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONTROLLER)), new GT_Cover_ControlsWork());
+ GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_DoesWork());
+ GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_LiquidMeter());
+ GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ITEMDETECTOR)), new GT_Cover_ItemMeter());
+ GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ENERGYDETECTOR)), new GT_Cover_EUMeter());
+ GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_PlayerDetector());
ItemList.Cover_Screen.set(addItem(tLastID = 740, "Computer Monitor Cover", "Displays Data and GUI", new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L)));
ItemList.Cover_Crafting.set(addItem(tLastID = 744, "Crafting Table Cover", "Better than a wooden Workbench", new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L)));
@@ -806,10 +806,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), new ItemStack(Blocks.crafting_table, 1), ItemList.Cover_Crafting.get(1L), 800, 16);
GT_Values.RA.addAssemblerRecipe(ItemList.Cover_Shutter.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), ItemList.FluidFilter.get(1L), 800, 4);
- GregTech_API.registerCover(ItemList.Cover_Screen.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_MultiTexture(new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCREEN), new GT_RenderedGlowTexture(Textures.BlockIcons.OVERLAY_SCREEN_GLOW))), new GT_Cover_Screen());
- GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CRAFTING)), new GT_Cover_Crafting());
- GregTech_API.registerCover(ItemList.Cover_Drain.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[0][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DRAIN)), new GT_Cover_Drain());
- GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SHUTTER)), new GT_Cover_Shutter());
+ GregTech_API.registerCover(ItemList.Cover_Screen.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_SCREEN), TextureFactory.builder().addIcon(OVERLAY_SCREEN_GLOW).glow().build())), new GT_Cover_Screen());
+ GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CRAFTING)), new GT_Cover_Crafting());
+ GregTech_API.registerCover(ItemList.Cover_Drain.get(1L), TextureFactory.of(MACHINE_CASINGS[0][0], TextureFactory.of(OVERLAY_DRAIN)), new GT_Cover_Drain());
+ GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Shutter());
ItemList.Cover_SolarPanel.set(addItem(tLastID = 750, "Solar Panel", "May the Sun be with you (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L)));
ItemList.Cover_SolarPanel_8V.set(addItem(tLastID = 751, "Solar Panel (8V)", "8 Volt Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L)));
@@ -822,16 +822,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Cover_SolarPanel_ZPM.set(addItem(tLastID = 758, "Solar Panel (ZPM)", "ZPM Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)));
ItemList.Cover_SolarPanel_UV.set(addItem(tLastID = 759, "Solar Panel (UV)", "Ultimate Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L)));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL), new GT_Cover_SolarPanel(1));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), new GT_Cover_SolarPanel(8));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_Cover_SolarPanel(32));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_Cover_SolarPanel(128));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), new GT_Cover_SolarPanel(512));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_Cover_SolarPanel(2048));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_Cover_SolarPanel(8192));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_Cover_SolarPanel(524288));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel.get(1L), TextureFactory.of(SOLARPANEL), new GT_Cover_SolarPanel(1));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L), TextureFactory.of(SOLARPANEL_8V), new GT_Cover_SolarPanel(8));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L), TextureFactory.of(SOLARPANEL_LV), new GT_Cover_SolarPanel(32));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L), TextureFactory.of(SOLARPANEL_MV), new GT_Cover_SolarPanel(128));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L), TextureFactory.of(SOLARPANEL_HV), new GT_Cover_SolarPanel(512));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L), TextureFactory.of(SOLARPANEL_EV), new GT_Cover_SolarPanel(2048));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L), TextureFactory.of(SOLARPANEL_IV), new GT_Cover_SolarPanel(8192));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L), TextureFactory.of(SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L), TextureFactory.of(SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L), TextureFactory.of(SOLARPANEL_UV), new GT_Cover_SolarPanel(524288));
ItemList.Tool_Sonictron.set(addItem(tLastID = 760, "Sonictron", "Bring your Music with you", Behaviour_Sonictron.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L)));
ItemList.Tool_Cheat.set(addItem(tLastID = 761, "Debug Scanner", "Also an Infinite Energy Source", Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L)));
@@ -850,10 +850,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Cover_RedstoneReceiverExternal.set(addItem(tLastID = 746, "Redstone Receiver (Out)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)));
ItemList.Cover_RedstoneReceiverInternal.set(addItem(tLastID = 747, "Redstone Receiver (In)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)));
- GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterExternal.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_MultiTexture(new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR), new GT_RenderedGlowTexture(BlockIcons.OVERLAY_ACTIVITYDETECTOR_GLOW))), new GT_Cover_RedstoneTransmitterExternal());
- GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_MultiTexture(new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR), new GT_RenderedGlowTexture(BlockIcons.OVERLAY_ACTIVITYDETECTOR_GLOW))), new GT_Cover_RedstoneTransmitterInternal());
- GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverExternal());
- GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverInternal());
+ GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterExternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_RedstoneTransmitterExternal());
+ GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_RedstoneTransmitterInternal());
+ GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverExternal());
+ GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverInternal());
GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneTransmitterExternal.get(1L), 3200, 128);
GT_Values.RA.addAssemblerRecipe(ItemList.Sensor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), ItemList.Cover_RedstoneReceiverExternal.get(1L), 3200, 128);
@@ -863,7 +863,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L)});
ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintenance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)));
- GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_MultiTexture(new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR), new GT_RenderedGlowTexture(BlockIcons.OVERLAY_ACTIVITYDETECTOR_GLOW))), new GT_Cover_NeedMaintainance());
+ GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_NeedMaintainance());
GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_NeedsMaintainance.get(1L), 600, 24);
}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
index 495666d9e9..7244905d9f 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
@@ -1,11 +1,21 @@
package gregtech.common.items;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TC_Aspects;
import gregtech.api.items.GT_MetaGenerated_Item_X32;
-import gregtech.api.render.GT_CopiedBlockTexture;
import gregtech.api.objects.ItemData;
-import gregtech.api.util.*;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_FoodStat;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_Arrow;
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.enchantment.Enchantment;
@@ -24,7 +34,7 @@ import net.minecraft.world.World;
public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
public static GT_MetaGenerated_Item_02 INSTANCE;
- private final static String aTextCover = "Usable as Cover"; private final static String aTextForestry = "Forestry";
+ private static final String aTextCover = "Usable as Cover"; private static final String aTextForestry = "Forestry";
public GT_MetaGenerated_Item_02() {
super("metaitem.02", OrePrefixes.toolHeadSword, OrePrefixes.toolHeadPickaxe, OrePrefixes.toolHeadShovel, OrePrefixes.toolHeadAxe, OrePrefixes.toolHeadHoe, OrePrefixes.toolHeadHammer, OrePrefixes.toolHeadFile, OrePrefixes.toolHeadSaw, OrePrefixes.toolHeadDrill, OrePrefixes.toolHeadChainsaw, OrePrefixes.toolHeadWrench, OrePrefixes.toolHeadUniversalSpade, OrePrefixes.toolHeadSense, OrePrefixes.toolHeadPlow, OrePrefixes.toolHeadArrow, OrePrefixes.toolHeadBuzzSaw, OrePrefixes.turbineBlade, null, OrePrefixes.itemCasing, OrePrefixes.wireFine, OrePrefixes.gearGtSmall, OrePrefixes.rotor, OrePrefixes.stickLong, OrePrefixes.springSmall, OrePrefixes.spring, OrePrefixes.arrowGtWood, OrePrefixes.arrowGtPlastic, OrePrefixes.gemChipped, OrePrefixes.gemFlawed, OrePrefixes.gemFlawless, OrePrefixes.gemExquisite, OrePrefixes.gearGt);
@@ -241,36 +251,36 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
GT_ModHandler.addCraftingRecipe(ItemList.Plank_Maple.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 6)});
GT_ModHandler.addCraftingRecipe(ItemList.Plank_Citrus.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 7)});
- GregTech_API.registerCover(ItemList.Plank_Oak.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 0), null);
- GregTech_API.registerCover(ItemList.Plank_Spruce.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 1), null);
- GregTech_API.registerCover(ItemList.Plank_Birch.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 2), null);
- GregTech_API.registerCover(ItemList.Plank_Jungle.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 3), null);
- GregTech_API.registerCover(ItemList.Plank_Acacia.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 4), null);
- GregTech_API.registerCover(ItemList.Plank_DarkOak.get(1L), new GT_CopiedBlockTexture(Blocks.planks, 0, 5), null);
- GregTech_API.registerCover(ItemList.Plank_Larch.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), 0, 0), null);
- GregTech_API.registerCover(ItemList.Plank_Teak.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), 0, 1), null);
- GregTech_API.registerCover(ItemList.Plank_Acacia_Green.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), 0, 2), null);
- GregTech_API.registerCover(ItemList.Plank_Lime.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), 0, 3), null);
- GregTech_API.registerCover(ItemList.Plank_Chestnut.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), 0, 4), null);
- GregTech_API.registerCover(ItemList.Plank_Wenge.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), 0, 5), null);
- GregTech_API.registerCover(ItemList.Plank_Baobab.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), 0, 6), null);
- GregTech_API.registerCover(ItemList.Plank_Sequoia.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), 0, 7), null);
- GregTech_API.registerCover(ItemList.Plank_Kapok.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), 0, 8), null);
- GregTech_API.registerCover(ItemList.Plank_Ebony.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), 0, 9), null);
- GregTech_API.registerCover(ItemList.Plank_Mahagony.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), 0, 10), null);
- GregTech_API.registerCover(ItemList.Plank_Balsa.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), 0, 11), null);
- GregTech_API.registerCover(ItemList.Plank_Willow.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), 0, 12), null);
- GregTech_API.registerCover(ItemList.Plank_Walnut.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), 0, 13), null);
- GregTech_API.registerCover(ItemList.Plank_Greenheart.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), 0, 14), null);
- GregTech_API.registerCover(ItemList.Plank_Cherry.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), 0, 15), null);
- GregTech_API.registerCover(ItemList.Plank_Mahoe.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), 0, 0), null);
- GregTech_API.registerCover(ItemList.Plank_Poplar.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), 0, 1), null);
- GregTech_API.registerCover(ItemList.Plank_Palm.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), 0, 2), null);
- GregTech_API.registerCover(ItemList.Plank_Papaya.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), 0, 3), null);
- GregTech_API.registerCover(ItemList.Plank_Pine.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), 0, 4), null);
- GregTech_API.registerCover(ItemList.Plank_Plum.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), 0, 5), null);
- GregTech_API.registerCover(ItemList.Plank_Maple.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), 0, 6), null);
- GregTech_API.registerCover(ItemList.Plank_Citrus.get(1L), new GT_CopiedBlockTexture(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), 0, 7), null);
+ GregTech_API.registerCover(ItemList.Plank_Oak.get(1L), TextureFactory.of(Blocks.planks, 0), null);
+ GregTech_API.registerCover(ItemList.Plank_Spruce.get(1L), TextureFactory.of(Blocks.planks, 1), null);
+ GregTech_API.registerCover(ItemList.Plank_Birch.get(1L), TextureFactory.of(Blocks.planks, 2), null);
+ GregTech_API.registerCover(ItemList.Plank_Jungle.get(1L), TextureFactory.of(Blocks.planks, 3), null);
+ GregTech_API.registerCover(ItemList.Plank_Acacia.get(1L), TextureFactory.of(Blocks.planks, 4), null);
+ GregTech_API.registerCover(ItemList.Plank_DarkOak.get(1L), TextureFactory.of(Blocks.planks, 5), null);
+ GregTech_API.registerCover(ItemList.Plank_Larch.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), 0), null);
+ GregTech_API.registerCover(ItemList.Plank_Teak.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), 1), null);
+ GregTech_API.registerCover(ItemList.Plank_Acacia_Green.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), 2), null);
+ GregTech_API.registerCover(ItemList.Plank_Lime.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), 3), null);
+ GregTech_API.registerCover(ItemList.Plank_Chestnut.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), 4), null);
+ GregTech_API.registerCover(ItemList.Plank_Wenge.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), 5), null);
+ GregTech_API.registerCover(ItemList.Plank_Baobab.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), 6), null);
+ GregTech_API.registerCover(ItemList.Plank_Sequoia.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), 7), null);
+ GregTech_API.registerCover(ItemList.Plank_Kapok.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), 8), null);
+ GregTech_API.registerCover(ItemList.Plank_Ebony.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), 9), null);
+ GregTech_API.registerCover(ItemList.Plank_Mahagony.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), 10), null);
+ GregTech_API.registerCover(ItemList.Plank_Balsa.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), 11), null);
+ GregTech_API.registerCover(ItemList.Plank_Willow.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), 12), null);
+ GregTech_API.registerCover(ItemList.Plank_Walnut.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), 13), null);
+ GregTech_API.registerCover(ItemList.Plank_Greenheart.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), 14), null);
+ GregTech_API.registerCover(ItemList.Plank_Cherry.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), 15), null);
+ GregTech_API.registerCover(ItemList.Plank_Mahoe.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), 0), null);
+ GregTech_API.registerCover(ItemList.Plank_Poplar.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), 1), null);
+ GregTech_API.registerCover(ItemList.Plank_Palm.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), 2), null);
+ GregTech_API.registerCover(ItemList.Plank_Papaya.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), 3), null);
+ GregTech_API.registerCover(ItemList.Plank_Pine.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), 4), null);
+ GregTech_API.registerCover(ItemList.Plank_Plum.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), 5), null);
+ GregTech_API.registerCover(ItemList.Plank_Maple.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), 6), null);
+ GregTech_API.registerCover(ItemList.Plank_Citrus.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), 7), null);
ItemList.Crop_Drop_Plumbilia.set(addItem(tLastID = 500, "Plumbilia Leaf", "Source of Lead", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L)));
ItemList.Crop_Drop_Argentia.set(addItem(tLastID = 501, "Argentia Leaf", "Source of Silver", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)));
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
index ea562251a7..1c27439352 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
@@ -1,11 +1,19 @@
package gregtech.common.items;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TC_Aspects;
import gregtech.api.items.GT_MetaGenerated_Item_X32;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.common.covers.GT_Cover_SolarPanel;
+import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UEV;
+import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UHV;
+import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UIV;
+
public class GT_MetaGenerated_Item_03
extends GT_MetaGenerated_Item_X32 {
public static GT_MetaGenerated_Item_03 INSTANCE;
@@ -212,9 +220,9 @@ public class GT_MetaGenerated_Item_03
ItemList.Cover_SolarPanel_UEV.set(addItem(tLastID = 131, "Solar Panel (UEV)", "Ultimate Extreme Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 256L)));
ItemList.Cover_SolarPanel_UIV.set(addItem(tLastID = 132, "Solar Panel (UIV)", "Ultimate Insane Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 512L)));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_UHV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UHV), new GT_Cover_SolarPanel(2097152));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_UEV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UEV), new GT_Cover_SolarPanel(8388608));
- GregTech_API.registerCover(ItemList.Cover_SolarPanel_UIV.get(1L), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UIV), new GT_Cover_SolarPanel(33554432));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_UHV.get(1L), TextureFactory.of(SOLARPANEL_UHV), new GT_Cover_SolarPanel(2097152));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_UEV.get(1L), TextureFactory.of(SOLARPANEL_UEV), new GT_Cover_SolarPanel(8388608));
+ GregTech_API.registerCover(ItemList.Cover_SolarPanel_UIV.get(1L), TextureFactory.of(SOLARPANEL_UIV), new GT_Cover_SolarPanel(33554432));
ItemList.ULV_Coil.set(addItem(tLastID = 140, "Ultra Low Voltage Coil", "Primitive Coil", o));
ItemList.LV_Coil.set(addItem(tLastID = 141, "Low Voltage Coil", "Basic Coil", o));
diff --git a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java
new file mode 100644
index 0000000000..fdd20026ab
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java
@@ -0,0 +1,123 @@
+package gregtech.common.render;
+
+import gregtech.api.interfaces.IBlockContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.util.LightingHelper;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.common.util.ForgeDirection;
+
+class GT_CopiedBlockTexture implements ITexture, IBlockContainer {
+ private final Block mBlock;
+ private final byte mSide, mMeta;
+
+ GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean allowAlpha) {
+ if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedBlockTexture");
+ mBlock = aBlock;
+ mSide = (byte) aSide;
+ mMeta = (byte) aMeta;
+ }
+
+ private IIcon getIcon(int aSide) {
+ if (mSide == 6) return mBlock.getIcon(aSide, mMeta);
+ return mBlock.getIcon(mSide, mMeta);
+ }
+
+ @Override
+ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal());
+ aRenderer.field_152631_f = true;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f);
+ new LightingHelper(aRenderer)
+ .setupLightingXPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.EAST.ordinal(), 0xffffff);
+ aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon);
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.field_152631_f = false;
+ }
+
+ @Override
+ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f);
+ IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal());
+ new LightingHelper(aRenderer)
+ .setupLightingXNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.WEST.ordinal(), 0xffffff);
+ aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon);
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f);
+ IIcon aIcon = getIcon(ForgeDirection.UP.ordinal());
+ new LightingHelper(aRenderer)
+ .setupLightingYPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.UP.ordinal(), 0xffffff);
+ aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon);
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f);
+ IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal());
+ new LightingHelper(aRenderer)
+ .setupLightingYNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff);
+ aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon);
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f);
+ IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal());
+ new LightingHelper(aRenderer)
+ .setupLightingZPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff);
+ aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon);
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f);
+ IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal());
+ aRenderer.field_152631_f = true;
+ new LightingHelper(aRenderer)
+ .setupLightingZNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff);
+ aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon);
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.field_152631_f = false;
+ }
+
+ @Override
+ public boolean isValidTexture() {
+ return mBlock != null;
+ }
+
+ @Override
+ public Block getBlock() {
+ return mBlock;
+ }
+
+ @Override
+ public byte getMeta() {
+ return mMeta;
+ }
+}
diff --git a/src/main/java/gregtech/common/render/GT_MultiTexture.java b/src/main/java/gregtech/common/render/GT_MultiTexture.java
new file mode 100644
index 0000000000..eadcb39573
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_MultiTexture.java
@@ -0,0 +1,58 @@
+package gregtech.common.render;
+
+import gregtech.api.interfaces.ITexture;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+
+/**
+ * <p>Lets Multiple ITextures Render overlay over each other.<</p>
+ * <p>I should have done this much earlier...</p>
+ */
+class GT_MultiTexture implements ITexture {
+ protected final ITexture[] mTextures;
+
+ GT_MultiTexture(ITexture... aTextures) {
+ mTextures = aTextures;
+ }
+
+ @Override
+ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ for (ITexture tTexture : mTextures)
+ if (tTexture != null && tTexture.isValidTexture()) tTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ);
+ }
+
+ @Override
+ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ for (ITexture tTexture : mTextures)
+ if (tTexture != null && tTexture.isValidTexture()) tTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ);
+ }
+
+ @Override
+ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ for (ITexture tTexture : mTextures)
+ if (tTexture != null && tTexture.isValidTexture()) tTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ);
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ for (ITexture tTexture : mTextures)
+ if (tTexture != null && tTexture.isValidTexture()) tTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ);
+ }
+
+ @Override
+ public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ for (ITexture tTexture : mTextures)
+ if (tTexture != null && tTexture.isValidTexture()) tTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ);
+ }
+
+ @Override
+ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ for (ITexture tTexture : mTextures)
+ if (tTexture != null && tTexture.isValidTexture()) tTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ);
+ }
+
+ @Override
+ public boolean isValidTexture() {
+ return true;
+ }
+}
diff --git a/src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java b/src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java
new file mode 100644
index 0000000000..899e4d7c5d
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_RenderedGlowTexture.java
@@ -0,0 +1,213 @@
+package gregtech.common.render;
+
+import gregtech.GT_Mod;
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.IColorModulationContainer;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.IIcon;
+
+import static gregtech.api.util.LightingHelper.MAX_BRIGHTNESS;
+
+/**
+ * This {@link ITexture} implementation renders texture with max brightness to glow in the dark.
+ */
+
+class GT_RenderedGlowTexture implements ITexture, IColorModulationContainer {
+ protected final IIconContainer mIconContainer;
+ private final short[] mRGBa;
+
+ GT_RenderedGlowTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha) {
+ if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture");
+ mIconContainer = GT_Mod.gregtechproxy.mRenderGlowTextures ? aIcon : BlockIcons.VOID;
+ mRGBa = aRGBa;
+ }
+
+ @Override
+ public short[] getRGBA() {
+ return mRGBa;
+ }
+
+ @Override
+ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API
+ if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return;
+ final boolean enableAO = aRenderer.enableAO;
+ aRenderer.enableAO = false;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f);
+ Tessellator.instance.setBrightness(MAX_BRIGHTNESS);
+ Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]);
+ aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ Tessellator.instance.setColorOpaque(255, 255, 255);
+ aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.enableAO = enableAO;
+ }
+
+ @Override
+ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API
+ if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return;
+ aRenderer.field_152631_f = true;
+ final boolean enableAO = aRenderer.enableAO;
+ aRenderer.enableAO = false;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f);
+ Tessellator.instance.setBrightness(MAX_BRIGHTNESS);
+ Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]);
+ aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ Tessellator.instance.setColorOpaque(255, 255, 255);
+ aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.field_152631_f = false;
+ aRenderer.enableAO = enableAO;
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API
+ if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return;
+ final boolean enableAO = aRenderer.enableAO;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f);
+ final Tessellator tessellator = Tessellator.instance;
+ IIcon aIcon = mIconContainer.getIcon();
+
+ float minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D);
+ float maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D);
+ float minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
+ float maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+
+ if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
+ minU = 16.0F - aIcon.getMaxU();
+ maxU = 16.0F - aIcon.getMinU();
+ }
+
+ if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
+ minV = aIcon.getMinV();
+ maxV = aIcon.getMaxV();
+ }
+
+ double minX = aX + aRenderer.renderMinX;
+ double maxX = aX + aRenderer.renderMaxX;
+ double minY = aY + aRenderer.renderMinY;
+ double minZ = aZ + aRenderer.renderMinZ;
+ double maxZ = aZ + aRenderer.renderMaxZ;
+
+ Tessellator.instance.setBrightness(MAX_BRIGHTNESS);
+ Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]);
+
+ tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
+ tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV);
+ tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV);
+ tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV);
+
+ if (mIconContainer.getOverlayIcon() != null) {
+ minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D);
+ maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D);
+ minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
+ maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+
+ if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
+ minU = 16.0F - aIcon.getMaxU();
+ maxU = 16.0F - aIcon.getMinU();
+ }
+
+ if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
+ minV = aIcon.getMinV();
+ maxV = aIcon.getMaxV();
+ }
+
+ minX = aX + (float) aRenderer.renderMinX;
+ maxX = aX + (float) aRenderer.renderMaxX;
+ minY = aY + (float) aRenderer.renderMinY;
+ minZ = aZ + (float) aRenderer.renderMinZ;
+ maxZ = aZ + (float) aRenderer.renderMaxZ;
+
+ Tessellator.instance.setColorOpaque(255, 255, 255);
+ tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
+ tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV);
+ tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV);
+ tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV);
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.enableAO = enableAO;
+ }
+
+ @Override
+ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API
+ if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return;
+ final boolean enableAO = aRenderer.enableAO;
+ aRenderer.enableAO = false;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f);
+ Tessellator.instance.setBrightness(MAX_BRIGHTNESS);
+ Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]);
+ aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ Tessellator.instance.setColorOpaque(255, 255, 255);
+ aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.enableAO = enableAO;
+ }
+
+ @Override
+ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API
+ if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return;
+ final boolean enableAO = aRenderer.enableAO;
+ aRenderer.enableAO = false;
+ aRenderer.field_152631_f = true;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f);
+ Tessellator.instance.setBrightness(MAX_BRIGHTNESS);
+ Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]);
+ aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ Tessellator.instance.setColorOpaque(255, 255, 255);
+ aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.field_152631_f = false;
+ aRenderer.enableAO = enableAO;
+ }
+
+ @Override
+ public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ if (aRenderer.useInventoryTint) return; // TODO: Remove this once all addons have migrated to the new Texture API
+ if (!GT_Mod.gregtechproxy.mRenderGlowTextures) return;
+ final boolean enableAO = aRenderer.enableAO;
+ aRenderer.enableAO = false;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f);
+ Tessellator.instance.setBrightness(MAX_BRIGHTNESS);
+ Tessellator.instance.setColorOpaque(mRGBa[0], mRGBa[1], mRGBa[2]);
+ aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.enableAO = enableAO;
+ }
+
+ @Override
+ public boolean isValidTexture() {
+ return mIconContainer != null;
+ }
+}
diff --git a/src/main/java/gregtech/common/render/GT_RenderedTexture.java b/src/main/java/gregtech/common/render/GT_RenderedTexture.java
new file mode 100644
index 0000000000..9e76634385
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_RenderedTexture.java
@@ -0,0 +1,214 @@
+package gregtech.common.render;
+
+import gregtech.api.interfaces.IColorModulationContainer;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.util.LightingHelper;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.common.util.ForgeDirection;
+
+class GT_RenderedTexture implements ITexture, IColorModulationContainer {
+ protected final IIconContainer mIconContainer;
+ private final short[] mRGBa;
+
+ GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha) {
+ if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture");
+ mIconContainer = aIcon;
+ mRGBa = aRGBa;
+ }
+
+ @Override
+ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ aRenderer.field_152631_f = true;
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f);
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingXPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.EAST.ordinal(), mRGBa);
+ aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ lighting.setupColor(ForgeDirection.EAST.ordinal(), 0xffffff);
+ aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.field_152631_f = false;
+ }
+
+ @Override
+ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f);
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingXNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.WEST.ordinal(), mRGBa);
+ aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ lighting.setupColor(ForgeDirection.WEST.ordinal(), 0xffffff);
+ aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f);
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingYPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.UP.ordinal(), mRGBa);
+ aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ lighting.setupColor(ForgeDirection.UP.ordinal(), 0xffffff);
+ aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f);
+ final Tessellator tessellator = Tessellator.instance;
+ IIcon aIcon = mIconContainer.getIcon();
+
+ float minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D);
+ float maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D);
+ float minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
+ float maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+
+ if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
+ minU = 16.0F - aIcon.getMaxU();
+ maxU = 16.0F - aIcon.getMinU();
+ }
+
+ if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
+ minV = aIcon.getMinV();
+ maxV = aIcon.getMaxV();
+ }
+
+ double minX = aX + aRenderer.renderMinX;
+ double maxX = aX + aRenderer.renderMaxX;
+ double minY = aY + aRenderer.renderMinY;
+ double minZ = aZ + aRenderer.renderMinZ;
+ double maxZ = aZ + aRenderer.renderMaxZ;
+
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingYNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa);
+
+ if (aRenderer.enableAO) {
+ tessellator.setColorOpaque_F(aRenderer.colorRedTopLeft, aRenderer.colorGreenTopLeft, aRenderer.colorBlueTopLeft);
+ tessellator.setBrightness(aRenderer.brightnessTopLeft);
+ tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
+ tessellator.setColorOpaque_F(aRenderer.colorRedBottomLeft, aRenderer.colorGreenBottomLeft, aRenderer.colorBlueBottomLeft);
+ tessellator.setBrightness(aRenderer.brightnessBottomLeft);
+ tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV);
+ tessellator.setColorOpaque_F(aRenderer.colorRedBottomRight, aRenderer.colorGreenBottomRight, aRenderer.colorBlueBottomRight);
+ tessellator.setBrightness(aRenderer.brightnessBottomRight);
+ tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV);
+ tessellator.setColorOpaque_F(aRenderer.colorRedTopRight, aRenderer.colorGreenTopRight, aRenderer.colorBlueTopRight);
+ tessellator.setBrightness(aRenderer.brightnessTopRight);
+ } else {
+ tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
+ tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV);
+ tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV);
+ }
+ tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV);
+
+ if (mIconContainer.getOverlayIcon() != null) {
+ minU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMaxX) * 16.0D);
+ maxU = aIcon.getInterpolatedU((1.0D - aRenderer.renderMinX) * 16.0D);
+ minV = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
+ maxV = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+
+ if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
+ minU = 16.0F - aIcon.getMaxU();
+ maxU = 16.0F - aIcon.getMinU();
+ }
+
+ if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) {
+ minV = aIcon.getMinV();
+ maxV = aIcon.getMaxV();
+ }
+
+ minX = aX + (float)aRenderer.renderMinX;
+ maxX = aX + (float)aRenderer.renderMaxX;
+ minY = aY + (float)aRenderer.renderMinY;
+ minZ = aZ + (float)aRenderer.renderMinZ;
+ maxZ = aZ + (float)aRenderer.renderMaxZ;
+
+ lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff);
+
+ if (aRenderer.enableAO) {
+ tessellator.setColorOpaque_F(aRenderer.colorRedTopLeft, aRenderer.colorGreenTopLeft, aRenderer.colorBlueTopLeft);
+ tessellator.setBrightness(aRenderer.brightnessTopLeft);
+ tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
+ tessellator.setColorOpaque_F(aRenderer.colorRedBottomLeft, aRenderer.colorGreenBottomLeft, aRenderer.colorBlueBottomLeft);
+ tessellator.setBrightness(aRenderer.brightnessBottomLeft);
+ tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV);
+ tessellator.setColorOpaque_F(aRenderer.colorRedBottomRight, aRenderer.colorGreenBottomRight, aRenderer.colorBlueBottomRight);
+ tessellator.setBrightness(aRenderer.brightnessBottomRight);
+ tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV);
+ tessellator.setColorOpaque_F(aRenderer.colorRedTopRight, aRenderer.colorGreenTopRight, aRenderer.colorBlueTopRight);
+ tessellator.setBrightness(aRenderer.brightnessTopRight);
+ } else {
+ tessellator.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
+ tessellator.addVertexWithUV(minX, minY, minZ, maxU, minV);
+ tessellator.addVertexWithUV(maxX, minY, minZ, minU, minV);
+ }
+ tessellator.addVertexWithUV(maxX, minY, maxZ, minU, maxV);
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f);
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingZPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa);
+ aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ lighting.setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff);
+ aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+
+ @Override
+ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f);
+ aRenderer.field_152631_f = true;
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingZNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.NORTH.ordinal(), mRGBa);
+ aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ lighting.setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff);
+ aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ aRenderer.field_152631_f = false;
+ }
+
+ @Override
+ public short[] getRGBA() {
+ return mRGBa;
+ }
+
+ @Override
+ public boolean isValidTexture() {
+ return mIconContainer != null;
+ }
+}
diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Block.java b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
index eb439b4e3e..42e59dd2c7 100644
--- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java
+++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
@@ -453,6 +453,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aRenderer.enableAO = false;
aRenderer.useInventoryTint = true;
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
+
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
@@ -462,12 +464,19 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aBlock.setBlockBoundsForItemRender();
aRenderer.setRenderBoundsFromBlock(aBlock);
+ Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), true);
+ Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), true);
+ Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), true);
+ Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), true);
+ Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), true);
+ Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), true);
+
} else if (aMeta > 0
&& (aMeta < GregTech_API.METATILEENTITIES.length)
&& aBlock instanceof GT_Block_Machines
@@ -479,6 +488,7 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax);
aRenderer.setRenderBoundsFromBlock(aBlock);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
aRenderer.useInventoryTint = false;
}
@@ -503,18 +513,30 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax);
aRenderer.setRenderBoundsFromBlock(aBlock);
+ Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true);
+ Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true);
} else {
+ Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
}
}
diff --git a/src/main/java/gregtech/common/render/GT_SidedTexture.java b/src/main/java/gregtech/common/render/GT_SidedTexture.java
new file mode 100644
index 0000000000..9bdee73eb0
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_SidedTexture.java
@@ -0,0 +1,75 @@
+package gregtech.common.render;
+
+import gregtech.api.interfaces.IColorModulationContainer;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.render.TextureFactory;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+
+class GT_SidedTexture implements ITexture, IColorModulationContainer {
+ protected final ITexture[] mTextures;
+ /**
+ * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!!
+ * <p/>
+ * Just set this variable to another different Array instead.
+ * Otherwise some colored things will get Problems.
+ */
+ private final short[] mRGBa;
+
+ GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) {
+ if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture");
+ mTextures = new ITexture[]{
+ TextureFactory.of(aIcon0, aRGBa, aAllowAlpha),
+ TextureFactory.of(aIcon1, aRGBa, aAllowAlpha),
+ TextureFactory.of(aIcon2, aRGBa, aAllowAlpha),
+ TextureFactory.of(aIcon3, aRGBa, aAllowAlpha),
+ TextureFactory.of(aIcon4, aRGBa, aAllowAlpha),
+ TextureFactory.of(aIcon5, aRGBa, aAllowAlpha)
+ };
+ mRGBa = aRGBa;
+ }
+
+ @Override
+ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ mTextures[5].renderXPos(aRenderer, aBlock, aX ,aY, aZ);
+ }
+
+ @Override
+ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ mTextures[4].renderXNeg(aRenderer, aBlock, aX ,aY, aZ);
+ }
+
+ @Override
+ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ mTextures[1].renderYPos(aRenderer, aBlock, aX ,aY, aZ);
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ mTextures[0].renderYNeg(aRenderer, aBlock, aX ,aY, aZ);
+ }
+
+ @Override
+ public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ mTextures[3].renderZPos(aRenderer, aBlock, aX ,aY, aZ);
+ }
+
+ @Override
+ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ mTextures[2].renderZNeg(aRenderer, aBlock, aX ,aY, aZ);
+ }
+
+ @Override
+ public short[] getRGBA() {
+ return mRGBa;
+ }
+
+ @Override
+ public boolean isValidTexture() {
+ for (ITexture renderedTexture : mTextures) {
+ if (!renderedTexture.isValidTexture()) return false;
+ }
+ return true;
+ }
+}
diff --git a/src/main/java/gregtech/common/render/GT_StdRenderedTexture.java b/src/main/java/gregtech/common/render/GT_StdRenderedTexture.java
new file mode 100644
index 0000000000..ba0f9d3a91
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_StdRenderedTexture.java
@@ -0,0 +1,36 @@
+package gregtech.common.render;
+
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.util.LightingHelper;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraftforge.common.util.ForgeDirection;
+
+/**
+ * This ITexture implementation extends the GT_RenderedTexture class
+ * to render with bottom side flipped as with dumb blocks rendering.
+ * It is used in Ore blocks rendering so they better blends with dumb block ores
+ * from vanilla or other mods, when seen from bottom.
+ */
+class GT_StdRenderedTexture extends GT_RenderedTexture{
+
+ GT_StdRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha) {
+ super(aIcon, aRGBa, allowAlpha);
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f);
+ LightingHelper lighting = new LightingHelper(aRenderer);
+ lighting.setupLightingYNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.DOWN.ordinal(), getRGBA());
+ aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon());
+ if (mIconContainer.getOverlayIcon() != null) {
+ lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff);
+ aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon());
+ }
+ // TODO: Uncomment this once all addons have migrated to the new Texture API
+ //draw(aRenderer);
+ }
+}
diff --git a/src/main/java/gregtech/common/render/GT_TextureBuilder.java b/src/main/java/gregtech/common/render/GT_TextureBuilder.java
new file mode 100644
index 0000000000..58df85123b
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_TextureBuilder.java
@@ -0,0 +1,107 @@
+package gregtech.common.render;
+
+import gregtech.api.enums.Dyes;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.ITextureBuilder;
+import net.minecraft.block.Block;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+@SuppressWarnings("unused")
+public class GT_TextureBuilder implements ITextureBuilder {
+ private final List<IIconContainer> iconContainerList;
+ private final List<ITexture> textureLayers;
+ private Block fromBlock;
+ private int fromMeta;
+ private ForgeDirection fromSide;
+ private short[] rgba;
+ private boolean allowAlpha;
+ private boolean stdOrient;
+ private boolean glow;
+
+ public GT_TextureBuilder() {
+ textureLayers = new ArrayList<>();
+ iconContainerList = new ArrayList<>();
+ rgba = Dyes._NULL.mRGBa;
+ allowAlpha = true;
+ stdOrient = false;
+ glow = false;
+ }
+
+ @Override
+ public ITextureBuilder setFromBlock(Block block, int meta) {
+ this.fromBlock = block;
+ this.fromMeta = meta;
+ this.fromSide = ForgeDirection.UNKNOWN;
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder setFromSide(ForgeDirection side) {
+ this.fromSide = side;
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder addIcon(IIconContainer... iconContainers) {
+ this.iconContainerList.addAll(Arrays.asList(iconContainers));
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder setRGBA(short[] rgba) {
+ this.rgba = rgba;
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder addLayer(ITexture... iTextures) {
+ this.textureLayers.addAll(Arrays.asList(iTextures));
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder setAllowAlpha(boolean allowAlpha) {
+ this.allowAlpha = allowAlpha;
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder stdOrient() {
+ this.stdOrient = true;
+ return this;
+ }
+
+ @Override
+ public ITextureBuilder glow() {
+ glow = true;
+ return this;
+ }
+
+ @Override
+ public ITexture build() {
+ if (fromBlock != null) return new GT_CopiedBlockTexture(fromBlock, fromSide.ordinal(), fromMeta, rgba, allowAlpha);
+ if (!textureLayers.isEmpty()) return new GT_MultiTexture(textureLayers.toArray(new ITexture[0]));
+ switch (iconContainerList.size()) {
+ case 1:
+ if (stdOrient) return new GT_StdRenderedTexture(iconContainerList.get(0), rgba, allowAlpha);
+ if (glow) return new GT_RenderedGlowTexture(iconContainerList.get(0), rgba, allowAlpha);
+ return new GT_RenderedTexture(iconContainerList.get(0), rgba, allowAlpha);
+ case 6:
+ return new GT_SidedTexture(
+ iconContainerList.get(ForgeDirection.DOWN.ordinal()),
+ iconContainerList.get(ForgeDirection.UP.ordinal()),
+ iconContainerList.get(ForgeDirection.NORTH.ordinal()),
+ iconContainerList.get(ForgeDirection.SOUTH.ordinal()),
+ iconContainerList.get(ForgeDirection.WEST.ordinal()),
+ iconContainerList.get(ForgeDirection.EAST.ordinal()),
+ rgba, allowAlpha);
+ default:
+ throw new IllegalStateException("Invalid sideIconContainer count");
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
index f474a11344..3830cd3497 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
@@ -4,9 +4,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_ChestBuffer;
import gregtech.common.gui.GT_GUIContainer_ChestBuffer;
@@ -58,9 +56,9 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer {
@Override
public ITexture getOverlayIcon() {
- return new GT_MultiTexture(
- new GT_RenderedTexture(AUTOMATION_CHESTBUFFER),
- new GT_RenderedGlowTexture(AUTOMATION_CHESTBUFFER_GLOW));
+ return TextureFactory.of(
+ TextureFactory.of(AUTOMATION_CHESTBUFFER),
+ TextureFactory.builder().addIcon(AUTOMATION_CHESTBUFFER_GLOW).glow().build());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
index 1e99cf276f..0c5b1dfda8 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
@@ -4,9 +4,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_Filter;
import gregtech.common.gui.GT_GUIContainer_Filter;
@@ -43,9 +41,9 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer {
@Override
public ITexture getOverlayIcon() {
- return new GT_MultiTexture(
- new GT_RenderedTexture(AUTOMATION_FILTER),
- new GT_RenderedGlowTexture(AUTOMATION_FILTER_GLOW));
+ return TextureFactory.of(
+ TextureFactory.of(AUTOMATION_FILTER),
+ TextureFactory.builder().addIcon(AUTOMATION_FILTER_GLOW).glow().build());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
index 84091b4555..c941b73e58 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
@@ -5,9 +5,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_ItemDistributor;
import gregtech.common.gui.GT_GUIContainer_ItemDistributor;
@@ -71,9 +69,9 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
@Override
public ITexture getOverlayIcon() {
- return new GT_MultiTexture(
- new GT_RenderedTexture(AUTOMATION_ITEMDISTRIBUTOR),
- new GT_RenderedGlowTexture(AUTOMATION_ITEMDISTRIBUTOR_GLOW));
+ return TextureFactory.of(
+ TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR),
+ TextureFactory.builder().addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW).glow().build());
}
@Override
@@ -98,7 +96,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
@Override
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] returnTextures = new ITexture[2][17][];
- ITexture baseIcon = getOverlayIcon(), pipeIcon = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT);
+ ITexture baseIcon = getOverlayIcon(), pipeIcon = TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT);
for (int i = 0; i < 17; i++) {
returnTextures[0][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], baseIcon};
returnTextures[1][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], pipeIcon, baseIcon};
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
index 3caca46f16..3bc79f3348 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
@@ -4,9 +4,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_Regulator;
import gregtech.common.gui.GT_GUIContainer_Regulator;
@@ -48,9 +46,9 @@ public class GT_MetaTileEntity_Regulator
@Override
public ITexture getOverlayIcon() {
- return new GT_MultiTexture(
- new GT_RenderedTexture(AUTOMATION_REGULATOR),
- new GT_RenderedGlowTexture(AUTOMATION_REGULATOR_GLOW));
+ return TextureFactory.of(
+ TextureFactory.of(AUTOMATION_REGULATOR),
+ TextureFactory.builder().addIcon(AUTOMATION_REGULATOR_GLOW).glow().build());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
index a40df346cf..72e6516bc4 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
@@ -3,9 +3,7 @@ package gregtech.common.tileentities.automation;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.common.gui.GT_Container_SuperBuffer;
import gregtech.common.gui.GT_GUIContainer_SuperBuffer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -36,9 +34,9 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
@Override
public ITexture getOverlayIcon() {
- return new GT_MultiTexture(
- new GT_RenderedTexture(AUTOMATION_SUPERBUFFER),
- new GT_RenderedGlowTexture(AUTOMATION_SUPERBUFFER_GLOW));
+ return TextureFactory.of(
+ TextureFactory.of(AUTOMATION_SUPERBUFFER),
+ TextureFactory.builder().addIcon(AUTOMATION_SUPERBUFFER_GLOW).glow().build());
}
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
index 4e1a9fd2c0..4e5864c3e6 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
@@ -5,10 +5,8 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_TypeFilter;
@@ -49,9 +47,9 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_Buffer {
@Override
public ITexture getOverlayIcon() {
- return new GT_MultiTexture(
- new GT_RenderedTexture(AUTOMATION_TYPEFILTER),
- new GT_RenderedGlowTexture(AUTOMATION_TYPEFILTER_GLOW));
+ return TextureFactory.of(
+ TextureFactory.of(AUTOMATION_TYPEFILTER),
+ TextureFactory.builder().addIcon(AUTOMATION_TYPEFILTER_GLOW).glow().build());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index 5a3712383f..5d5c6f3505 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -5,9 +5,8 @@ import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.XSTR;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Pollution;
@@ -48,14 +47,14 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[5][17][];
final ITexture[]
- texBottom = {new GT_RenderedTexture(MACHINE_BRONZEBRICKS_BOTTOM)},
- texTop = {new GT_RenderedTexture(MACHINE_BRONZEBRICKS_TOP), new GT_RenderedTexture(OVERLAY_PIPE)},
- texSide = {new GT_RenderedTexture(MACHINE_BRONZEBRICKS_SIDE), new GT_RenderedTexture(OVERLAY_PIPE)},
- texFront = {new GT_RenderedTexture(MACHINE_BRONZEBRICKS_SIDE), new GT_RenderedTexture(BOILER_FRONT)},
+ texBottom = {TextureFactory.of(MACHINE_BRONZEBRICKS_BOTTOM)},
+ texTop = {TextureFactory.of(MACHINE_BRONZEBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)},
+ texSide = {TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)},
+ texFront = {TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT)},
texFrontActive = {
- new GT_RenderedTexture(MACHINE_BRONZEBRICKS_SIDE),
- new GT_RenderedTexture(BOILER_FRONT_ACTIVE),
- new GT_RenderedGlowTexture(BOILER_FRONT_ACTIVE_GLOW)};
+ TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE),
+ TextureFactory.of(BOILER_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build()};
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
index f4046f2d6b..2c3034911c 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
@@ -5,8 +5,7 @@ import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.common.gui.GT_Container_Boiler;
@@ -41,16 +40,16 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[5][17][];
final ITexture[]
- texBottom = {new GT_RenderedTexture(MACHINE_STEELBRICKS_BOTTOM)},
- texTop = {new GT_RenderedTexture(MACHINE_STEELBRICKS_TOP), new GT_RenderedTexture(OVERLAY_PIPE)},
- texSide = {new GT_RenderedTexture(MACHINE_STEELBRICKS_SIDE), new GT_RenderedTexture(OVERLAY_PIPE)},
+ texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)},
+ texTop = {TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)},
+ texSide = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)},
texFront = {
- new GT_RenderedTexture(MACHINE_STEELBRICKS_SIDE),
- new GT_RenderedTexture(BOILER_LAVA_FRONT)},
+ TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
+ TextureFactory.of(BOILER_LAVA_FRONT)},
texFrontActive = {
- new GT_RenderedTexture(MACHINE_STEELBRICKS_SIDE),
- new GT_RenderedTexture(BOILER_LAVA_FRONT_ACTIVE),
- new GT_RenderedGlowTexture(BOILER_LAVA_FRONT_ACTIVE_GLOW)};
+ TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
+ TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW).glow().build()};
for (byte i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
index 7141fc44ab..d08df611f7 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
@@ -5,7 +5,7 @@ import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_Boiler;
@@ -99,15 +99,15 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
int i = color + 1;
short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa);
rTextures[0][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation)};
+ TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation)};
rTextures[1][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation),
- new GT_RenderedTexture(BlockIcons.BOILER_SOLAR)};
+ TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation),
+ TextureFactory.of(BlockIcons.BOILER_SOLAR)};
rTextures[2][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation)};
+ TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation)};
rTextures[3][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation),
- new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE)};
+ TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation),
+ TextureFactory.of(BlockIcons.OVERLAY_PIPE)};
}
return rTextures;
}
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java
index d9c0fad663..d7a003ac5d 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java
@@ -5,7 +5,7 @@ import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.common.gui.GT_GUIContainer_Boiler;
import net.minecraft.entity.player.InventoryPlayer;
@@ -41,15 +41,15 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil
int i = color + 1;
short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa);
rTextures[0][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation)};
+ TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation)};
rTextures[1][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation),
- new GT_RenderedTexture(BlockIcons.BOILER_SOLAR)};
+ TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation),
+ TextureFactory.of(BlockIcons.BOILER_SOLAR)};
rTextures[2][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation)};
+ TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation)};
rTextures[3][i] = new ITexture[]{
- new GT_RenderedTexture(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation),
- new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE)};
+ TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation),
+ TextureFactory.of(BlockIcons.OVERLAY_PIPE)};
}
return rTextures;
}
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index db0c37fb04..c0e70e42d8 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -3,8 +3,7 @@ package gregtech.common.tileentities.boilers;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.common.gui.GT_Container_Boiler;
import gregtech.common.gui.GT_GUIContainer_Boiler;
import net.minecraft.entity.player.InventoryPlayer;
@@ -38,14 +37,14 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[5][17][];
final ITexture[]
- texBottom = {new GT_RenderedTexture(MACHINE_STEELBRICKS_BOTTOM)},
- texTop = {new GT_RenderedTexture(MACHINE_STEELBRICKS_TOP), new GT_RenderedTexture(OVERLAY_PIPE)},
- texSide = {new GT_RenderedTexture(MACHINE_STEELBRICKS_SIDE), new GT_RenderedTexture(OVERLAY_PIPE)},
- texFront = {new GT_RenderedTexture(MACHINE_STEELBRICKS_SIDE), new GT_RenderedTexture(BOILER_FRONT)},
+ texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)},
+ texTop = {TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)},
+ texSide = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)},
+ texFront = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT)},
texFrontActive = {
- new GT_RenderedTexture(MACHINE_STEELBRICKS_SIDE),
- new GT_RenderedTexture(BOILER_FRONT_ACTIVE),
- new GT_RenderedGlowTexture(BOILER_FRONT_ACTIVE_GLOW)};
+ TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
+ TextureFactory.of(BOILER_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build()};
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
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 a6d72c5814..5733332eda 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,18 +4,19 @@ 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.render.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;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+
public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator {
public static final int BASE_POLLUTION = 2;
@@ -67,65 +68,65 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
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);
}
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(DIESEL_GENERATOR_FRONT), OVERLAYS_ENERGY_OUT[this.mTier]};
}
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(DIESEL_GENERATOR_BACK)};
}
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(DIESEL_GENERATOR_BOTTOM)};
}
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(DIESEL_GENERATOR_TOP)};
}
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(DIESEL_GENERATOR_SIDE)};
}
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(DIESEL_GENERATOR_FRONT_ACTIVE), OVERLAYS_ENERGY_OUT[this.mTier]};
}
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(DIESEL_GENERATOR_BACK_ACTIVE)};
}
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(DIESEL_GENERATOR_BOTTOM_ACTIVE)};
}
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(DIESEL_GENERATOR_TOP_ACTIVE)};
}
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(DIESEL_GENERATOR_SIDE_ACTIVE)};
}
@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 788095cfbc..730e6e4fdc 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
@@ -7,7 +7,7 @@ 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.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator {
@@ -58,47 +58,47 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
}
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(Textures.BlockIcons.GAS_TURBINE_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
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(Textures.BlockIcons.GAS_TURBINE_BACK)};
}
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(Textures.BlockIcons.GAS_TURBINE_BOTTOM)};
}
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(Textures.BlockIcons.GAS_TURBINE_TOP)};
}
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(Textures.BlockIcons.GAS_TURBINE_SIDE)};
}
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(Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
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(Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE)};
}
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(Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE)};
}
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(Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE)};
}
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(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)};
}
@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 22d4766f0e..11dd1e406e 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
@@ -6,8 +6,7 @@ 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.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -39,12 +38,12 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
}
if (!aActive) return new ITexture[]{
BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(BlockIcons.MACHINE_CASING_FUSION_GLASS)
+ TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS)
};
return new ITexture[]{
BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()
};
}
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 9649b22c6d..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
@@ -6,8 +6,7 @@ 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.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC;
@@ -72,8 +71,8 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
public ITexture[] getFront(byte aColor) {
return new ITexture[]{
super.getFront(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW),
+ TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
OVERLAYS_ENERGY_OUT[mTier]};
}
@@ -81,40 +80,40 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
public ITexture[] getBack(byte aColor) {
return new ITexture[]{
super.getBack(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC_FRONT),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_FRONT_GLOW)};
+ 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(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW)};
+ 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(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW)};
+ 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(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW)};
+ 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(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW),
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
OVERLAYS_ENERGY_OUT[mTier]};
}
@@ -122,32 +121,32 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
public ITexture[] getBackActive(byte aColor) {
return new ITexture[]{
super.getBackActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW)};
+ 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(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW)};
+ 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(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW)};
+ 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(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW)};
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
@Override
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 eba992ffd0..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
@@ -8,8 +8,7 @@ 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.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Log;
@@ -65,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;
@@ -206,8 +205,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
public ITexture[] getFront(byte aColor) {
return new ITexture[]{
super.getFront(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW),
+ TextureFactory.of(MACHINE_CASING_MAGIC),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
OVERLAYS_ENERGY_OUT[mTier]};
}
@@ -215,39 +214,39 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
public ITexture[] getBack(byte aColor) {
return new ITexture[]{
super.getBack(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC_FRONT),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_FRONT_GLOW)};
+ 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(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW)};
+ 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(MACHINE_CASING_DRAGONEGG)};
+ TextureFactory.of(MACHINE_CASING_DRAGONEGG)};
}
@Override
public ITexture[] getSides(byte aColor) {
return new ITexture[]{
super.getSides(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_GLOW)};
+ 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(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW),
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
OVERLAYS_ENERGY_OUT[mTier]};
}
@@ -255,24 +254,24 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
public ITexture[] getBackActive(byte aColor) {
return new ITexture[]{
super.getBackActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW)};
+ 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(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW)};
+ 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(MACHINE_CASING_DRAGONEGG),
- new GT_RenderedGlowTexture(MACHINE_CASING_DRAGONEGG_GLOW)
+ TextureFactory.of(MACHINE_CASING_DRAGONEGG),
+ TextureFactory.builder().addIcon(MACHINE_CASING_DRAGONEGG_GLOW).glow().build()
};
}
@@ -280,8 +279,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[]{
super.getSidesActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_MAGIC_ACTIVE),
- new GT_RenderedGlowTexture(MACHINE_CASING_MAGIC_ACTIVE_GLOW)};
+ TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()};
}
@Override
@@ -519,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;
/**
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 ab0aabf51e..7a716e62b4 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
@@ -6,8 +6,7 @@ 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.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import static gregtech.api.enums.Textures.BlockIcons.*;
@@ -95,67 +94,67 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(NAQUADAH_REACTOR_SOLID_FRONT)};
+ return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT)};
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(NAQUADAH_REACTOR_SOLID_BACK)};
+ return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK)};
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(NAQUADAH_REACTOR_SOLID_BOTTOM)};
+ return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM)};
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(NAQUADAH_REACTOR_SOLID_TOP)};
+ return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP)};
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(NAQUADAH_REACTOR_SOLID_SIDE)};
+ return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE)};
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[]{
super.getFrontActive(aColor)[0],
- new GT_RenderedTexture(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE),
- new GT_RenderedGlowTexture(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW)};
+ 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(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE),
- new GT_RenderedGlowTexture(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW)};
+ 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(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE),
- new GT_RenderedGlowTexture(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW)};
+ 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(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- new GT_RenderedGlowTexture(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW)};
+ 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(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE),
- new GT_RenderedGlowTexture(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW)};
+ 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 58fa17a824..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
@@ -6,8 +6,7 @@ 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.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS;
@@ -38,36 +37,36 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe
public ITexture[] getFront(byte aColor) {
return new ITexture[]{
super.getFront(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS),
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS),
OVERLAYS_ENERGY_OUT[mTier]};
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[]{
super.getFrontActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW),
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build(),
OVERLAYS_ENERGY_OUT[mTier]};
}
@@ -75,32 +74,32 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe
public ITexture[] getBackActive(byte aColor) {
return new ITexture[]{
super.getBackActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)};
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[]{
super.getBottomActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)};
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[]{
super.getTopActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)};
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[]{
super.getSidesActive(aColor)[0],
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)};
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()};
}
@Override
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 04371ef29d..87d18958e2 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
@@ -7,7 +7,7 @@ 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.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import net.minecraftforge.fluids.FluidStack;
@@ -77,45 +77,45 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
}
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT),
+ return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of(Textures.BlockIcons.STEAM_TURBINE_FRONT),
Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
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(Textures.BlockIcons.STEAM_TURBINE_BACK)};
}
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(Textures.BlockIcons.STEAM_TURBINE_BOTTOM)};
}
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(Textures.BlockIcons.STEAM_TURBINE_TOP)};
}
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(Textures.BlockIcons.STEAM_TURBINE_SIDE)};
}
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE),
+ return new ITexture[]{super.getFrontActive(aColor)[0], TextureFactory.of(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE),
Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
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(Textures.BlockIcons.STEAM_TURBINE_BACK_ACTIVE)};
}
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(Textures.BlockIcons.STEAM_TURBINE_BOTTOM_ACTIVE)};
}
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(Textures.BlockIcons.STEAM_TURBINE_TOP_ACTIVE)};
}
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(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE)};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
index 536ed91ab5..2f94437eee 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
@@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicHull_NonElectric {
public GT_MetaTileEntity_BasicHull_Bronze(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
@@ -28,9 +28,9 @@ public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicH
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- rTextures[0][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[1][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ rTextures[0][(i + 1)] = new ITexture[]{TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ rTextures[1][(i + 1)] = new ITexture[]{TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ rTextures[2][(i + 1)] = new ITexture[]{TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
}
return rTextures;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
index 03052d9934..df71a13c2b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
@@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
public class GT_MetaTileEntity_BasicHull_BronzeBricks extends GT_MetaTileEntity_BasicHull_NonElectric {
public GT_MetaTileEntity_BasicHull_BronzeBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
@@ -28,11 +28,11 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks extends GT_MetaTileEntity_
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp0 = {TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp2 = {TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
index 8a51b59b5a..31ae133735 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
@@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
super(aID, aName, aNameRegional, aTier, aDescription);
@@ -27,11 +27,11 @@ public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHu
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp0 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp2 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
index 215226bab8..4fe2bca08a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
@@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
public class GT_MetaTileEntity_BasicHull_SteelBricks extends GT_MetaTileEntity_BasicHull_NonElectric {
public GT_MetaTileEntity_BasicHull_SteelBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) {
@@ -28,11 +28,11 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks extends GT_MetaTileEntity_B
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp0 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ ITexture[] tmp2 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
index 4f461fd649..12d839d221 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
@@ -1,9 +1,5 @@
package gregtech.common.tileentities.machines;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
-
import appeng.api.AEApi;
import appeng.api.networking.GridFlags;
import appeng.api.networking.energy.IEnergySource;
@@ -20,12 +16,16 @@ import appeng.util.Platform;
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
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_Hatch_OutputBus;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH;
public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatch_OutputBus {
private BaseActionSource requestSource = null;
@@ -47,12 +47,12 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ME_HATCH)};
+ return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH)};
}
@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ME_HATCH)};
+ return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH)};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
index d69096f830..cf2939dbaf 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
@@ -7,10 +7,8 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.blocks.GT_Block_Ores_Abstract;
@@ -57,16 +55,16 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
1, // output slot count
"Default.png", // GUI name
"", // NEI name
- new GT_RenderedTexture(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_ROCK_BREAKER),
- new GT_RenderedTexture(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_ROCK_BREAKER),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER),
- new GT_RenderedTexture(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_ROCK_BREAKER));
+ TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
+ TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
+ TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER));
radius = aRadius;
step = aStep;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
index 8aeba49886..c7a7792c3a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
@@ -5,9 +5,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -29,16 +27,16 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_BOXINATOR_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_BOXINATOR),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_BOXINATOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_BOXINATOR_ACTIVE)),
- new GT_RenderedTexture(OVERLAY_FRONT_BOXINATOR),
- new GT_RenderedTexture(OVERLAY_TOP_BOXINATOR_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_BOXINATOR),
- new GT_RenderedTexture(OVERLAY_BOTTOM_BOXINATOR_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_BOXINATOR));
+ TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_BOXINATOR),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_BOXINATOR),
+ TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_BOXINATOR),
+ TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR));
}
public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
index e5fed90740..15e14de5e3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
@@ -10,7 +10,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -19,7 +19,7 @@ import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine {
public GT_MetaTileEntity_CuringOven(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Heats tools for hardening", 1, 1, "E_Oven.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM")));
+ super(aID, aName, aNameRegional, aTier, 1, "Heats tools for hardening", 1, 1, "E_Oven.png", "", TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM")));
}
public GT_MetaTileEntity_CuringOven(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
index 6c80b44dc1..67822a5dfb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
@@ -2,7 +2,10 @@ package gregtech.common.tileentities.machines.basic;
import com.google.common.collect.ArrayListMultimap;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -11,10 +14,8 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -23,7 +24,13 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@@ -50,20 +57,20 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
"",
//Textures
- new GT_RenderedTexture(OVERLAY_SIDE_DISASSEMBLER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_DISASSEMBLER),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_DISASSEMBLER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW)),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_DISASSEMBLER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_DISASSEMBLER_GLOW)),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_TOP_DISASSEMBLER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_TOP_DISASSEMBLER),
- new GT_RenderedTexture(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_DISASSEMBLER)
+ TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_TOP_DISASSEMBLER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_TOP_DISASSEMBLER),
+ TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER)
);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
index 4c3bc77a3a..b6e17c7b08 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
@@ -7,9 +7,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Recipe;
import net.minecraftforge.fluids.FluidStack;
@@ -33,16 +31,16 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
public GT_MetaTileEntity_Massfabricator(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "UUM = Matter * Fabrication Squared", 1, 1, "Massfabricator.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_MASSFAB_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_MASSFAB),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_MASSFAB_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_FRONT_MASSFAB),
- new GT_RenderedTexture(OVERLAY_TOP_MASSFAB_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_MASSFAB),
- new GT_RenderedTexture(OVERLAY_BOTTOM_MASSFAB_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_MASSFAB));
+ TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_MASSFAB),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_MASSFAB_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_MASSFAB),
+ TextureFactory.of(OVERLAY_TOP_MASSFAB_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_MASSFAB),
+ TextureFactory.of(OVERLAY_BOTTOM_MASSFAB_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_MASSFAB));
}
public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
index 88daf30436..01f136747c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -9,8 +9,7 @@ import gregtech.api.interfaces.tileentity.IEnergyConnected;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_MicrowaveEnergyTransmitter;
@@ -102,12 +101,12 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
if (aSide == 0) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]};
if (aActive) return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build()};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
index 226fc5b342..4d7a6c4af5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
@@ -5,13 +5,12 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gregtech.common.blocks.GT_Block_Ores_Abstract;
import gregtech.common.blocks.GT_TileEntity_Ores;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -36,9 +35,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
int drillY = 0;
boolean isPickingPipes;
boolean waitMiningPipe;
- final static int[] RADIUS = new int[]{8, 8, 16, 24, 32}; //Miner radius per tier
- final static int[] SPEED = new int[]{160, 160, 80, 40, 20}; //Miner cycle time per tier
- final static int[] ENERGY = new int[]{8, 8, 32, 128, 512}; //Miner energy consumption per tier
+ static final int[] RADIUS = {8, 8, 16, 24, 32}; //Miner radius per tier
+ static final int[] SPEED = {160, 160, 80, 40, 20}; //Miner cycle time per tier
+ static final int[] ENERGY = {8, 8, 32, 128, 512}; //Miner energy consumption per tier
private int radiusConfig; //Miner configured radius
private final ArrayList<ChunkPosition> oreBlockPositions = new ArrayList<>();
@@ -52,14 +51,14 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
"Maximum work area " + (RADIUS[aTier] * 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1),
"Fortune bonus of " + aTier},
2, 2, "Miner.png", "",
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")),
- new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")));
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")));
radiusConfig = RADIUS[mTier];
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
index 736ddc850d..095c87f948 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
@@ -4,8 +4,7 @@ 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.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_SpawnEventHandler;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -44,12 +43,12 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]};
if (aActive) return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build()};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
index bbe487aa8c..56866fb8db 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
@@ -6,9 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -30,16 +28,16 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_AC
public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachine {
public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_POTIONBREWER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_POTIONBREWER),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_POTIONBREWER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_FRONT_POTIONBREWER),
- new GT_RenderedTexture(OVERLAY_TOP_POTIONBREWER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_POTIONBREWER),
- new GT_RenderedTexture(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_POTIONBREWER));
+ TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_POTIONBREWER),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_POTIONBREWER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_POTIONBREWER),
+ TextureFactory.of(OVERLAY_TOP_POTIONBREWER_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_POTIONBREWER),
+ TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER));
}
public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index 6801d2d410..24104ee660 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -8,7 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
@@ -27,7 +27,11 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.IFluidHandler;
-import java.util.*;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.GT_Values.debugBlockPump;
@@ -352,11 +356,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
}
private int getMaxPumpableDistance() {
- return GT_MetaTileEntity_Pump.getMaxDistanceForTier(this.mTier);
+ return getMaxDistanceForTier(this.mTier);
}
private long getEuUsagePerAction() {
- return GT_MetaTileEntity_Pump.getEuUsagePerTier(this.mTier);
+ return getEuUsagePerTier(this.mTier);
}
private boolean hasValidFluid() {
@@ -718,7 +722,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
@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 == 0 || aSide == 1) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP)};
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide == 0 || aSide == 1) ? TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) : TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP)};
}
@Override
@@ -729,8 +733,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[]{
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),};
+ TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP),
+ TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP),};
}
private FakePlayer mFakePlayer = null;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
index 78887a4692..bbba895f28 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
@@ -1,14 +1,15 @@
package gregtech.common.tileentities.machines.basic;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
+import gregtech.api.enums.Element;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -45,16 +46,16 @@ public class GT_MetaTileEntity_Replicator
public GT_MetaTileEntity_Replicator(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "Producing Elemental Matter", 1, 1, "Replicator.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_REPLICATOR_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_REPLICATOR),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_REPLICATOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_FRONT_REPLICATOR),
- new GT_RenderedTexture(OVERLAY_TOP_REPLICATOR_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_REPLICATOR),
- new GT_RenderedTexture(OVERLAY_BOTTOM_REPLICATOR_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_REPLICATOR));
+ TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_REPLICATOR),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_REPLICATOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_REPLICATOR),
+ TextureFactory.of(OVERLAY_TOP_REPLICATOR_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_REPLICATOR),
+ TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR));
}
public GT_MetaTileEntity_Replicator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
index 643a6e78da..d7a66d440a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
@@ -6,9 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -28,16 +26,16 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_AC
public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachine {
public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_ROCK_BREAKER),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER),
- new GT_RenderedTexture(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_ROCK_BREAKER),
- new GT_RenderedTexture(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_ROCK_BREAKER));
+ TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
+ TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
+ TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER));
}
public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
index 39b65a94cd..6b53ba1dbe 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
@@ -13,10 +13,8 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Assemblyline_Server;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
@@ -34,21 +32,21 @@ import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes;
public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
-
+
public GT_MetaTileEntity_Scanner(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "Scans Crops and other things.", 1, 1, "Scanner.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_SCANNER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_SCANNER),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_SCANNER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW)),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_SCANNER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_SCANNER_GLOW)),
- new GT_RenderedTexture(OVERLAY_TOP_SCANNER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_SCANNER),
- new GT_RenderedTexture(OVERLAY_BOTTOM_SCANNER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_SCANNER));
+ TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_SCANNER),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_SCANNER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_SCANNER),
+ TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_SCANNER));
}
public GT_MetaTileEntity_Scanner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
@@ -231,14 +229,14 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true) && aStack != null) {
for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) {
if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, aStack, true)) {
- boolean failScanner=true;
- for(GT_Recipe scannerRecipe:sScannerFakeRecipes.mRecipeList){
- if(GT_Utility.areStacksEqual(scannerRecipe.mInputs[0],aStack,true)){
- failScanner=false;
+ boolean failScanner = true;
+ for (GT_Recipe scannerRecipe : sScannerFakeRecipes.mRecipeList) {
+ if (GT_Utility.areStacksEqual(scannerRecipe.mInputs[0], aStack, true)) {
+ failScanner = false;
break;
}
}
- if(failScanner){
+ if (failScanner) {
return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
}
@@ -347,7 +345,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mProgresstime >= (mMaxProgresstime - 1)) {
if ((this.mOutputItems[0] != null) && (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707"))) {
- GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning");
+ GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning");
}
}
super.onPostTick(aBaseMetaTileEntity, aTick);
@@ -370,7 +368,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
index 7ec646c383..2abc1011a5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
@@ -7,10 +7,8 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_UndergroundOil;
@@ -46,16 +44,16 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
super(aID, aName, aNameRegional, aTier, 1,
"(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", 1, 1,
"Default.png", "",
- new GT_RenderedTexture(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_SIDE_ROCK_BREAKER),
- new GT_RenderedTexture(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_TOP_ROCK_BREAKER),
- new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)),
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER),
- new GT_RenderedTexture(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(OVERLAY_BOTTOM_ROCK_BREAKER));
+ TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
+ TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
+ TextureFactory.of(
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
+ TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
+ TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER));
}
public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index d73be5f59e..7d6c0a29ed 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -5,8 +5,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_Teleporter;
@@ -202,16 +201,16 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER_SIDES),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_SIDES_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER_SIDES),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_SIDES_GLOW).glow().build()};
if (aActive) return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_TELEPORTER),
- new GT_RenderedGlowTexture(OVERLAY_TELEPORTER_GLOW)};
+ TextureFactory.of(OVERLAY_TELEPORTER),
+ TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build()};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
index 15298ae2de..0cc9c83dc4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
@@ -25,8 +25,7 @@ package gregtech.common.tileentities.machines.long_distance;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
@@ -109,15 +108,15 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti
if (aSide == aFacing)
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_PIPELINE_FLUID_FRONT)};
+ TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT)};
else if (aSide == GT_Utility.getOppositeSide(aFacing))
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_PIPELINE_FLUID_BACK)};
+ TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK)};
else
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_PIPELINE_FLUID_SIDE),
- new GT_RenderedGlowTexture(OVERLAY_PIPELINE_FLUID_SIDE_GLOW)};
+ TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE),
+ TextureFactory.builder().addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW).glow().build()};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
index 41b12549ee..18ec03a5a4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
@@ -25,8 +25,7 @@ package gregtech.common.tileentities.machines.long_distance;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
@@ -182,15 +181,15 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit
if (aSide == aFacing)
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_PIPELINE_ITEM_FRONT)};
+ TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT)};
else if (aSide == GT_Utility.getOppositeSide(aFacing))
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_PIPELINE_ITEM_BACK)};
+ TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK)};
else
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_PIPELINE_ITEM_SIDE),
- new GT_RenderedGlowTexture(OVERLAY_PIPELINE_ITEM_SIDE_GLOW)};
+ TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE),
+ TextureFactory.builder().addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW).glow().build()};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
index d579beca6b..6695c4d0a2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
@@ -12,8 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -88,12 +87,12 @@ public class GT_MetaTileEntity_AssemblyLine
if (aActive)
return new ITexture[]{
BlockIcons.casingTexturePages[0][16],
- new GT_RenderedTexture(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
BlockIcons.casingTexturePages[0][16],
- new GT_RenderedTexture(OVERLAY_FRONT_ASSEMBLY_LINE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ASSEMBLY_LINE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).glow().build()};
}
return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
index a4c1efbb04..0c650c995a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
@@ -6,18 +6,17 @@ import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.block.Block;
import org.lwjgl.input.Keyboard;
public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace {
- private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS)};
- private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE)};
+ private static final ITexture[] FACING_SIDE = {TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS)};
+ private static final ITexture[] FACING_FRONT = {TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE)};
private static final ITexture[] FACING_ACTIVE = {
- new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE),
- new GT_RenderedGlowTexture(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW)
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE),
+ TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW).glow().build()
};
public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
index 9c38d0a46f..93b36d376c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
@@ -1,20 +1,23 @@
package gregtech.common.tileentities.machines.multi;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS;
+
public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace {
- private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS)};
- private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE)};
+ private static final ITexture[] FACING_SIDE = {TextureFactory.of(MACHINE_BRONZEPLATEDBRICKS)};
+ private static final ITexture[] FACING_FRONT = {TextureFactory.of(MACHINE_BRONZEBLASTFURNACE)};
private static final ITexture[] FACING_ACTIVE = {
- new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE),
- new GT_RenderedGlowTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW)
+ TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE),
+ TextureFactory.builder().addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW).glow().build()
};
public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
index abc8e3724c..15e52ae32d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.common.GT_Pollution;
@@ -251,11 +250,11 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock
if (aSide == 1) {
if (aActive) return new ITexture[]{
casingTexturePages[0][10],
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[0][10],
- new GT_RenderedTexture(OVERLAY_FRONT_ROCK_BREAKER)};
+ TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER)};
}
return new ITexture[]{casingTexturePages[0][10]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
index a34ca31b6c..f88dbfba1a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
@@ -2,7 +2,6 @@ package gregtech.common.tileentities.machines.multi;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMachineCallback;
@@ -10,7 +9,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
@@ -18,10 +17,12 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
+import org.lwjgl.input.Keyboard;
import static gregtech.api.enums.GT_Values.debugCleanroom;
-
-import org.lwjgl.input.Keyboard;
+import static gregtech.api.enums.Textures.BlockIcons.BLOCK_PLASCRETE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE;
public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase {
private int mHeight = -1;
@@ -34,303 +35,302 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
super(aName);
}
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Cleanroom(mName);
- }
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Cleanroom(mName);
+ }
- @Override
+ @Override
public String[] getDescription() {
- final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Cleanroom")
- .addInfo("Controller block for the Cleanroom")
- .addInfo("Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency when not overclocked")//?
- .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV")
- .addInfo("2 LV batteries + 1 LV generator or 1 MV generator")//?
- .addInfo("Time required to reach full efficiency is propotional to the height of empty space within")
- .addInfo("Make sure your Energy Hatch matches! ?")
- .addSeparator()
- .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true)
- .addController("Top center")
- .addCasingInfo("Plascrete", 20)
- .addStructureInfo(GT_Values.cleanroomGlass+"% of the Plascrete can be replaced with Reinforced Glass")//check
- .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
- .addEnergyHatch("LV or MV, any casing")//check
- .addMaintenanceHatch("Any casing")
- .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)")
- .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls")
- .addStructureInfo("You can also use Diodes for more power")
- .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit")
- .toolTipFinisher("Gregtech");
- if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
- return tt.getInformation();
- } else {
- return tt.getStructureInformation();
- }
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Cleanroom")
+ .addInfo("Controller block for the Cleanroom")
+ .addInfo("Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency when not overclocked")//?
+ .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV")
+ .addInfo("2 LV batteries + 1 LV generator or 1 MV generator")//?
+ .addInfo("Time required to reach full efficiency is propotional to the height of empty space within")
+ .addInfo("Make sure your Energy Hatch matches! ?")
+ .addSeparator()
+ .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true)
+ .addController("Top center")
+ .addCasingInfo("Plascrete", 20)
+ .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass")//check
+ .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
+ .addEnergyHatch("LV or MV, any casing")//check
+ .addMaintenanceHatch("Any casing")
+ .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)")
+ .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls")
+ .addStructureInfo("You can also use Diodes for more power")
+ .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit")
+ .toolTipFinisher("Gregtech");
+ if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
+ return tt.getInformation();
+ } else {
+ return tt.getStructureInformation();
+ }
}
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- mEfficiencyIncrease = 100;
- // use the standard overclock mechanism to determine duration and estimate a maximum consumption
- calculateOverclockedNessMulti(40, 45 * Math.max(1, mHeight - 1), 1, getMaxInputVoltage());
- // negate it to trigger the special energy consumption function. divide by 10 to get the actual final consumption.
- mEUt /= -10;
- return true;
- }
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ mEfficiencyIncrease = 100;
+ // use the standard overclock mechanism to determine duration and estimate a maximum consumption
+ calculateOverclockedNessMulti(40, 45 * Math.max(1, mHeight - 1), 1, getMaxInputVoltage());
+ // negate it to trigger the special energy consumption function. divide by 10 to get the actual final consumption.
+ mEUt /= -10;
+ return true;
+ }
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int x = 1;
- int z = 1;
- int y = 1;
- int mDoorCount = 0;
- int mHullCount = 0;
- int mPlascreteCount = 0;
- int mGlassCount = 0;
- boolean doorState = false;
- this.mUpdate = 100;
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int x = 1;
+ int z = 1;
+ int y = 1;
+ int mDoorCount = 0;
+ int mHullCount = 0;
+ int mPlascreteCount = 0;
+ int mGlassCount = 0;
+ boolean doorState = false;
+ this.mUpdate = 100;
+
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Checking machine"
+ );
+ }
+ for (int i = 1; i < 8; i++) {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0);
+ int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0);
+ if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
+ if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) {
+ x = i;
+ break;
+ } else {
+ if (debugCleanroom) {
+ GT_Log.out.println("Cleanroom: Unable to detect room X edge?");
+ }
+ return false;
+ }
+ }
+ }
+ for (int i = 1; i < 8; i++) {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(0, 0, i);
+ int tMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 0, i);
+ if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
+ if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) {
+ z = i;
+ break;
+ } else {
+ if (debugCleanroom) {
+ GT_Log.out.println("Cleanroom: Unable to detect room Z edge?");
+ }
+ return false;
+ }
+ }
+ }
+ //detect room square for filters
+ for (int i = -x + 1; i < x; i++) {
+ for (int j = -z + 1; j < z; j++) {
+ if (i == 0 && j == 0) continue;
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(j, 0, i);
+ int tMeta = aBaseMetaTileEntity.getMetaIDOffset(j, 0, i);
+ if (tBlock != GregTech_API.sBlockCasings3 && tMeta != 11) {
+ return false;
+ }
+ }
+ }
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Checking machine"
- );
- }
- for (int i = 1; i < 8; i++) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0);
- int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0);
- if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
- if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) {
- x = i;
- break;
- } else {
- if (debugCleanroom) {
- GT_Log.out.println("Cleanroom: Unable to detect room X edge?");
- }
- return false;
- }
- }
- }
- for (int i = 1; i < 8; i++) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(0, 0, i);
- int tMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 0, i);
- if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
- if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) {
- z = i;
- break;
- } else {
- if (debugCleanroom) {
- GT_Log.out.println("Cleanroom: Unable to detect room Z edge?");
- }
- return false;
- }
- }
- }
- //detect room square for filters
- for (int i = -x+1; i < x; i++) {
- for (int j = -z+1; j < z; j++) {
- if (i == 0 && j == 0) continue;
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(j, 0, i);
- int tMeta = aBaseMetaTileEntity.getMetaIDOffset(j, 0, i);
- if (tBlock != GregTech_API.sBlockCasings3 && tMeta != 11) {
- return false;
- }
- }
- }
-
- for (int i = -1; i > -16; i--) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z);
- int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z);
- if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
- y = i + 1;
- break;
- }
- }
- if (y > -2) {
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Room not tall enough?"
- );
- }
- return false;
- }
- for (int dX = -x; dX <= x; dX++) {
- for (int dZ = -z; dZ <= z; dZ++) {
- for (int dY = 0; dY >= y; dY--) {
- if (dX == -x || dX == x || dY == 0 || dY == y || dZ == -z || dZ == z) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ);
- int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ);
- if (dY == 0) { // TOP
- if (dX == -x || dX == x || dZ == -z || dZ == z) { // Top Border
- if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Non reinforced block on top edge? tMeta != 2"
- );
- }
- return false;
- }
- } else if (dX != 0 || dZ != 0) { // Top Inner exclude center
- if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Non reinforced block on top face interior? tMeta != 11"
- );
- }
- return false;
- }
- }
- } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
- mPlascreteCount++;
- } else if (tBlock != null && tBlock.getUnlocalizedName().equals("blockAlloyGlass")){
- ++mGlassCount;
- } else {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ);
- if ((!this.addMaintenanceToMachineList(tTileEntity, 82)) && (!this.addEnergyInputToMachineList(tTileEntity, 82))) {
- if (tBlock instanceof ic2.core.block.BlockIC2Door) {
- if ((tMeta & 8) == 0) {
- // let's not fiddle with bits anymore.
- if (Math.abs(dZ) < z) // on side parallel to z axis
- doorState = tMeta == 1 || tMeta == 3 || tMeta == 4 || tMeta == 6;
- else if (Math.abs(dX) < x) // on side parallel to x axis
- doorState = tMeta == 0 || tMeta == 2 || tMeta == 5 || tMeta == 7;
- // corners ignored
- }
- mDoorCount++;
- } else {
- if (tTileEntity == null) {
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Missing block? Not a tTileEntity"
- );
- }
- return false;
- }
- IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Missing block? Not a aMetaTileEntity"
- );
- }
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) {
- mHullCount++;
- } else {
- if (debugCleanroom) {
- GT_Log.out.println(
- "Cleanroom: Incorrect block?"
- );
- }
- return false;
- }
- }
- }
- }
- }
- }
- }
- }
- if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) {
- return false;
- }
+ for (int i = -1; i > -16; i--) {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z);
+ int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z);
+ if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
+ y = i + 1;
+ break;
+ }
+ }
+ if (y > -2) {
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Room not tall enough?"
+ );
+ }
+ return false;
+ }
+ for (int dX = -x; dX <= x; dX++) {
+ for (int dZ = -z; dZ <= z; dZ++) {
+ for (int dY = 0; dY >= y; dY--) {
+ if (dX == -x || dX == x || dY == 0 || dY == y || dZ == -z || dZ == z) {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ);
+ int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ);
+ if (dY == 0) { // TOP
+ if (dX == -x || dX == x || dZ == -z || dZ == z) { // Top Border
+ if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Non reinforced block on top edge? tMeta != 2"
+ );
+ }
+ return false;
+ }
+ } else if (dX != 0 || dZ != 0) { // Top Inner exclude center
+ if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Non reinforced block on top face interior? tMeta != 11"
+ );
+ }
+ return false;
+ }
+ }
+ } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
+ mPlascreteCount++;
+ } else if (tBlock != null && tBlock.getUnlocalizedName().equals("blockAlloyGlass")) {
+ ++mGlassCount;
+ } else {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 82)) && (!this.addEnergyInputToMachineList(tTileEntity, 82))) {
+ if (tBlock instanceof ic2.core.block.BlockIC2Door) {
+ if ((tMeta & 8) == 0) {
+ // let's not fiddle with bits anymore.
+ if (Math.abs(dZ) < z) // on side parallel to z axis
+ doorState = tMeta == 1 || tMeta == 3 || tMeta == 4 || tMeta == 6;
+ else if (Math.abs(dX) < x) // on side parallel to x axis
+ doorState = tMeta == 0 || tMeta == 2 || tMeta == 5 || tMeta == 7;
+ // corners ignored
+ }
+ mDoorCount++;
+ } else {
+ if (tTileEntity == null) {
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Missing block? Not a tTileEntity"
+ );
+ }
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Missing block? Not a aMetaTileEntity"
+ );
+ }
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) {
+ mHullCount++;
+ } else {
+ if (debugCleanroom) {
+ GT_Log.out.println(
+ "Cleanroom: Incorrect block?"
+ );
+ }
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) {
+ return false;
+ }
- setCallbacks(x, y, z, aBaseMetaTileEntity);
+ setCallbacks(x, y, z, aBaseMetaTileEntity);
if (doorState) {
- this.mEfficiency = Math.max(0, this.mEfficiency - 200);
+ this.mEfficiency = Math.max(0, this.mEfficiency - 200);
}
- for(byte i = 0 ; i<6 ; i++){
- byte t = (byte) Math.max(1, (byte)(15/(10000f / this.mEfficiency)));
- aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, t);
+ for (byte i = 0; i < 6; i++) {
+ byte t = (byte) Math.max(1, (byte) (15 / (10000f / this.mEfficiency)));
+ aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, t);
}
- float ratio = (((float)mPlascreteCount)/100f)* GT_Values.cleanroomGlass;
+ float ratio = (((float) mPlascreteCount) / 100f) * GT_Values.cleanroomGlass;
this.mHeight = -y;
- return mPlascreteCount>=20 && mGlassCount < (int) Math.floor(ratio);
+ return mPlascreteCount >= 20 && mGlassCount < (int) Math.floor(ratio);
}
- private void setCallbacks(int x, int y, int z, IGregTechTileEntity aBaseMetaTileEntity){
- for (int dX = -x + 1; dX <= x - 1; dX++)
- for (int dZ = -z + 1; dZ <= z - 1; dZ++)
- for (int dY = -1; dY >= y + 1; dY--) {
- TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityOffset(dX, dY, dZ);
+ private void setCallbacks(int x, int y, int z, IGregTechTileEntity aBaseMetaTileEntity) {
+ for (int dX = -x + 1; dX <= x - 1; dX++)
+ for (int dZ = -z + 1; dZ <= z - 1; dZ++)
+ for (int dY = -1; dY >= y + 1; dY--) {
+ TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityOffset(dX, dY, dZ);
- if (tTileEntity instanceof IGregTechTileEntity) {
- IMetaTileEntity iMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ if (tTileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity iMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (iMetaTileEntity instanceof IMachineCallback<?>)
- checkAndSetCallback((IMachineCallback<?>) iMetaTileEntity);
+ if (iMetaTileEntity instanceof IMachineCallback<?>)
+ checkAndSetCallback((IMachineCallback<?>) iMetaTileEntity);
- } else if (tTileEntity instanceof IMachineCallback<?>)
- checkAndSetCallback((IMachineCallback<?>) tTileEntity);
- }
- }
+ } else if (tTileEntity instanceof IMachineCallback<?>)
+ checkAndSetCallback((IMachineCallback<?>) tTileEntity);
+ }
+ }
@SuppressWarnings("unchecked")
private void checkAndSetCallback(IMachineCallback<?> iMachineCallback) {
- if (debugCleanroom)
- GT_Log.out.println(
- "Cleanroom: IMachineCallback detected, checking for cleanroom: " + (iMachineCallback.getType() == this.getClass())
- );
- if (iMachineCallback.getType() == this.getClass())
- ((IMachineCallback<GT_MetaTileEntity_Cleanroom>) iMachineCallback).setCallbackBase(this);
- }
+ if (debugCleanroom)
+ GT_Log.out.println(
+ "Cleanroom: IMachineCallback detected, checking for cleanroom: " + (iMachineCallback.getType() == this.getClass())
+ );
+ if (iMachineCallback.getType() == this.getClass())
+ ((IMachineCallback<GT_MetaTileEntity_Cleanroom>) iMachineCallback).setCallbackBase(this);
+ }
@Override
- public boolean allowGeneralRedstoneOutput(){
- return true;
+ public boolean allowGeneralRedstoneOutput() {
+ return true;
}
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == 0 || aSide == 1) {
- return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE),
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)};
-
+ return new ITexture[]{TextureFactory.of(BLOCK_PLASCRETE),
+ TextureFactory.of(aActive ? OVERLAY_TOP_CLEANROOM_ACTIVE : OVERLAY_TOP_CLEANROOM)};
}
- return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)};
+ return new ITexture[]{TextureFactory.of(BLOCK_PLASCRETE)};
}
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png");
- }
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png");
+ }
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return null;
- }
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return null;
+ }
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
+ @Override
+ public boolean isFacingValid(byte aFacing) {
+ return aFacing > 1;
+ }
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
index 3711543fe8..e697208a4a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
@@ -10,8 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -84,12 +83,12 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
casingTexturePages[0][50],
- new GT_RenderedTexture(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[0][50],
- new GT_RenderedTexture(OVERLAY_FRONT_DIESEL_ENGINE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_DIESEL_ENGINE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_DIESEL_ENGINE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW).glow().build()};
}
return new ITexture[]{casingTexturePages[0][50]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index 05d5fc3e13..55f54c131d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -9,8 +9,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
@@ -73,12 +72,12 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Multi
if (aActive)
return new ITexture[]{
BlockIcons.getCasingTextureForId(CASING_INDEX),
- new GT_RenderedTexture(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
BlockIcons.getCasingTextureForId(CASING_INDEX),
- new GT_RenderedTexture(OVERLAY_FRONT_DISTILLATION_TOWER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_DISTILLATION_TOWER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).glow().build()};
}
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
index 64fbd3367e..d7b7e2aa4d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -12,8 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataA
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_ChunkManager;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
@@ -83,12 +82,12 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
getCasingTextureForId(casingTextureIndex),
- new GT_RenderedTexture(OVERLAY_FRONT_ORE_DRILL_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ORE_DRILL_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
getCasingTextureForId(casingTextureIndex),
- new GT_RenderedTexture(OVERLAY_FRONT_ORE_DRILL),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ORE_DRILL_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ORE_DRILL),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW).glow().build()};
}
return new ITexture[]{getCasingTextureForId(casingTextureIndex)};
}
@@ -450,8 +449,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_Mu
private boolean isCorrectDataItem(ItemStack aStack, int state){
if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true;
if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
- if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
- return false;
+ return (state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true);
}
/**
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index 5053da7b02..5e99491c2e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
@@ -11,8 +11,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
@@ -94,12 +93,12 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab
if (aActive)
return new ITexture[]{
casingTexturePages[0][CASING_INDEX],
- new GT_RenderedTexture(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[0][CASING_INDEX],
- new GT_RenderedTexture(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).glow().build()};
}
return new ITexture[]{casingTexturePages[0][CASING_INDEX]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
index 23e25304ed..2457a65dec 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
@@ -8,8 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import net.minecraft.block.Block;
@@ -77,12 +76,12 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
casingTexturePages[0][60],
- new GT_RenderedTexture(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[0][60],
- new GT_RenderedTexture(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW).glow().build()};
}
return new ITexture[]{casingTexturePages[0][60]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 9410763217..94f812e5a9 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -13,9 +13,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_GUIContainer_FusionReactor;
@@ -41,9 +39,9 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
static {
Textures.BlockIcons.setCasingTextureForId(52,
- new GT_MultiTexture(
- new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS_YELLOW),
- new GT_RenderedGlowTexture(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ TextureFactory.of(
+ TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()
));
}
@@ -236,9 +234,9 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) return new ITexture[]{new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS), getTextureOverlay()};
+ if (aSide == aFacing) return new ITexture[]{TextureFactory.of(MACHINE_CASING_FUSION_GLASS), getTextureOverlay()};
if (aActive) return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(52)};
- return new ITexture[]{new GT_RenderedTexture(MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[]{TextureFactory.of(MACHINE_CASING_FUSION_GLASS)};
}
/**
@@ -270,8 +268,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
int tFluidList_sS=tFluidList.size();
for (int i = 0; i < tFluidList_sS - 1; i++) {
for (int j = i + 1; j < tFluidList_sS; j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
tFluidList.remove(j--); tFluidList_sS=tFluidList.size();
} else {
tFluidList.remove(i--); tFluidList_sS=tFluidList.size();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
index 549dca7180..39b78c68bd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
@@ -4,9 +4,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.block.Block;
import org.lwjgl.input.Keyboard;
@@ -16,9 +14,9 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW;
public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer {
- private static final ITexture textureOverlay = new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FUSION1),
- new GT_RenderedGlowTexture(OVERLAY_FUSION1_GLOW));
+ private static final ITexture textureOverlay = TextureFactory.of(
+ TextureFactory.of(OVERLAY_FUSION1),
+ TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).glow().build());
public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
index 23240e1507..2ffa8ba4e1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
@@ -4,9 +4,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.block.Block;
import org.lwjgl.input.Keyboard;
@@ -16,9 +14,9 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2_GLOW;
public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer {
- private static final ITexture textureOverlay = new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FUSION2),
- new GT_RenderedGlowTexture(OVERLAY_FUSION2_GLOW));
+ private static final ITexture textureOverlay = TextureFactory.of(
+ TextureFactory.of(OVERLAY_FUSION2),
+ TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).glow().build());
public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
index 51c229e1a0..e8ae396954 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
@@ -4,9 +4,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.render.GT_MultiTexture;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.block.Block;
import org.lwjgl.input.Keyboard;
@@ -16,9 +14,9 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3_GLOW;
public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer {
- private static final ITexture textureOverlay = new GT_MultiTexture(
- new GT_RenderedTexture(OVERLAY_FUSION3),
- new GT_RenderedGlowTexture(OVERLAY_FUSION3_GLOW));
+ private static final ITexture textureOverlay = TextureFactory.of(
+ TextureFactory.of(OVERLAY_FUSION3),
+ TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).glow().build());
public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
index 52666b9bae..9ce1de3fec 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
@@ -9,8 +9,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
@@ -94,12 +93,12 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc
if (aActive)
return new ITexture[]{
casingTexturePages[0][50],
- new GT_RenderedTexture(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[0][50],
- new GT_RenderedTexture(OVERLAY_FRONT_HEAT_EXCHANGER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_HEAT_EXCHANGER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).glow().build()};
}
return new ITexture[]{casingTexturePages[0][50]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
index 54779f00f7..3d979bb862 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
@@ -8,8 +8,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -70,12 +69,12 @@ public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_Mul
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
BlockIcons.casingTexturePages[0][16],
- new GT_RenderedTexture(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
BlockIcons.casingTexturePages[0][16],
- new GT_RenderedTexture(OVERLAY_FRONT_IMPLOSION_COMPRESSOR),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_IMPLOSION_COMPRESSOR),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).glow().build()};
}
return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index af7b6d54a4..841a4fb57c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -9,8 +9,7 @@ import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
@@ -108,12 +107,12 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_Mu
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- new GT_RenderedTexture(OVERLAY_FRONT_LARGE_BOILER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_LARGE_BOILER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- new GT_RenderedTexture(OVERLAY_FRONT_LARGE_BOILER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_LARGE_BOILER_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_LARGE_BOILER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW).glow().build()};
}
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index c7fd25968c..c9de809b58 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -77,12 +76,12 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
casingTexturePages[1][48],
- new GT_RenderedTexture(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[1][48],
- new GT_RenderedTexture(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).glow().build()};
}
return new ITexture[]{casingTexturePages[1][48]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
index f9b8fd3f32..bb7062e4bd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
@@ -1,11 +1,10 @@
package gregtech.common.tileentities.machines.multi;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
@@ -18,6 +17,11 @@ import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
import java.util.Collection;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_SS5;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
+
public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeTurbine {
public GT_MetaTileEntity_LargeTurbine_Gas(int aID, String aName, String aNameRegional) {
@@ -30,29 +34,29 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.casingTexturePages[0][58]};
+ return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_SS_ACTIVE5) : TextureFactory.of(LARGETURBINE_SS5) : casingTexturePages[0][58]};
}
public String[] getDescription() {
- final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Turbine")
- .addInfo("Controller block for the Large Gas Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addPollutionAmount(20 * getPollutionPerTick(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 4, true)
- .addController("Front center")
- .addCasingInfo("Stainless Steel Turbine Casing", 24)
- .addDynamoHatch("Back center")
- .addMaintenanceHatch("Side centered")
- .addMufflerHatch("Side centered")
- .addInputHatch("Gas Fuel, Side centered")
- .toolTipFinisher("Gregtech");
- if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
- return tt.getInformation();
- } else {
- return tt.getStructureInformation();
- }
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Controller block for the Large Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfo("Stainless Steel Turbine Casing", 24)
+ .addDynamoHatch("Back center")
+ .addMaintenanceHatch("Side centered")
+ .addMufflerHatch("Side centered")
+ .addInputHatch("Gas Fuel, Side centered")
+ .toolTipFinisher("Gregtech");
+ if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
+ return tt.getStructureInformation();
+ } else {
+ return tt.getInformation();
+ }
}
public int getFuelValue(FluidStack aLiquid) {
@@ -98,7 +102,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
-
+
if (aOptFlow < fuelValue) {
// turbine too weak and/or fuel too powerful
// at least consume 1L
@@ -106,17 +110,17 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
// wastes the extra fuel and generate aOptFlow directly
depleteInput(new FluidStack(firstFuelType, 1));
this.storedFluid += 1;
- return GT_Utility.safeInt((long)aOptFlow * (long)aBaseEff / 10000L);
+ return GT_Utility.safeInt((long) aOptFlow * (long) aBaseEff / 10000L);
}
-
- actualOptimalFlow = GT_Utility.safeInt((long)aOptFlow / fuelValue);
+
+ actualOptimalFlow = GT_Utility.safeInt((long) aOptFlow / fuelValue);
this.realOptFlow = actualOptimalFlow;
- int remainingFlow = GT_Utility.safeInt((long)(actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
+ int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
int flow = 0;
int totalFlow = 0;
- storedFluid=0;
+ storedFluid = 0;
for (FluidStack aFluid : aFluids) {
if (aFluid.isFluidEqual(firstFuelType)) {
flow = Math.min(aFluid.amount, remainingFlow); // try to use up to 125% of optimal flow w/o exceeding remainingFlow
@@ -126,15 +130,15 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
totalFlow += flow; // track total input used
}
}
- if(totalFlow<=0)return 0;
- tEU = GT_Utility.safeInt((long)totalFlow * fuelValue);
+ if (totalFlow <= 0) return 0;
+ tEU = GT_Utility.safeInt((long) totalFlow * fuelValue);
- if (totalFlow != actualOptimalFlow) {
- float efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float)actualOptimalFlow);
- tEU *= efficiency;
- tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L);
+ if (totalFlow == actualOptimalFlow) {
+ tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L);
} else {
- tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L);
+ float efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow);
+ tEU *= efficiency;
+ tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L);
}
return tEU;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
index b7b3f287c2..b92a73120b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
@@ -2,11 +2,10 @@ package gregtech.common.tileentities.machines.multi;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
@@ -19,12 +18,16 @@ import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI5;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_LargeTurbine {
public boolean achievement = false;
- private boolean looseFit=false;
+ private boolean looseFit = false;
public GT_MetaTileEntity_LargeTurbine_HPSteam(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -36,31 +39,31 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI5) : Textures.BlockIcons.casingTexturePages[0][59]};
+ return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_TI_ACTIVE5) : TextureFactory.of(LARGETURBINE_TI5) : casingTexturePages[0][59]};
}
public String[] getDescription() {
- final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Steam Turbine")
- .addInfo("Controller block for the Large High Pressure Steam Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Outputs Steam as well as producing power")
- .addInfo("Power output depends on turbine and fitting")
- .addInfo("Use screwdriver to adjust fitting of turbine")
- .addSeparator()
- .beginStructureBlock(3, 3, 4, true)
- .addController("Front center")
- .addCasingInfo("Titanium Turbine Casing", 24)
- .addDynamoHatch("Back center")
- .addMaintenanceHatch("Side centered")
- .addInputHatch("Superheated Steam, Side centered")
- .addOutputHatch("Steam, Side centered")
- .toolTipFinisher("Gregtech");
- if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
- return tt.getInformation();
- } else {
- return tt.getStructureInformation();
- }
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Steam Turbine")
+ .addInfo("Controller block for the Large High Pressure Steam Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Outputs Steam as well as producing power")
+ .addInfo("Power output depends on turbine and fitting")
+ .addInfo("Use screwdriver to adjust fitting of turbine")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfo("Titanium Turbine Casing", 24)
+ .addDynamoHatch("Back center")
+ .addMaintenanceHatch("Side centered")
+ .addInputHatch("Superheated Steam, Side centered")
+ .addOutputHatch("Steam, Side centered")
+ .toolTipFinisher("Gregtech");
+ if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
+ return tt.getStructureInformation();
+ } else {
+ return tt.getInformation();
+ }
}
@Override
@@ -90,25 +93,25 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
@Override
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
- if(looseFit) {
- aOptFlow*=4;
- if(aBaseEff>10000){
- aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f);
- aBaseEff=7500;
- }else if(aBaseEff>7500){
- aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f);
- aBaseEff*=0.75f;
- }else{
- aBaseEff*=0.75f;
+ if (looseFit) {
+ aOptFlow *= 4;
+ if (aBaseEff > 10000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f);
+ aBaseEff = 7500;
+ } else if (aBaseEff > 7500) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f);
+ aBaseEff *= 0.75f;
+ } else {
+ aBaseEff *= 0.75f;
}
}
int tEU = 0;
int totalFlow = 0; // Byproducts are based on actual flow
int flow = 0;
- int remainingFlow = GT_Utility.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
+ int remainingFlow = GT_Utility.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
this.realOptFlow = aOptFlow;
- storedFluid=0;
+ storedFluid = 0;
for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) {
final FluidStack aFluidStack = aFluids.get(i);
if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) {
@@ -119,25 +122,25 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
totalFlow += flow; // track total input used
if (!achievement) {
try {
- GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
+ GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
} catch (Exception ignored) {
}
achievement = true;
}
- } else if(GT_ModHandler.isAnySteam(aFluidStack)){
+ } else if (GT_ModHandler.isAnySteam(aFluidStack)) {
depleteInput(new FluidStack(aFluidStack, aFluidStack.amount));
}
}
- if(totalFlow<=0)return 0;
+ if (totalFlow <= 0) return 0;
tEU = totalFlow;
addOutput(GT_ModHandler.getSteam(totalFlow));
- if (totalFlow != aOptFlow) {
- float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow);
+ if (totalFlow == aOptFlow) {
+ tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L);
+ } else {
+ float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float) aOptFlow);
//if(totalFlow>aOptFlow){efficiency = 1.0f;}
tEU *= efficiency;
- tEU = Math.max(1, GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L));
- } else {
- tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 10000L);
+ tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L));
}
return tEU;
@@ -146,33 +149,32 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
- looseFit^=true;
+ looseFit ^= true;
GT_Utility.sendChatToPlayer(aPlayer, looseFit ? trans("500", "Fitting: Loose - More Flow") : trans("501", "Fitting: Tight - More Efficiency"));
}
}
@Override
public int getDamageToComponent(ItemStack aStack) {
- return (looseFit && XSTR_INSTANCE.nextInt(4)==0)?0:1;
+ return (looseFit && XSTR_INSTANCE.nextInt(4) == 0) ? 0 : 1;
}
-
-
+
@Override
public String[] getInfoData() {
- super.looseFit = looseFit;
- return super.getInfoData();
+ super.looseFit = looseFit;
+ return super.getInfoData();
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- aNBT.setBoolean("turbineFitting",looseFit);
+ aNBT.setBoolean("turbineFitting", looseFit);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
- looseFit=aNBT.getBoolean("turbineFitting");
+ looseFit = aNBT.getBoolean("turbineFitting");
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
index 57d58a4a39..5a0dd5bb61 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
@@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
@@ -20,6 +20,10 @@ import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
import java.util.Collection;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
+
public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_LargeTurbine {
public GT_MetaTileEntity_LargeTurbine_Plasma(int aID, String aName, String aNameRegional) {
@@ -32,29 +36,29 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU5) : Textures.BlockIcons.casingTexturePages[0][60]};
+ return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_TU_ACTIVE5) : TextureFactory.of(Textures.BlockIcons.LARGETURBINE_TU5) : casingTexturePages[0][60]};
}
public String[] getDescription() {
- final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Plasma Turbine")
- .addInfo("Controller block for the Large Plasma Generator")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Use your Fusion Reactor to produce the Plasma")
- .addSeparator()
- .beginStructureBlock(3, 3, 4, true)
- .addController("Front center")
- .addCasingInfo("Tungstensteel Turbine Casing", 24)
- .addDynamoHatch("Back center")
- .addMaintenanceHatch("Side centered")
- .addInputHatch("Plasma Fluid, Side centered")
- .addOutputHatch("Molten Fluid, optional, Side centered")
- .toolTipFinisher("Gregtech");
- if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
- return tt.getInformation();
- } else {
- return tt.getStructureInformation();
- }
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Plasma Turbine")
+ .addInfo("Controller block for the Large Plasma Generator")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Use your Fusion Reactor to produce the Plasma")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfo("Tungstensteel Turbine Casing", 24)
+ .addDynamoHatch("Back center")
+ .addMaintenanceHatch("Side centered")
+ .addInputHatch("Plasma Fluid, Side centered")
+ .addOutputHatch("Molten Fluid, optional, Side centered")
+ .toolTipFinisher("Gregtech");
+ if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
+ return tt.getStructureInformation();
+ } else {
+ return tt.getInformation();
+ }
}
public int getFuelValue(FluidStack aLiquid) {
@@ -98,18 +102,18 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
aOptFlow *= 800;//CHANGED THINGS HERE, check recipe runs once per 20 ticks
int tEU = 0;
- int actualOptimalFlow = 0;
+ int actualOptimalFlow = 0;
FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
- actualOptimalFlow = GT_Utility.safeInt((long)Math.ceil((double)aOptFlow / (double)fuelValue));
+ actualOptimalFlow = GT_Utility.safeInt((long) Math.ceil((double) aOptFlow / (double) fuelValue));
this.realOptFlow = actualOptimalFlow; // For scanner info
- int remainingFlow = GT_Utility.safeInt((long)(actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
+ int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
int flow = 0;
int totalFlow = 0;
- storedFluid=0;
+ storedFluid = 0;
for (FluidStack aFluid : aFluids) {
if (aFluid.isFluidEqual(firstFuelType)) {
flow = Math.min(aFluid.amount, remainingFlow); // try to use up w/o exceeding remainingFlow
@@ -120,29 +124,29 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
}
}
String fn = FluidRegistry.getFluidName(firstFuelType);
- String[] nameSegments = fn.split("\\.",2);
- if (nameSegments.length==2){
- String outputName=nameSegments[1];
+ String[] nameSegments = fn.split("\\.", 2);
+ if (nameSegments.length == 2) {
+ String outputName = nameSegments[1];
FluidStack output = FluidRegistry.getFluidStack(outputName, totalFlow);
- if (output==null){
- output = FluidRegistry.getFluidStack("molten."+outputName, totalFlow);
+ if (output == null) {
+ output = FluidRegistry.getFluidStack("molten." + outputName, totalFlow);
}
- if (output!=null) {
+ if (output != null) {
addOutput(output);
}
}
- if(totalFlow<=0)return 0;
- tEU = GT_Utility.safeInt((long)((fuelValue / 20D) * (double)totalFlow));
+ if (totalFlow <= 0) return 0;
+ tEU = GT_Utility.safeInt((long) ((fuelValue / 20D) * (double) totalFlow));
//GT_FML_LOGGER.info(totalFlow+" : "+fuelValue+" : "+aOptFlow+" : "+actualOptimalFlow+" : "+tEU);
- if (totalFlow != actualOptimalFlow) {
- double efficiency = 1.0D - Math.abs((totalFlow - actualOptimalFlow) / (float)actualOptimalFlow);
-
- tEU = (int)(tEU * efficiency);
- tEU = GT_Utility.safeInt((long)(aBaseEff/10000D*tEU));
+ if (totalFlow == actualOptimalFlow) {
+ tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU));
} else {
- tEU = GT_Utility.safeInt((long)(aBaseEff/10000D*tEU));
+ double efficiency = 1.0D - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow);
+
+ tEU = (int) (tEU * efficiency);
+ tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU));
}
return tEU;
@@ -153,17 +157,17 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
@Override
public boolean checkRecipe(ItemStack aStack) {
- if((counter&7)==0 && (aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)) {
+ if ((counter & 7) == 0 && (aStack == null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() > 179)) {
stopMachine();
return false;
}
ArrayList<FluidStack> tFluids = getStoredFluids();
- if (tFluids.size() > 0) {
+ if (!tFluids.isEmpty()) {
if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
|| this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
counter = 0;
- baseEff = GT_Utility.safeInt((long)((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
- optFlow = GT_Utility.safeInt((long)Math.max(Float.MIN_NORMAL,
+ baseEff = GT_Utility.safeInt((long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
+ optFlow = GT_Utility.safeInt((long) Math.max(Float.MIN_NORMAL,
((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
* ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed
* 50));
@@ -172,7 +176,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
}
}
- if(optFlow<=0 || baseEff<=0){
+ if (optFlow <= 0 || baseEff <= 0) {
stopMachine();//in case the turbine got removed
return false;
}
@@ -183,7 +187,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
// Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick)
// This is how much the turbine can actually change during this tick
- int maxChangeAllowed = Math.max(200, GT_Utility.safeInt((long)Math.abs(difference)/5));
+ int maxChangeAllowed = Math.max(200, GT_Utility.safeInt((long) Math.abs(difference) / 5));
if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change
int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative.
@@ -193,8 +197,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
if (this.mEUt <= 0) {
//stopMachine();
- this.mEUt=0;
- this.mEfficiency=0;
+ this.mEUt = 0;
+ this.mEfficiency = 0;
return false;
} else {
this.mMaxProgresstime = 20;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 98397529c1..fac5fe61df 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -6,7 +6,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
@@ -20,13 +20,17 @@ import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
import static gregtech.api.enums.GT_Values.STEAM_PER_WATER;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_ST5;
+import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_LargeTurbine {
private int excessWater;
private boolean achievement = false;
- private boolean looseFit=false;
+ private boolean looseFit = false;
public GT_MetaTileEntity_LargeTurbine_Steam(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -39,31 +43,31 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST5) : Textures.BlockIcons.casingTexturePages[0][57]};
+ return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? TextureFactory.of(LARGETURBINE_ST_ACTIVE5) : TextureFactory.of(LARGETURBINE_ST5) : casingTexturePages[0][57]};
}
public String[] getDescription() {
- final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Steam Turbine")
- .addInfo("Controller block for the Large Steam Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Outputs Distilled Water as well as producing power")
- .addInfo("Power output depends on turbine and fitting")
- .addInfo("Use screwdriver to adjust fitting of turbine")
- .addSeparator()
- .beginStructureBlock(3, 3, 4, true)
- .addController("Front center")
- .addCasingInfo("Turbine Casing", 24)
- .addDynamoHatch("Back center")
- .addMaintenanceHatch("Side centered")
- .addInputHatch("Steam, Side centered")
- .addOutputHatch("Distilled Water, Side centered")
- .toolTipFinisher("Gregtech");
- if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
- return tt.getInformation();
- } else {
- return tt.getStructureInformation();
- }
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Steam Turbine")
+ .addInfo("Controller block for the Large Steam Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Outputs Distilled Water as well as producing power")
+ .addInfo("Power output depends on turbine and fitting")
+ .addInfo("Use screwdriver to adjust fitting of turbine")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfo("Turbine Casing", 24)
+ .addDynamoHatch("Back center")
+ .addMaintenanceHatch("Side centered")
+ .addInputHatch("Steam, Side centered")
+ .addOutputHatch("Distilled Water, Side centered")
+ .toolTipFinisher("Gregtech");
+ if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
+ return tt.getStructureInformation();
+ } else {
+ return tt.getInformation();
+ }
}
@Override
@@ -100,25 +104,25 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
- if(looseFit) {
- aOptFlow*=4;
- if(aBaseEff>10000){
- aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f);
- aBaseEff=7500;
- }else if(aBaseEff>7500){
- aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f);
- aBaseEff*=0.75f;
- }else{
- aBaseEff*=0.75f;
+ if (looseFit) {
+ aOptFlow *= 4;
+ if (aBaseEff > 10000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f);
+ aBaseEff = 7500;
+ } else if (aBaseEff > 7500) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f);
+ aBaseEff *= 0.75f;
+ } else {
+ aBaseEff *= 0.75f;
}
}
int tEU = 0;
int totalFlow = 0; // Byproducts are based on actual flow
int flow = 0;
- int remainingFlow = GT_Utility.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
+ int remainingFlow = GT_Utility.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
this.realOptFlow = aOptFlow;
- storedFluid=0;
+ storedFluid = 0;
for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals.
final FluidStack aFluidStack = aFluids.get(i);
if (GT_ModHandler.isAnySteam(aFluidStack)) {
@@ -131,20 +135,20 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
achievement = true;
}
- }else if(GT_ModHandler.isSuperHeatedSteam(aFluidStack)) {
+ } else if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) {
depleteInput(new FluidStack(aFluidStack, aFluidStack.amount));
}
}
- if(totalFlow<=0)return 0;
+ if (totalFlow <= 0) return 0;
tEU = totalFlow;
int waterToOutput = condenseSteam(totalFlow);
addOutput(GT_ModHandler.getDistilledWater(waterToOutput));
- if (totalFlow != aOptFlow) {
- float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow);
- tEU *= efficiency;
- tEU = Math.max(1, GT_Utility.safeInt((long)tEU * (long)aBaseEff / 20000L));
+ if (totalFlow == aOptFlow) {
+ tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L);
} else {
- tEU = GT_Utility.safeInt((long)tEU * (long)aBaseEff / 20000L);
+ float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float) aOptFlow);
+ tEU *= efficiency;
+ tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L));
}
return tEU;
@@ -153,32 +157,32 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
- looseFit^=true;
+ looseFit ^= true;
GT_Utility.sendChatToPlayer(aPlayer, looseFit ? trans("500", "Fitting: Loose - More Flow") : trans("501", "Fitting: Tight - More Efficiency"));
}
}
@Override
public int getDamageToComponent(ItemStack aStack) {
- return (looseFit && XSTR_INSTANCE.nextInt(4)==0)?0:1;
+ return (looseFit && XSTR_INSTANCE.nextInt(4) == 0) ? 0 : 1;
}
-
+
@Override
public String[] getInfoData() {
- super.looseFit = looseFit;
- return super.getInfoData();
+ super.looseFit = looseFit;
+ return super.getInfoData();
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- aNBT.setBoolean("turbineFitting",looseFit);
+ aNBT.setBoolean("turbineFitting", looseFit);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
- looseFit=aNBT.getBoolean("turbineFitting");
+ looseFit = aNBT.getBoolean("turbineFitting");
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
index f00a8c9005..3bf7dc4cfb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
@@ -9,8 +9,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
@@ -80,12 +79,12 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu
if (aSide != aFacing) return new ITexture[]{casingTexturePages[0][CASING_INDEX]};
if (aActive) return new ITexture[]{
casingTexturePages[0][CASING_INDEX],
- new GT_RenderedTexture(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
casingTexturePages[0][CASING_INDEX],
- new GT_RenderedTexture(OVERLAY_FRONT_MULTI_SMELTER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_MULTI_SMELTER_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_MULTI_SMELTER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW).glow().build()};
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
index b94a6ac589..0a0088246b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
@@ -10,8 +10,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
@@ -77,11 +76,11 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[]{casingTexturePages[0][CASING_INDEX],
- new GT_RenderedTexture(OVERLAY_FRONT_OIL_CRACKER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_OIL_CRACKER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).glow().build()};
return new ITexture[]{casingTexturePages[0][CASING_INDEX],
- new GT_RenderedTexture(OVERLAY_FRONT_OIL_CRACKER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_OIL_CRACKER_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_OIL_CRACKER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).glow().build()};
}
return new ITexture[]{casingTexturePages[0][CASING_INDEX]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
index bab250e556..44fb734534 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
@@ -4,8 +4,7 @@ import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_ChunkManager;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
@@ -53,12 +52,12 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
getCasingTextureForId(casingTextureIndex),
- new GT_RenderedTexture(OVERLAY_FRONT_OIL_DRILL_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_OIL_DRILL_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
getCasingTextureForId(casingTextureIndex),
- new GT_RenderedTexture(OVERLAY_FRONT_OIL_DRILL),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_OIL_DRILL_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_OIL_DRILL),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW).glow().build()};
}
return new ITexture[]{getCasingTextureForId(casingTextureIndex)};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index 5e4a29a8be..684cead86c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -12,8 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_ProcessingArray_Manager;
import gregtech.api.util.GT_Recipe;
@@ -96,12 +95,12 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
BlockIcons.casingTexturePages[0][48],
- new GT_RenderedTexture(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
BlockIcons.casingTexturePages[0][48],
- new GT_RenderedTexture(OVERLAY_FRONT_PROCESSING_ARRAY),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_PROCESSING_ARRAY),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).glow().build()};
}
return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][48]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index c4c666d336..701a81b6ba 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -12,8 +12,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -82,12 +81,12 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
if (aActive)
return new ITexture[]{
BlockIcons.casingTexturePages[8][66],
- new GT_RenderedTexture(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW).glow().build()};
return new ITexture[]{
BlockIcons.casingTexturePages[8][66],
- new GT_RenderedTexture(OVERLAY_FRONT_PYROLYSE_OVEN),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_PYROLYSE_OVEN),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW).glow().build()};
}
return new ITexture[]{Textures.BlockIcons.casingTexturePages[8][66]};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
index fbe6e0f203..c800592d0d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -67,13 +66,13 @@ public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_MultiBloc
if (aActive) {
rTexture = new ITexture[]{
casingTexturePages[0][17],
- new GT_RenderedTexture(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).glow().build()};
} else {
rTexture = new ITexture[]{
casingTexturePages[0][17],
- new GT_RenderedTexture(OVERLAY_FRONT_VACUUM_FREEZER),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_VACUUM_FREEZER_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_VACUUM_FREEZER),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).glow().build()};
}
} else {
rTexture = new ITexture[]{casingTexturePages[0][17]};
@@ -108,9 +107,9 @@ public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_MultiBloc
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, tInput);
if (tRecipe != null) {
- if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
+ if (tRecipe.isRecipeInputEqual(true, null, tInput)) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
index 2f1bb085f5..edee82f13a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
index c3d217b5af..b15366b456 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
index f0a0231706..b5d9b7d095 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
index e9eb821fa6..8453c369d2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_COMPRESSOR)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
index 927e291fee..db4faea50e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
@@ -7,8 +7,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -73,56 +72,56 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE)};
+ TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR)};
+ TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
index ce6f55efae..8ebd24a65b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
index 915213af62..50b55f607a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_HAMMER_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
index e7f739ab2f..6145a5b1b2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -74,56 +73,56 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_HAMMER_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_HAMMER)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
index 22f700a860..f67a94f81e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -78,56 +77,56 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_FURNACE_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
index 62132751db..01e3c1220e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -78,56 +77,56 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_FURNACE_ACTIVE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE)};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_FURNACE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
index 119a698eca..39d539f395 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
@@ -103,57 +102,57 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{
super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{
super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{
super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{
super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{
super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
index b5f14d2b8b..7383e9fadc 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
@@ -103,52 +102,52 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
public ITexture[] getSideFacingActive(byte aColor) {
return new ITexture[]{
super.getSideFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[]{
super.getSideFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_SIDE_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR)};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
return new ITexture[]{
super.getFrontFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[]{super.getFrontFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_FRONT_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR)};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[]{super.getTopFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
- new GT_RenderedGlowTexture(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[]{super.getTopFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_TOP_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR)};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
return new ITexture[]{super.getBottomFacingActive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[]{super.getBottomFacingInactive(aColor)[0],
- new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_MACERATOR)};
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR)};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
index 9f6727955c..18fa7a759d 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
@@ -6,8 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.AE2DigitalChestHandler;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_QuantumChest;
import gregtech.common.gui.GT_GUIContainer_QuantumChest;
@@ -432,8 +431,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
if (aSide != aFacing) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]};
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_SCHEST),
- new GT_RenderedGlowTexture(OVERLAY_SCHEST_GLOW)
+ TextureFactory.of(OVERLAY_SCHEST),
+ TextureFactory.builder().addIcon(OVERLAY_SCHEST_GLOW).glow().build()
};
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java
index 0692d95412..0cf3121773 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java
@@ -1,18 +1,22 @@
package gregtech.common.tileentities.storage;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
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_ItemStack;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import static gregtech.api.enums.Textures.BlockIcons.LOCKERS;
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_IN;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_LOCKER;
+
public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlock {
public byte mType = 0;
@@ -38,11 +42,11 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)]};
+ ITexture[] tmp0 = {MACHINE_CASINGS[this.mTier][(i + 1)]};
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ ITexture[] tmp1 = {MACHINE_CASINGS[this.mTier][(i + 1)], OVERLAYS_ENERGY_IN[this.mTier]};
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(i + 1)], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LOCKER)};
+ ITexture[] tmp2 = {MACHINE_CASINGS[this.mTier][(i + 1)], TextureFactory.of(OVERLAY_LOCKER)};
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
@@ -50,7 +54,7 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], Textures.BlockIcons.LOCKERS[Math.abs(this.mType % Textures.BlockIcons.LOCKERS.length)]};
+ return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], LOCKERS[Math.abs(this.mType % LOCKERS.length)]};
}
return this.mTextures[0][(aColorIndex + 1)];
}
@@ -96,7 +100,7 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo
}
public long maxAmperesIn() {
- return this.mInventory.length * 2;
+ return this.mInventory.length * 2L;
}
public int rechargerSlotStartIndex() {
@@ -129,7 +133,7 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo
public void doSound(byte aIndex, double aX, double aY, double aZ) {
if (aIndex == 16) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(3), 1, 1.0F);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(3), 1, 1.0F);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java
index 5a07bb9216..396b6d6464 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java
@@ -4,8 +4,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
@@ -94,8 +93,8 @@ public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_BasicTank {
if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]};
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_QTANK),
- new GT_RenderedGlowTexture(OVERLAY_QTANK_GLOW)
+ TextureFactory.of(OVERLAY_QTANK),
+ TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build()
};
}
@@ -144,7 +143,7 @@ public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_BasicTank {
"Stored Fluid:",
EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET,
EnumChatFormatting.GREEN + Integer.toString(0) + " L" + EnumChatFormatting.RESET + " " +
- EnumChatFormatting.YELLOW + Integer.toString(getCapacity()) + " L" + EnumChatFormatting.RESET
+ EnumChatFormatting.YELLOW + getCapacity() + " L" + EnumChatFormatting.RESET
};
}
return new String[]{
@@ -152,7 +151,7 @@ public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_BasicTank {
"Stored Fluid:",
EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET,
EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " +
- EnumChatFormatting.YELLOW + Integer.toString(getCapacity()) + " L" + EnumChatFormatting.RESET
+ EnumChatFormatting.YELLOW + getCapacity() + " L" + EnumChatFormatting.RESET
};
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java
index 5c4f005698..41171720f5 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java
@@ -4,8 +4,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.render.GT_RenderedGlowTexture;
-import gregtech.api.render.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
@@ -94,8 +93,8 @@ public class GT_MetaTileEntity_SuperTank extends GT_MetaTileEntity_BasicTank {
if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]};
return new ITexture[]{
MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(OVERLAY_QTANK),
- new GT_RenderedGlowTexture(OVERLAY_QTANK_GLOW)
+ TextureFactory.of(OVERLAY_QTANK),
+ TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build()
};
}