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.
This commit is contained in:
Léa Gris committed 2026-01-14 15:09:18 +01:00
1 parent c4c1953ae1
commit 39e860974a
1 file changed
+6
@@ -6,6 +6,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;
@@ -271,6 +272,8 @@ public enum TextureType {
CUSTOM;
/* Some util stuff for shared code between v* and r* */
public static final boolean fixedBottomFaceUV = (boolean) Launch.blackboard
.getOrDefault("hodgepodge.FixesConfig.fixBottomFaceUV", Boolean.FALSE);
public static IIcon getVIcon(TextureType type, TextureSubmap map, int x, int y, int z, int side) {
int variationSize = (type == TextureType.V9) ? 3 : 2;
@@ -291,6 +294,9 @@ public enum TextureType {
//For DOWN, reverse the indexes for only Z
textureZ = (variationSize - textureZ - 1);
}*/
else if (side == 0 && fixedBottomFaceUV) {
textureX = variationSize - textureX - 1;
}
int index;
if (side == 0 || side == 1) {