aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2021-05-31 10:13:56 +0200
committerGlease <4586901+Glease@users.noreply.github.com>2021-07-30 14:34:37 +0800
commit86f69a4300e0bdb5c9921f37c84bb446e464ec78 (patch)
treef907262fa28451ee328b84a83dd9d329b48aa9b9 /src/main/java/gregtech/api
parentcb876c46e9f185b73556c1c8ed7ca2751cac2cdc (diff)
downloadGT5-Unofficial-86f69a4300e0bdb5c9921f37c84bb446e464ec78.tar.gz
GT5-Unofficial-86f69a4300e0bdb5c9921f37c84bb446e464ec78.tar.bz2
GT5-Unofficial-86f69a4300e0bdb5c9921f37c84bb446e464ec78.zip
feat(texture API): integrate ExtendedFacing rotation
Add ExtendedFacing rotation to the texture API. Rotatable ExtendedFacing textures can be created with: ```java TextureFactory.builder().addIcon(IICon).extFacing().build(); ``` Improve and unify internal implementation of standard oriented and glow textures.
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/interfaces/ITextureBuilder.java8
-rw-r--r--src/main/java/gregtech/api/util/LightingHelper.java1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java
index 8a4d715ccb..d72b538243 100644
--- a/src/main/java/gregtech/api/interfaces/ITextureBuilder.java
+++ b/src/main/java/gregtech/api/interfaces/ITextureBuilder.java
@@ -1,5 +1,6 @@
package gregtech.api.interfaces;
+import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
import net.minecraftforge.common.util.ForgeDirection;
@@ -64,6 +65,13 @@ public interface ITextureBuilder {
ITextureBuilder stdOrient();
/**
+ * Texture will orientate from block's {@link ExtendedFacing}
+ *
+ * @return {@link ITextureBuilder} for chaining
+ */
+ ITextureBuilder extFacing();
+
+ /**
* Texture always render with full brightness to glow in the dark
*
* @return {@link ITextureBuilder} for chaining
diff --git a/src/main/java/gregtech/api/util/LightingHelper.java b/src/main/java/gregtech/api/util/LightingHelper.java
index 598253b7d7..f131ef74a0 100644
--- a/src/main/java/gregtech/api/util/LightingHelper.java
+++ b/src/main/java/gregtech/api/util/LightingHelper.java
@@ -255,6 +255,7 @@ public class LightingHelper {
} else {
+ if (hasBrightnessOverride) tessellator.setBrightness(brightnessOverride);
tessellator.setColorOpaque_F(rgb[0] * lightness, rgb[1] * lightness, rgb[2] * lightness);
}