aether-legacy/src/main/java/com/gildedgames/the_aether/client/gui/button/GuiCapeButton.java

26 lines
913 B
Java
Raw Normal View History

2020-08-14 08:29:22 +02:00
package com.gildedgames.the_aether.client.gui.button;
2020-07-17 07:52:49 +02:00
2020-08-14 08:29:22 +02:00
import com.gildedgames.the_aether.player.PlayerAether;
2020-07-17 07:52:49 +02:00
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.resources.I18n;
2023-03-13 19:53:26 +01:00
public class GuiCapeButton extends GuiButton {
public GuiCapeButton(int xPos, int yPos) {
2020-07-17 07:52:49 +02:00
super(203, xPos, yPos, 150, 20, I18n.format("gui.button.aether_cape"));
}
2023-03-13 19:53:26 +01:00
public void drawButton(Minecraft mc, int mouseX, int mouseY) {
2020-07-17 07:52:49 +02:00
PlayerAether player = PlayerAether.get(mc.thePlayer);
2023-03-13 19:53:26 +01:00
if (player.shouldRenderCape) {
this.displayString
= I18n.format("gui.button.aether_cape") + " " + I18n.format("options.on");
} else {
this.displayString = I18n.format("gui.button.aether_cape") + " "
+ I18n.format("options.off");
2020-07-17 07:52:49 +02:00
}
super.drawButton(mc, mouseX, mouseY);
}
}