aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2021-05-07 12:32:37 +0200
committerLéa Gris <lea.gris@noiraude.net>2021-05-21 13:38:37 +0200
commit6523c1f749550e16ff03668b10cbe9c11cebffeb (patch)
tree4543aeeb49333f8b3077e2c7e0e74503cba2338d /src/main
parent91d16741709ad79b402486b38a82710b1ac1d050 (diff)
downloadGT5-Unofficial-6523c1f749550e16ff03668b10cbe9c11cebffeb.tar.gz
GT5-Unofficial-6523c1f749550e16ff03668b10cbe9c11cebffeb.tar.bz2
GT5-Unofficial-6523c1f749550e16ff03668b10cbe9c11cebffeb.zip
feat(render): active steam extractor front glow
place-holder blank to support glow texture in resourcepack
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_Extractor_Bronze.java57
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java60
-rw-r--r--src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW.pngbin0 -> 143 bytes
4 files changed, 99 insertions, 19 deletions
diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java
index 949f364f63..49ba29a5e6 100644
--- a/src/main/java/gregtech/api/enums/Textures.java
+++ b/src/main/java/gregtech/api/enums/Textures.java
@@ -573,6 +573,7 @@ public class Textures {
OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE,
OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW,
OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE,
+ OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW,
OVERLAY_FRONT_BOXINATOR_ACTIVE,
OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW,
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 b8cbfb0197..83d65d3108 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,11 +7,20 @@ 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_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE;
+
public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze {
public GT_MetaTileEntity_Extractor_Bronze(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, "Extracting your first Rubber", 1, 1, false);
@@ -25,14 +34,17 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM
super(aName, aDescription, aTextures, 1, 1, false);
}
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName);
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Extractor_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
}
+ @Override
public int checkRecipe() {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sExtractorRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
@@ -44,46 +56,73 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM
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(200), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(200), 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_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getSideFacingActive(aColor)[0],
+ new GT_RenderedTexture(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)};
+ return new ITexture[]{
+ super.getSideFacingInactive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR)};
}
+ @Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getFrontFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)};
}
+ @Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR)};
+ return new ITexture[]{
+ super.getFrontFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR)};
}
+ @Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getTopFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
}
+ @Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR)};
+ return new ITexture[]{
+ super.getTopFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR)};
}
+ @Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
}
+ @Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
+ return new ITexture[]{
+ super.getBottomFacingInactive(aColor)[0],
+ new GT_RenderedTexture(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 d5f3c01738..7c89e3e0ad 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
@@ -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_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE;
+
public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMachine_Steel {
public GT_MetaTileEntity_Extractor_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, "Extracting your first Rubber", 1, 1, false);
@@ -25,14 +35,17 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa
super(aName, aDescription, aTextures, 1, 1, false);
}
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName);
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Extractor_Steel(this.mName, this.mDescriptionArray, this.mTextures);
}
+ @Override
public int checkRecipe() {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sExtractorRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
@@ -44,46 +57,73 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa
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(200), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(200), 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_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getSideFacingActive(aColor)[0],
+ new GT_RenderedTexture(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)};
+ return new ITexture[]{
+ super.getSideFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_SIDE_STEAM_EXTRACTOR)};
}
+ @Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getFrontFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ new GT_RenderedGlowTexture(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)};
}
+ @Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR)};
+ return new ITexture[]{
+ super.getFrontFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_FRONT_STEAM_EXTRACTOR)};
}
+ @Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getTopFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE)};
}
+ @Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR)};
+ return new ITexture[]{
+ super.getTopFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_TOP_STEAM_EXTRACTOR)};
}
+ @Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
+ return new ITexture[]{
+ super.getBottomFacingActive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE)};
}
+ @Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
+ return new ITexture[]{
+ super.getBottomFacingInactive(aColor)[0],
+ new GT_RenderedTexture(OVERLAY_BOTTOM_STEAM_EXTRACTOR)};
}
}
diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW.png
new file mode 100644
index 0000000000..7da18d7b26
--- /dev/null
+++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW.png
Binary files differ