are equivalent. 🔏

This commit is contained in:
Jess H 2024-05-24 02:50:36 +01:00
parent ffb3e871df
commit c969908a48

View file

@ -9,7 +9,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.util.Arrays;
import java.util.Comparator;
import java.util.stream.Collectors;
@Render
public class HUD extends Feature {
@ -22,7 +21,7 @@ public class HUD extends Feature {
public void text(RenderGameOverlayEvent.Text e) {
mc.fontRenderer.drawStringWithShadow("BaseBand - \"" + BaseBand.buildString + "\"", 2,2, BaseBand.getModule(ClickGUI.class).getTheme().getGreenColor());
int y = 12;
for (Feature f : Arrays.stream(Setup.Features).collect(Collectors.toList()).stream().filter(m -> m.enabled).sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(value.toString()))).toArray(Feature[]::new)) {
for (Feature f : Arrays.stream(Setup.Features).filter(m -> m.enabled).sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(value.toString()))).toArray(Feature[]::new)) {
mc.fontRenderer.drawStringWithShadow(f.toString(), 2, y, BaseBand.getModule(ClickGUI.class).getTheme().getGreenColor());
y = y + mc.fontRenderer.FONT_HEIGHT;
}