Sodium

Sodium

61M Downloads

Multipart blockstates do not correctly inherit block model rendertype

iron431 opened this issue ยท 0 comments

commented

Bug Description

When a multipart blockstate (ie fence blocks) has a part model that utilizes different rendertype than the base model (ie base model has a solid rendertype, and a part model specifies the cutout rendertype) then the part model will incorrectly inherit the base model rendertype, being solid.

Reproduction Steps

  1. Have a base block model which does not specify a rendertype (defaulting to solid)
  "parent": "minecraft:block/cube_all",
  "textures": {
    "all": "irons_spellbooks:block/voidstone"
  }
}
  1. Have a part model which specifies a rendertype
{
	"render_type": "minecraft:cutout",
	"textures": {
		"0": "irons_spellbooks:block/voidstone_trim",
		"particle": "irons_spellbooks:block/voidstone_trim"
	},
	"elements": [
		{
			"from": [0, 16.001, 0],
			"to": [16, 16.001, 16],
			"faces": {
				"up": {"uv": [0, 0, 16, 16], "texture": "#0"}
			}
		},
		{
			"from": [0, 0, -0.001],
			"to": [16, 16, -0.001],
			"faces": {
				"north": {"uv": [16, 0, 0, 16], "texture": "#0"}
			}
		}
	]
}
  1. Have a multipart blockstate utilizing said models
{
  "multipart": [
    {
      "apply": {
        "model": "irons_spellbooks:block/voidstone"
      }
    },
    {
      "when": {
        "north": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim",
        "uvlock": false
      }
    },
    {
      "when": {
        "east": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim",
        "y": 90,
        "uvlock": false
      }
    },
    {
      "when": {
        "south": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim",
        "y": 180,
        "uvlock": false
      }
    },
    {
      "when": {
        "west": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim",
        "y": 270,
        "uvlock": false
      }
    },
    {
      "when": {
        "north": "false",
        "east": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim_corner",
        "uvlock": false
      }
    },
    {
      "when": {
        "north": "false",
        "west": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim_corner",
        "y": 270,
        "uvlock": false
      }
    },
    {
      "when": {
        "south": "false",
        "west": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim_corner",
        "y": 180,
        "uvlock": false
      }
    },
    {
      "when": {
        "south": "false",
        "east": "false"
      },
      "apply": {
        "model": "irons_spellbooks:block/voidstone_trim_corner",
        "y": 90,
        "uvlock": false
      }
    }
  ]
}
  1. observe the cutout model inheriting the solid rendertype when sodium is installed

Image

  1. compare to expected vanilla behavior

Image

Log File

https://gist.github.com/iron431/b73f0b0a1e3ddb30b87eba56af197aa8

Crash Report

https://gist.github.com/iron431/e3dbb41c2e60a9995390d48283ff6fc7