88import net .minecraft .client .DeltaTracker ;
99import net .minecraft .client .Minecraft ;
1010import net .minecraft .client .gui .GuiGraphicsExtractor ;
11- import net .minecraft .client .gui .contextualbar .LocatorBarRenderer ;
11+ import net .minecraft .client .gui .contextualbar .LocatorBar ;
1212import net .minecraft .client .multiplayer .PlayerInfo ;
1313import net .minecraft .client .renderer .RenderPipelines ;
1414import net .minecraft .client .resources .WaypointStyle ;
3131import org .spongepowered .asm .mixin .injection .Inject ;
3232import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
3333
34- @ Mixin (LocatorBarRenderer .class )
34+ @ Mixin (LocatorBar .class )
3535public abstract class LocatorBarMixin {
3636 @ Shadow @ Final private Minecraft minecraft ;
3737
@@ -74,7 +74,7 @@ private void renderBarReturn(GuiGraphicsExtractor context, DeltaTracker tickCoun
7474 @ Unique
7575 private void renderOverlays (GuiGraphicsExtractor context , int cx , int cy ) {
7676 if (module .showDirections .get ()) {
77- float yaw = Mth .wrapDegrees (minecraft .gameRenderer .getMainCamera ().yRot ());
77+ float yaw = Mth .wrapDegrees (minecraft .gameRenderer .mainCamera ().yRot ());
7878 int centerX = cx + 91 ;
7979 drawDirection (context , "S" , 0 , yaw , centerX , cy );
8080 drawDirection (context , "W" , 90 , yaw , centerX , cy );
@@ -107,11 +107,11 @@ private void renderMeteorWaypoints(GuiGraphicsExtractor context, int centerX, in
107107 if (!module .displayWaypoints .get ()) return ;
108108
109109 //? if >=1.21.11 {
110- Vec3 cameraPos = minecraft .gameRenderer .getMainCamera ().position ();
110+ Vec3 cameraPos = minecraft .gameRenderer .mainCamera ().position ();
111111 //?} else
112112 /*Vec3d cameraPos = client.gameRenderer.getCamera().getPos();
113113 */
114- float playerYaw = Mth .wrapDegrees (minecraft .gameRenderer .getMainCamera ().yRot ());
114+ float playerYaw = Mth .wrapDegrees (minecraft .gameRenderer .mainCamera ().yRot ());
115115 boolean showData = (module .displayWaypointName .get () || module .displayWaypointDistance .get ())
116116 && (!module .displayWaypointOnlyOnTab .get () || minecraft .options .keyPlayerList .isDown ());
117117
@@ -163,7 +163,7 @@ private void renderTrackedPlayerWaypoints(GuiGraphicsExtractor context, DeltaTra
163163 minecraft .player .connection .getWaypointManager ().forEachWaypoint (cameraEntity , waypoint -> {
164164 if (waypoint .id ().left ().map (uuid -> uuid .equals (cameraEntity .getUUID ())).orElse (false )) return ;
165165
166- double angle = waypoint .yawAngleToCamera (level , minecraft .gameRenderer .getMainCamera (), partialTickSupplier );
166+ double angle = waypoint .yawAngleToCamera (level , minecraft .gameRenderer .mainCamera (), partialTickSupplier );
167167 if (angle <= -60.0 || angle > 60.0 ) return ;
168168
169169 int dotPosition = Mth .floor (angle * 173.0 / 2.0 / 60.0 );
@@ -179,7 +179,7 @@ private void renderTrackedPlayerWaypointData(GuiGraphicsExtractor context, Track
179179 if (entry == null ) return ;
180180
181181 double dist = Math .sqrt (waypoint .distanceSquared (minecraft .getCameraEntity ()));
182- WaypointStyle style = minecraft .getWaypointStyles ().get (waypoint .icon ().style );
182+ WaypointStyle style = minecraft .gui . hud . getWaypointStyles ().get (waypoint .icon ().style );
183183 float styleDistance =
184184 Double .isFinite (dist ) ? (float ) Math .min (dist , Float .MAX_VALUE ) : Float .POSITIVE_INFINITY ;
185185 float scale = Mth .lerp (getProgress (styleDistance , style .nearDistance (), style .farDistance ()), 0.5f , 1.0f );
0 commit comments