aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/skyblock/end/EndHudConfigScreen.java
blob: 4540ce6e11e65b58a3ad76b8cdf314adfe10d3e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package de.hysky.skyblocker.skyblock.end;

import de.hysky.skyblocker.config.HudConfigScreen;
import de.hysky.skyblocker.config.SkyblockerConfig;
import de.hysky.skyblocker.skyblock.tabhud.widget.Widget;
import it.unimi.dsi.fastutil.ints.IntIntMutablePair;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.Text;

import java.util.List;

public class EndHudConfigScreen extends HudConfigScreen {
    public EndHudConfigScreen(Screen parent) {
        super(Text.literal("End HUD Config"), parent, EndHudWidget.INSTANCE);
    }

    @SuppressWarnings("SuspiciousNameCombination")
    @Override
    protected List<IntIntMutablePair> getConfigPos(SkyblockerConfig config) {
        return List.of(IntIntMutablePair.of(config.otherLocations.end.x, config.otherLocations.end.y));
    }

    @Override
    protected void savePos(SkyblockerConfig configManager, List<Widget> widgets) {
        configManager.otherLocations.end.x = widgets.getFirst().getX();
        configManager.otherLocations.end.y = widgets.getFirst().getY();
    }
}