diff options
author | Léa Gris <lea.gris@noiraude.net> | 2021-05-20 22:57:12 +0200 |
---|---|---|
committer | Léa Gris <lea.gris@noiraude.net> | 2021-05-21 13:41:21 +0200 |
commit | 678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7 (patch) | |
tree | f275c84399e59b714bcd9a70f0ffa6d6020f5ffe /src/main/java/gregtech/common/tileentities/machines/basic | |
parent | 04468545985a4fed401d9b6626670e8af5938920 (diff) | |
download | GT5-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/tileentities/machines/basic')
15 files changed, 170 insertions, 176 deletions
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 |