mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-28 07:55:53 +00:00
Add potential support for models defining 'vanilla like' rotations in Forge's Modified Blockstate format.
This commit is contained in:
1 parent
f492e25bc9
commit
b654b84393
2 files changed
+8
-27
No files matched your search
@@ -945,11 +945,15 @@ public class ForgeBlockStateV1 extends Marker
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
else if (e.isJsonArray())
|
||||
{
|
||||
// quaternion
|
||||
return new Quat4f(parseFloatArray(e, 4, "Rotation"));
|
||||
JsonArray array = e.getAsJsonArray();
|
||||
if (array.size() == 3) //Vanilla rotation
|
||||
return TRSRTransformation.quatFromXYZDegrees(new Vector3f(parseFloatArray(e, 3, "Rotation")));
|
||||
else // quaternion
|
||||
return new Quat4f(parseFloatArray(e, 4, "Rotation"));
|
||||
}
|
||||
else throw new JsonParseException("Rotation: expected array or object, got: " + e);
|
||||
}
|
||||
else if (e.isJsonObject())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user