Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beacon Highlighter performance fix + Fix fire sales widget #521

Merged
Merged
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
Expand Up @@ -12,6 +12,7 @@

public class BeaconHighlighter {
public static final List<BlockPos> beaconPositions = new ArrayList<>();
private static final float[] RED_COLOR_COMPONENTS = { 1.0f, 0.0f, 0.0f };

/**
* Initializes the beacon highlighting system.
Expand All @@ -28,13 +29,10 @@ public static void init() {
* @param context An instance of WorldRenderContext for the RenderHelper to use
*/
public static void render(WorldRenderContext context) {
if (Utils.isInTheEnd() && SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons)
beaconPositions.forEach((position) -> RenderHelper.renderFilled(
context,
position,
new float[]{1.0f, 0.0f, 0.0f},
0.5f,
false
));
if (Utils.isInTheEnd() && SkyblockerConfigManager.get().slayer.endermanSlayer.highlightBeacons) {
for (BlockPos pos : beaconPositions) {
RenderHelper.renderFilled(context, pos, RED_COLOR_COMPONENTS, 0.5f, false);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public void updateContent() {
return;
}

if (event.getString().contains("starting in")) {
String text = event.getString();

//We're keeping both cases as it might have something to do with having multiple fire sales at once vs having only one
if (text.contains("starting in") || text.contains("Starts in")) {
this.addComponent(new IcoTextComponent(Ico.CLOCK, event));
return;
}
Expand Down
Loading