44import com .google .gson .JsonParseException ;
55import net .minecraft .client .render .model .json .ModelElement ;
66import net .minecraft .util .JsonHelper ;
7- import net .minecraft .util .math .Vec3f ;
87import net .puzzlemc .core .config .PuzzleConfig ;
8+ import org .joml .Vector3f ;
99import org .spongepowered .asm .mixin .Mixin ;
1010import org .spongepowered .asm .mixin .Shadow ;
1111import org .spongepowered .asm .mixin .injection .At ;
1414
1515@ Mixin (ModelElement .Deserializer .class )
1616public abstract class MixinModelElementDeserializer {
17- @ Shadow protected abstract Vec3f deserializeVec3f (JsonObject object , String name );
17+ @ Shadow protected abstract Vector3f deserializeVec3f (JsonObject object , String name );
1818
1919 @ Inject (at = @ At ("HEAD" ),method = "deserializeRotationAngle" , cancellable = true )
2020 private void puzzle$deserializeRotationAngle (JsonObject object , CallbackInfoReturnable <Float > cir ) {
@@ -24,21 +24,21 @@ public abstract class MixinModelElementDeserializer {
2424 }
2525 }
2626 @ Inject (at = @ At ("HEAD" ),method = "deserializeTo" , cancellable = true )
27- private void puzzle$deserializeTo (JsonObject object , CallbackInfoReturnable <Vec3f > cir ) {
27+ private void puzzle$deserializeTo (JsonObject object , CallbackInfoReturnable <Vector3f > cir ) {
2828 if (PuzzleConfig .biggerModels ) {
29- Vec3f vec3f = this .deserializeVec3f (object , "to" );
30- if (!(vec3f .getX () < -32.0F ) && !(vec3f .getY () < -32.0F ) && !(vec3f .getZ () < -32.0F ) && !(vec3f .getX () > 48.0F ) && !(vec3f .getY () > 48.0F ) && !(vec3f .getZ () > 48.0F )) {
29+ Vector3f vec3f = this .deserializeVec3f (object , "to" );
30+ if (!(vec3f .x < -32.0F ) && !(vec3f .y < -32.0F ) && !(vec3f .z < -32.0F ) && !(vec3f .x > 48.0F ) && !(vec3f .y > 48.0F ) && !(vec3f .z > 48.0F )) {
3131 cir .setReturnValue (vec3f );
3232 } else {
3333 throw new JsonParseException ("'to' specifier exceeds the allowed boundaries: " + vec3f );
3434 }
3535 }
3636 }
3737 @ Inject (at = @ At ("HEAD" ),method = "deserializeFrom" , cancellable = true )
38- private void puzzle$deserializeFrom (JsonObject object , CallbackInfoReturnable <Vec3f > cir ) {
38+ private void puzzle$deserializeFrom (JsonObject object , CallbackInfoReturnable <Vector3f > cir ) {
3939 if (PuzzleConfig .biggerModels ) {
40- Vec3f vec3f = this .deserializeVec3f (object , "from" );
41- if (!(vec3f .getX () < -32.0F ) && !(vec3f .getY () < -32.0F ) && !(vec3f .getZ () < -32.0F ) && !(vec3f .getX () > 48.0F ) && !(vec3f .getY () > 48.0F ) && !(vec3f .getZ () > 48.0F )) {
40+ Vector3f vec3f = this .deserializeVec3f (object , "from" );
41+ if (!(vec3f .x < -32.0F ) && !(vec3f .y < -32.0F ) && !(vec3f .z < -32.0F ) && !(vec3f .x > 48.0F ) && !(vec3f .y > 48.0F ) && !(vec3f .z > 48.0F )) {
4242 cir .setReturnValue (vec3f );
4343 } else {
4444 throw new JsonParseException ("'from' specifier exceeds the allowed boundaries: " + vec3f );
0 commit comments