mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Add a config option to restore the calculate all normals behavior in case some setups require old broken behavior. (#9670)
This commit is contained in:
1 parent
7c84249996
commit
93a615e900
3 files changed
+15
-1
No files matched your search
@@ -512,7 +512,7 @@ public class ForgeHooksClient
|
||||
public static void fillNormal(int[] faceData, Direction facing, boolean calculateNormals)
|
||||
{
|
||||
Vector3f v2;
|
||||
if (calculateNormals) {
|
||||
if (calculateNormals || ForgeConfig.CLIENT.calculateAllNormals.get()) {
|
||||
Vector3f v1 = getVertexPos(faceData, 3);
|
||||
Vector3f t1 = getVertexPos(faceData, 1);
|
||||
v2 = getVertexPos(faceData, 2);
|
||||
|
||||
@@ -106,8 +106,11 @@ public class ForgeConfig {
|
||||
@Deprecated(since = "1.20.1", forRemoval = true) // Config option ignored.
|
||||
public final BooleanValue compressLanIPv6Addresses;
|
||||
|
||||
public final BooleanValue calculateAllNormals;
|
||||
|
||||
public final BooleanValue stabilizeDirectionGetNearest;
|
||||
|
||||
|
||||
Client(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("Client only settings, mostly things related to rendering")
|
||||
.push("client");
|
||||
@@ -139,6 +142,15 @@ public class ForgeConfig {
|
||||
.translation("forge.configgui.compressLanIPv6Addresses")
|
||||
.define("compressLanIPv6Addresses", true);
|
||||
|
||||
calculateAllNormals = builder
|
||||
.comment("During block model baking, manually calculates the normal for all faces.",
|
||||
"This was the default behavior of forge between versions 31.0 and 47.1.",
|
||||
"May result in differences between vanilla rendering and forge rendering.",
|
||||
"Will only produce differences for blocks that contain non-axis aligned faces.",
|
||||
"You will need to reload your resources to see results.")
|
||||
.translation("forge.configgui.calculateAllNormals")
|
||||
.define("calculateAllNormals", false);
|
||||
|
||||
stabilizeDirectionGetNearest = builder
|
||||
.comment("When enabled, a slightly biased Direction#getNearest calculation will be used to prevent normal fighting on 45 degree angle faces.")
|
||||
.translation("forge.configgui.stabilizeDirectionGetNearest")
|
||||
|
||||
Reference in new issue
Block a user