aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2021-05-05 21:25:44 +0200
committerLéa Gris <lea.gris@noiraude.net>2021-05-21 13:38:32 +0200
commitec599a012e92265954100bd809782c9080134394 (patch)
treed00dafcdf6b346f743ea84f32564752d0d9bacbd /src/main
parenta2c8391e8b1258d75fa0e1ab44b10ab460e192d7 (diff)
downloadGT5-Unofficial-ec599a012e92265954100bd809782c9080134394.tar.gz
GT5-Unofficial-ec599a012e92265954100bd809782c9080134394.tar.bz2
GT5-Unofficial-ec599a012e92265954100bd809782c9080134394.zip
feat(render): active steam alloy smelters glow
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/api/enums/Textures.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java67
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java68
-rw-r--r--src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW.pngbin0 -> 339 bytes
4 files changed, 109 insertions, 27 deletions
diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java
index 7e9cb2435e..9776bf6989 100644
--- a/src/main/java/gregtech/api/enums/Textures.java
+++ b/src/main/java/gregtech/api/enums/Textures.java
@@ -552,6 +552,7 @@ public class Textures {
OVERLAY_FRONT_STEAM_FURNACE_ACTIVE,
OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW,
OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE,
+ OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW,
OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE,
OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE,
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 dabe5316ee..c110fcef45 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
@@ -7,11 +7,22 @@ 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.objects.GT_RenderedGlowTexture;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE;
+
public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze {
public GT_MetaTileEntity_AlloySmelter_Bronze(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true);
@@ -25,65 +36,95 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas
super(aName, aDescription, aTextures, 2, 1, true);
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
+ return new GT_MetaTileEntity_AlloySmelter_Bronze(mName, mDescriptionArray, mTextures);
}
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName);
}
+ @Override
public int checkRecipe() {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
- this.mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
+ mOutputItems[0] = tRecipe.getOutput(0);
+ mEUt = tRecipe.mEUt;
+ mMaxProgresstime = (tRecipe.mDuration * 2);
return 2;
}
return 0;
}
+ @Override
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(208), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(208), 10, 1.0F, aX, aY, aZ);
}
}
+ @Override
public void startProcess() {
sendLoopStart((byte) 1);
}
+ @Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
+ return new ITexture[]{
+ super.getSideFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
}
+ @Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getSideFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
}
+ @Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)};
+ 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)};
}
+ @Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getFrontFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
}
+ @Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
+ return new ITexture[]{
+ super.getTopFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
}
+ @Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getTopFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
}
+ @Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
}
+ @Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getBottomFacingInactive(aColor)[0],
+ new GT_RenderedTexture(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 8a43bf9ef4..df694922f2 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
@@ -1,17 +1,27 @@
package gregtech.common.tileentities.machines.steam;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_BasicMachine;
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.objects.GT_RenderedGlowTexture;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE;
+
public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_BasicMachine_Steel {
public GT_MetaTileEntity_AlloySmelter_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true);
@@ -25,65 +35,95 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi
super(aName, aDescription, aTextures, 2, 1, true);
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescriptionArray, this.mTextures);
+ return new GT_MetaTileEntity_AlloySmelter_Steel(mName, mDescriptionArray, mTextures);
}
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName);
}
+ @Override
public int checkRecipe() {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
- this.mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = (tRecipe.mEUt * 2);
- this.mMaxProgresstime = tRecipe.mDuration;
+ mOutputItems[0] = tRecipe.getOutput(0);
+ mEUt = (tRecipe.mEUt * 2);
+ mMaxProgresstime = tRecipe.mDuration;
return 2;
}
return 0;
}
+ @Override
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(208), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(208), 10, 1.0F, aX, aY, aZ);
}
}
+ @Override
public void startProcess() {
sendLoopStart((byte) 1);
}
+ @Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
+ return new ITexture[]{
+ super.getSideFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE)};
}
+ @Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getSideFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_SIDE_STEAM_ALLOY_SMELTER)};
}
+ @Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE)};
+ 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)};
}
+ @Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getFrontFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_FRONT_STEAM_ALLOY_SMELTER)};
}
+ @Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
+ return new ITexture[]{
+ super.getTopFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE)};
}
+ @Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getTopFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_ALLOY_SMELTER)};
}
+ @Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE)};
}
+ @Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
+ return new ITexture[]{
+ super.getBottomFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER)};
}
}
diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW.png
new file mode 100644
index 0000000000..78230dcfe3
--- /dev/null
+++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW.png
Binary files differ