Skip to content

Commit 177d2a8

Browse files
committed
chore: apply wide-cat patch
1 parent 3f5c946 commit 177d2a8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • src/main/java/meteordevelopment/meteorclient/systems/waypoints

src/main/java/meteordevelopment/meteorclient/systems/waypoints/Waypoint.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public class Waypoint implements ISerializable<Waypoint> {
106106
.description("Hides the waypoint if the player is closer than this distance, and hide when near is enabled.")
107107
.defaultValue(8)
108108
.sliderRange(0, 32)
109+
.visible(hideWhenNear::get)
109110
.build()
110111
);
111112

@@ -118,8 +119,7 @@ private Waypoint() {
118119
public Waypoint(NbtElement tag) {
119120
NbtCompound nbt = (NbtCompound) tag;
120121

121-
if (nbt.contains("uuid")) uuid = nbt.get("uuid", Uuids.INT_STREAM_CODEC).get();
122-
else uuid = UUID.randomUUID();
122+
uuid = nbt.get("uuid", Uuids.INT_STREAM_CODEC).orElse(UUID.randomUUID());
123123

124124
fromTag(nbt);
125125
}
@@ -129,7 +129,7 @@ public void renderIcon(double x, double y, double a, double size) {
129129
if (texture == null) return;
130130

131131
int preA = color.get().a;
132-
color.get().a *= a;
132+
color.get().a *= (int) a;
133133

134134
Renderer2D.TEXTURE.begin();
135135
Renderer2D.TEXTURE.texQuad(x, y, size, size, color.get());
@@ -153,8 +153,8 @@ public BlockPos getPos() {
153153
}
154154

155155
public void hideWhenNearCheck(int distance) {
156-
if (!hideWhenNear.get()) { return; }
157-
if (distance > hideWhenNearDistance.get()) { return; }
156+
if (!hideWhenNear.get()) return;
157+
if (distance > hideWhenNearDistance.get()) return;
158158

159159
visible.set(false);
160160
}

0 commit comments

Comments
 (0)