Chisel-Team / ConnectedTexturesMod

Extensions to the vanilla model system, mainly for connected textures
http://chisel.team/ctm
GNU General Public License v2.0
125 stars 47 forks source link

Port to 1.21 and make it so the normal check can't throw a NPE (#219) #233

Closed pupnewfster closed 3 months ago

pupnewfster commented 3 months ago

Draft PR as Neo isn't out for 1.21 yet, and there is some more testing and cleanup I need to do to TextureMetadataHandler#onModelBake

I also believe this PR will address the same problem seen in #219, as I got the same stack trace after converting from using Vec3 to using a Vector3f (due to vertex consumers only handling floats), but for all CTM related blocks. It seems that the problem was from CTM still using the old (and now unused, but for some reason not yet removed from vanilla), Direction#fromDelta, as opposed to what it seems mojang has moved to of using Direction#getNearest for calculating normals.

2024-06-12_13 04 11