33import java .util .Set ;
44import java .util .stream .Stream ;
55
6- //#if MC >= 11903
7- import org .joml .Quaternionf ;
8- //#else
9- //$$ import com.mojang.math.Quaternion;
10- //#endif
11-
126import com .mojang .blaze3d .platform .Lighting ;
137import com .mojang .blaze3d .systems .RenderSystem ;
148import com .mojang .blaze3d .vertex .PoseStack ;
@@ -176,13 +170,8 @@ private void drawLivingEntity(double xpos, double ypos, int size, float lookSide
176170 //#else
177171 //$$ int rot = 180;
178172 //#endif
179- //#if MC >= 11903
180- Quaternionf quaternion = MathUtil .ZP .rotationDegrees (180.0F );
181- Quaternionf quaternion2 = MathUtil .XP .rotationDegrees (rotationUp * 20.0F );
182- //#else
183- //$$Quaternion quaternion = MathUtil.ZP.rotationDegrees(180.0F);
184- //$$Quaternion quaternion2 = MathUtil.XP.rotationDegrees(rotationUp * 20.0F);
185- //#endif
173+ var quaternion = MathUtil .ZP .rotationDegrees (180.0F );
174+ var quaternion2 = MathUtil .XP .rotationDegrees (rotationUp * 20.0F );
186175 quaternion .mul (quaternion2 );
187176 matrixStack .mulPose (quaternion );
188177 float yBodyRot = livingEntity .yBodyRot ;
@@ -235,7 +224,7 @@ private void drawLivingEntity(double xpos, double ypos, int size, float lookSide
235224 }
236225 prepareLighting ();
237226 EntityRenderDispatcher entityRenderDispatcher = mc_instance .getEntityRenderDispatcher ();
238- conjugate (quaternion2 );
227+ MathUtil . conjugate (quaternion2 );
239228 entityRenderDispatcher .overrideCameraOrientation (quaternion2 );
240229 entityRenderDispatcher .setRenderShadow (false );
241230 MultiBufferSource .BufferSource bufferSource = Minecraft .getInstance ().renderBuffers ().bufferSource ();
@@ -330,15 +319,6 @@ private void prepareLighting() {
330319 //#endif
331320 }
332321
333- //#if MC >= 11903
334- private void conjugate (Quaternionf quaternion2 ) {
335- quaternion2 .conjugate ();
336- //#else
337- //$$ private void conjugate(Quaternion quaternion2) {
338- //$$ quaternion2.conj();
339- //#endif
340- }
341-
342322 private void drawEntity (double xpos , double ypos , int size , float lookSides , float lookUpDown , Entity entity ,
343323 float delta , boolean lockHead ) {
344324 float rotationSide = (float ) Math .atan ((double ) (lookSides / 40.0F ));
@@ -355,13 +335,8 @@ private void drawEntity(double xpos, double ypos, int size, float lookSides, flo
355335 //#else
356336 //$$ int rot = 180;
357337 //#endif
358- //#if MC >= 11903
359- Quaternionf quaternion = MathUtil .ZP .rotationDegrees (180.0F );
360- Quaternionf quaternion2 = MathUtil .XP .rotationDegrees (rotationUp * 20.0F );
361- //#else
362- //$$Quaternion quaternion = MathUtil.ZP.rotationDegrees(180.0F);
363- //$$Quaternion quaternion2 = MathUtil.XP.rotationDegrees(rotationUp * 20.0F);
364- //#endif
338+ var quaternion = MathUtil .ZP .rotationDegrees (180.0F );
339+ var quaternion2 = MathUtil .XP .rotationDegrees (rotationUp * 20.0F );
365340 quaternion .mul (quaternion2 );
366341 matrixStack .mulPose (quaternion );
367342 float yRot = EntityUtil .getYRot (entity );
@@ -384,7 +359,7 @@ private void drawEntity(double xpos, double ypos, int size, float lookSides, flo
384359 }
385360 prepareLighting ();
386361 EntityRenderDispatcher entityRenderDispatcher = mc_instance .getEntityRenderDispatcher ();
387- conjugate (quaternion2 );
362+ MathUtil . conjugate (quaternion2 );
388363 entityRenderDispatcher .overrideCameraOrientation (quaternion2 );
389364 entityRenderDispatcher .setRenderShadow (false );
390365 MultiBufferSource .BufferSource bufferSource = Minecraft .getInstance ().renderBuffers ().bufferSource ();
0 commit comments