mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-21 06:52:16 +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.toasts.icon;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import com.falsepattern.lib.internal.Tags;
|
||||
import lombok.NonNull;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -34,40 +33,30 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public class ToastBG extends ToastTexture {
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_DARK =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_dark.png"), 160, 32, 0xFFFFFFFF);
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_DARK_ROUNDED =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_dark_rounded.png"), 160, 32, 0xFFFFFFFF);
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_NARRATOR =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_narrator.png"), 160, 32, 0xFFAAAA00);
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_NARRATOR_ROUNDED =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_narrator_rounded.png"),
|
||||
160,
|
||||
32,
|
||||
0xFFAAAA00);
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_WHITE =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_white.png"), 160, 32, 0xFF500050);
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_WHITE_ROUNDED =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_white_rounded.png"), 160, 32, 0xFF500050);
|
||||
|
||||
@StableAPI.Expose
|
||||
public final int defaultTextColor;
|
||||
|
||||
@StableAPI.Expose
|
||||
public ToastBG(@NonNull ResourceLocation texture, int width, int height, int defaultTextColor) {
|
||||
super(texture, width, height);
|
||||
this.defaultTextColor = defaultTextColor;
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public ToastBG(@NonNull ResourceLocation texture, @NonNull IIcon icon, int defaultTextColor) {
|
||||
super(texture, icon);
|
||||
this.defaultTextColor = defaultTextColor;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
package com.falsepattern.lib.toasts.icon;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import lombok.NonNull;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -33,14 +32,11 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public class ToastIcon extends ToastTexture {
|
||||
@StableAPI.Expose
|
||||
public ToastIcon(@NonNull ResourceLocation texture, int width, int height) {
|
||||
super(texture, width, height);
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public ToastIcon(@NonNull ResourceLocation texture, @NonNull IIcon icon) {
|
||||
super(texture, icon);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
package com.falsepattern.lib.toasts.icon;
|
||||
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import com.falsepattern.lib.util.RenderUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
@@ -33,19 +32,16 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public abstract class ToastTexture {
|
||||
@Getter(onMethod_ = @StableAPI.Expose)
|
||||
@Getter
|
||||
protected final IIcon icon;
|
||||
@Getter(onMethod_ = @StableAPI.Expose)
|
||||
@Getter
|
||||
protected final ResourceLocation texture;
|
||||
|
||||
@StableAPI.Expose
|
||||
public ToastTexture(@NonNull ResourceLocation texture, int width, int height) {
|
||||
this(texture, RenderUtil.getFullTextureIcon(texture.toString(), width, height));
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public ToastTexture(@NonNull ResourceLocation texture, @NonNull IIcon icon) {
|
||||
this.icon = icon;
|
||||
this.texture = texture;
|
||||
@@ -54,6 +50,5 @@ public abstract class ToastTexture {
|
||||
/**
|
||||
* Draws the icon at the specified position in the specified Gui
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public abstract void draw(Gui guiIn, int x, int y);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This file is part of FalsePatternLib.
|
||||
*
|
||||
* Copyright (C) 2022-2025 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* FalsePatternLib is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* FalsePatternLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @since 0.10.0
|
||||
*/
|
||||
package com.falsepattern.lib.toasts.icon;
|
||||
Reference in new issue
Block a user