Skip to content

Commit 39e8609

Browse files
committed
fix(render): adapt hodgepodge fixBottomFaceUV
HodgePodge mixin fixBottomFaceUV options fixes the bottom face texture UV. See: GTNewHorizons/Hodgepodge#676 When unflipped, the bottom face of v-type connected textures blocks like the large hexplating or the Industrial Technical Block's massive big fan, needs a new unflipped order to correctly connect. Consequently, when `fixBottomFaceUV=true`, the bottom fan animation rotates the same way as other faces, instead of backward without the hodgepodge fix.
1 parent c4c1953 commit 39e8609

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/cricketcraft/chisel/api/rendering/TextureType.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.client.Minecraft;
77
import net.minecraft.client.renderer.RenderBlocks;
88
import net.minecraft.client.renderer.texture.IIconRegister;
9+
import net.minecraft.launchwrapper.Launch;
910
import net.minecraft.util.IIcon;
1011
import net.minecraft.util.ResourceLocation;
1112
import net.minecraft.world.IBlockAccess;
@@ -271,6 +272,8 @@ protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, IBlock
271272
CUSTOM;
272273

273274
/* Some util stuff for shared code between v* and r* */
275+
public static final boolean fixedBottomFaceUV = (boolean) Launch.blackboard
276+
.getOrDefault("hodgepodge.FixesConfig.fixBottomFaceUV", Boolean.FALSE);
274277

275278
public static IIcon getVIcon(TextureType type, TextureSubmap map, int x, int y, int z, int side) {
276279
int variationSize = (type == TextureType.V9) ? 3 : 2;
@@ -291,6 +294,9 @@ public static IIcon getVIcon(TextureType type, TextureSubmap map, int x, int y,
291294
//For DOWN, reverse the indexes for only Z
292295
textureZ = (variationSize - textureZ - 1);
293296
}*/
297+
else if (side == 0 && fixedBottomFaceUV) {
298+
textureX = variationSize - textureX - 1;
299+
}
294300

295301
int index;
296302
if (side == 0 || side == 1) {

0 commit comments

Comments
 (0)