Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* This file is part of Apollo, licensed under the MIT License.
*
* Copyright (c) 2026 Moonsworth
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.lunarclient.apollo.common.icon;

import java.util.Collections;
import java.util.List;
import lombok.Builder;
import lombok.Getter;

/**
* Represents the custom model data attached to an {@link ItemStackIcon}.
*
* <p>Mirrors the Minecraft 1.21.4 {@code CustomModelData} item component, which
* replaced the single integer value with four parallel lists.</p>
*
* @since 1.2.7
*/
@Getter
@Builder
public final class CustomModelData {

/**
* Returns the custom model data {@link Float} values.
*
* @return the custom model data floats
* @since 1.2.7
*/
@Builder.Default
List<Float> floats = Collections.emptyList();

/**
* Returns the custom model data {@link Boolean} flags.
*
* @return the custom model data flags
* @since 1.2.7
*/
@Builder.Default
List<Boolean> flags = Collections.emptyList();

/**
* Returns the custom model data {@link String} values.
*
* @return the custom model data strings
* @since 1.2.7
*/
@Builder.Default
List<String> strings = Collections.emptyList();

/**
* Returns the custom model data color {@link Integer} values.
*
* @return the custom model data colors
* @since 1.2.7
*/
@Builder.Default
List<Integer> colors = Collections.emptyList();

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,20 @@ public final class ItemStackIcon extends Icon {
* Returns the icon {@link Integer} custom model data.
*
* @return the icon custom model data
* @deprecated for removal since 1.2.7, use {@link ItemStackIcon#customModelDataObject} instead.
* @since 1.0.7
*/
@Deprecated
int customModelData;

/**
* Returns the icon {@link CustomModelData} object.
*
* @return the icon custom model data object
* @since 1.2.7
*/
@Nullable CustomModelData customModelDataObject;

/**
* Returns the icon {@link Profile}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

import com.lunarclient.apollo.module.ApolloModule;
import com.lunarclient.apollo.module.ModuleDefinition;
import com.lunarclient.apollo.option.Option;
import com.lunarclient.apollo.option.SimpleOption;
import com.lunarclient.apollo.recipients.Recipients;
import io.leangen.geantyref.TypeToken;
import java.awt.Color;
import java.util.UUID;
import org.jetbrains.annotations.ApiStatus;
Expand All @@ -39,6 +42,22 @@
@ModuleDefinition(id = "colored_fire", name = "Colored Fire")
public abstract class ColoredFireModule extends ApolloModule {

/**
* Whether fire colors should persist when a player unloads from the tracker.
*
* @since 1.2.7
*/
public static final SimpleOption<Boolean> PERSIST_COLORS_ON_UNLOAD = Option.<Boolean>builder()
.comment("Set to 'true' to keep fire colors when players unload from the tracker, otherwise 'false'.")
.node("persist-colors-on-unload").type(TypeToken.get(Boolean.class))
.defaultValue(false).notifyClient().build();

ColoredFireModule() {
this.registerOptions(
ColoredFireModule.PERSIST_COLORS_ON_UNLOAD
);
}

@Override
public boolean isClientNotify() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.awt.Color;
import lombok.Builder;
import lombok.Getter;
import org.jetbrains.annotations.Nullable;

/**
* Represents a waypoint which can be shown on the client.
Expand Down Expand Up @@ -82,4 +83,45 @@ public final class Waypoint {
*/
boolean hidden;

/**
* Whether the beacon beam for this waypoint is drawn.
*
* @since 1.2.7
*/
@Builder.Default
boolean showBeam = true;

/**
* Whether the in-world block outline highlight at the waypoint location is drawn.
*
* @since 1.2.7
*/
@Builder.Default
boolean highlightBlock = true;

/**
* Line width of the block highlight outline when {@link #highlightBlock} is enabled.
*
* <p>Accepts {@code 1.5F} to {@code 7.5F}. Leaving the
* field at its default of {@code 0.0F} is treated as a
* fallback to the player's own configured line width.</p>
*
* @since 1.2.7
*/
@Builder.Default
float highlightBlockLineWidth = 0.0F;

/**
* Label and HUD text overrides applied to this waypoint.
*
* <p>Set to a built {@link WaypointTextStyle} to drive the
* client's text rendering from the server; leave {@code null} to
* defer to the Lunar waypoint mod's own settings.</p>
*
* @return the text style, or {@code null} when no override is sent
* @since 1.2.7
*/
@Builder.Default
@Nullable WaypointTextStyle textStyle = null;

}
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,22 @@ public boolean isClientNotify() {
*/
public abstract void resetWaypoints(Recipients recipients);

/**
* Shows a {@link Waypoint} for the {@link Recipients} that was previously hidden.
*
* @param recipients the recipients that are receiving the packet
* @param waypointName the waypoint name
* @since 1.2.7
*/
public abstract void showWaypoint(Recipients recipients, String waypointName);

/**
* Hides a {@link Waypoint} for the {@link Recipients} without removing it.
*
* @param recipients the recipients that are receiving the packet
* @param waypointName the waypoint name
* @since 1.2.7
*/
public abstract void hideWaypoint(Recipients recipients, String waypointName);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
* This file is part of Apollo, licensed under the MIT License.
*
* Copyright (c) 2026 Moonsworth
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.lunarclient.apollo.module.waypoint;

import lombok.Builder;
import lombok.Getter;

/**
* Overrides for a waypoint's on-screen label, icons and distance HUD on the Lunar client.
*
* @since 1.2.7
*/
@Getter
@Builder
public final class WaypointTextStyle {

/**
* Whether the waypoint label (text and box) is drawn at all.
*
* @since 1.2.7
*/
@Builder.Default
boolean showText = true;

/**
* Restricts the waypoint label drawing to when the player is looking roughly toward the waypoint.
*
* @since 1.2.7
*/
@Builder.Default
boolean onlyShowTextWhenLookingNear = false;

/**
* Whether the waypoint icons are drawn.
*
* @since 1.2.7
*/
@Builder.Default
boolean showIcons = false;

/**
* The waypoint scale applied to the label icon.
*
* <p>Accepts {@code 0.1F} to {@code 3.0F}</p>
*
* @since 1.2.7
*/
@Builder.Default
float textIconScale = 1.5F;

/**
* The waypoint scale applied to the main label text.
*
* <p>Accepts {@code 0.1F} to {@code 2.0F}</p>
*
* @since 1.2.7
*/
@Builder.Default
float labelScale = 1.0F;

/**
* The waypoint padding of the label background box.
*
* <p>Accepts {@code 1.0F} to {@code 8.0F}</p>
*
* @since 1.2.7
*/
@Builder.Default
float boxPadding = 4.0F;

/**
* Whether a border is drawn around the label background box.
*
* @since 1.2.7
*/
@Builder.Default
boolean boxBorders = true;

/**
* Whether a shadow is drawn behind the label text.
*
* @since 1.2.7
*/
@Builder.Default
boolean textShadow = false;

/**
* Whether the distance from the player to the waypoint is shown next to the label.
*
* @since 1.2.7
*/
@Builder.Default
boolean showDistance = true;

}
Loading
Loading