mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-16 08:24:50 +00:00
Deprecate the StableAPI annotations, switch to JB annotations
This commit is contained in:
96 files changed
+1079
-762
No files matched your search
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
package com.falsepattern.lib.compat;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import lombok.NonNull;
|
||||
import lombok.val;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -39,9 +38,10 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* A functional equivalent to GuiLabel present in Minecraft 1.12.
|
||||
*
|
||||
* @since 0.8.0
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.8.0")
|
||||
public class GuiLabel extends Gui {
|
||||
private final List<String> lines = new ArrayList<>();
|
||||
private final FontRenderer fontRenderer;
|
||||
@@ -49,32 +49,26 @@ public class GuiLabel extends Gui {
|
||||
/**
|
||||
* The id of the label.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int id;
|
||||
/**
|
||||
* The x position of the label.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int x;
|
||||
/**
|
||||
* The y position of the label.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public int y;
|
||||
/**
|
||||
* The visibility of the label.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public boolean visible = true;
|
||||
/**
|
||||
* The label width.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
protected int width;
|
||||
/**
|
||||
* The label height.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
protected int height;
|
||||
private boolean centered = false;
|
||||
|
||||
@@ -89,7 +83,6 @@ public class GuiLabel extends Gui {
|
||||
* @param height the height
|
||||
* @param textColour the text colour
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public GuiLabel(@NonNull FontRenderer fontRenderer, int id, int x, int y, int width, int height, int textColour) {
|
||||
this.fontRenderer = fontRenderer;
|
||||
this.id = id;
|
||||
@@ -105,7 +98,6 @@ public class GuiLabel extends Gui {
|
||||
*
|
||||
* @param text string to add
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public void addLine(@NonNull String text) {
|
||||
lines.add(I18n.format(text));
|
||||
}
|
||||
@@ -115,7 +107,6 @@ public class GuiLabel extends Gui {
|
||||
*
|
||||
* @return the GuiLabel itself
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public GuiLabel setCentered() {
|
||||
centered = true;
|
||||
return this;
|
||||
@@ -129,7 +120,6 @@ public class GuiLabel extends Gui {
|
||||
* @param mouseX the mouse x
|
||||
* @param mouseY the mouse y
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public void drawLabel(@NonNull Minecraft minecraft, int mouseX, int mouseY) {
|
||||
if (!visible) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user