This PR fixes cullfaces specified in standard "elements" models not being affected by root transforms.
Currently, the root transform is only applied to the vertex data of the quads themselves, which causes the cullface of a quad affected by a root transform to use the source element's original cullface instead of the transformed one that would be expected from its final orientation.
The intention of this PR is not to fix the issue where a model transformed by translation or scaling or by a rotation that is not a multiple of 90 degrees has undesired culling from the original or transformed cullfaces (this issue exists without this fix as well).
PR Publishing
### The artifacts published by this PR:
- :package: [`net.neoforged:neoforge:21.1.75-pr-1627-elements_model_root_xform`](https://github.com/neoforged/NeoForge/packages/2293234)
- :package: [`net.neoforged:testframework:21.1.75-pr-1627-elements_model_root_xform`](https://github.com/neoforged/NeoForge/packages/2293235)
### Repository Declaration
In order to use the artifacts published by the PR, add the following repository to your buildscript:
```gradle
repositories {
maven {
name 'Maven for PR #1627' // https://github.com/neoforged/NeoForge/pull/1627
url 'https://prmaven.neoforged.net/NeoForge/pr1627'
content {
includeModule('net.neoforged', 'neoforge')
includeModule('net.neoforged', 'testframework')
}
}
}
```
### MDK installation
In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK `bin` folder on the path.
The script will clone the MDK in a folder named `NeoForge-pr1627`.
On Powershell you will need to remove the `-L` flag from the `curl` invocation.
```sh
mkdir NeoForge-pr1627
cd NeoForge-pr1627
curl -L https://prmaven.neoforged.net/NeoForge/pr1627/net/neoforged/neoforge/21.1.75-pr-1627-elements_model_root_xform/mdk-pr1627.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip
```
To test a production environment, you can download the installer from [here](https://prmaven.neoforged.net/NeoForge/pr1627/net.neoforged/neoforge/21.1.75-pr-1627-elements_model_root_xform/neoforge-21.1.75-pr-1627-elements_model_root_xform-installer.jar).
This PR fixes cullfaces specified in standard "elements" models not being affected by root transforms. Currently, the root transform is only applied to the vertex data of the quads themselves, which causes the cullface of a quad affected by a root transform to use the source element's original cullface instead of the transformed one that would be expected from its final orientation. The intention of this PR is not to fix the issue where a model transformed by translation or scaling or by a rotation that is not a multiple of 90 degrees has undesired culling from the original or transformed cullfaces (this issue exists without this fix as well).
This issue only affects 1.21.1 and earlier.
Fixes #1623