mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-17 22:45:00 +00:00
Annotate all the things
This commit is contained in:
63 files changed
+623
-369
No files matched your search
@@ -31,18 +31,18 @@ import javax.annotation.Nullable;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public class GuiToast {
|
||||
@StableAPI(since = "0.10.0")
|
||||
@Nullable
|
||||
@StableAPI.Expose
|
||||
public static <T extends IToast> T getToast(Class<? extends T> toastClass, Object type) {
|
||||
return GuiToastImpl.getInstance().getToast(toastClass, type);
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public static void clear() {
|
||||
GuiToastImpl.getInstance().clear();
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public static void add(IToast toastIn) {
|
||||
GuiToastImpl.getInstance().add(toastIn);
|
||||
}
|
||||
|
||||
@@ -33,25 +33,25 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public interface IToast {
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
Object NO_TOKEN = new Object();
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
Visibility draw(GuiToastImpl toastGui, long delta);
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
int width();
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
int height();
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
default Object getType() {
|
||||
return NO_TOKEN;
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
enum Visibility {
|
||||
SHOW(new ResourceLocation(Tags.MODID, "ui.toast.in")),
|
||||
HIDE(new ResourceLocation(Tags.MODID, "ui.toast.out"));
|
||||
@@ -62,7 +62,7 @@ public interface IToast {
|
||||
this.sound = soundIn;
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public void playSound(SoundHandler handler) {
|
||||
handler.playSound(PositionedSoundRecord.func_147674_a(this.sound, 1.0F));
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class SimpleToast implements IToast {
|
||||
private float displayedProgress;
|
||||
private float currentProgress;
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public SimpleToast(@NonNull ToastBG background,
|
||||
@Nullable ToastIcon icon, IChatComponent titleComponent,
|
||||
@Nullable IChatComponent subtitleComponent, boolean drawProgressBar, long timeout) {
|
||||
|
||||
@@ -35,36 +35,36 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public class ToastBG extends ToastTexture {
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_DARK =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_dark.png"), 160, 32, 0xFFFFFFFF);
|
||||
@StableAPI(since = "0.10.0")
|
||||
@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(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_NARRATOR =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_narrator.png"), 160, 32, 0xFFAAAA00);
|
||||
@StableAPI(since = "0.10.0")
|
||||
@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(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public static final ToastBG TOAST_WHITE =
|
||||
new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_white.png"), 160, 32, 0xFF500050);
|
||||
@StableAPI(since = "0.10.0")
|
||||
@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(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public final int defaultTextColor;
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public ToastBG(@NonNull ResourceLocation texture, int width, int height, int defaultTextColor) {
|
||||
super(texture, width, height);
|
||||
this.defaultTextColor = defaultTextColor;
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public ToastBG(@NonNull ResourceLocation texture, @NonNull IIcon icon, int defaultTextColor) {
|
||||
super(texture, icon);
|
||||
this.defaultTextColor = defaultTextColor;
|
||||
|
||||
@@ -34,12 +34,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public class ToastIcon extends ToastTexture {
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public ToastIcon(@NonNull ResourceLocation texture, int width, int height) {
|
||||
super(texture, width, height);
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public ToastIcon(@NonNull ResourceLocation texture, @NonNull IIcon icon) {
|
||||
super(texture, icon);
|
||||
}
|
||||
|
||||
@@ -34,17 +34,17 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI(since = "0.10.0")
|
||||
public abstract class ToastTexture {
|
||||
@Getter(onMethod_ = {@StableAPI(since = "0.10.0")})
|
||||
@Getter(onMethod_ = @StableAPI.Expose)
|
||||
protected final IIcon icon;
|
||||
@Getter(onMethod_ = {@StableAPI(since = "0.10.0")})
|
||||
@Getter(onMethod_ = @StableAPI.Expose)
|
||||
protected final ResourceLocation texture;
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public ToastTexture(@NonNull ResourceLocation texture, int width, int height) {
|
||||
this(texture, RenderUtil.getFullTextureIcon(texture.toString(), width, height));
|
||||
}
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public ToastTexture(@NonNull ResourceLocation texture, @NonNull IIcon icon) {
|
||||
this.icon = icon;
|
||||
this.texture = texture;
|
||||
@@ -53,6 +53,6 @@ public abstract class ToastTexture {
|
||||
/**
|
||||
* Draws the icon at the specified position in the specified Gui
|
||||
*/
|
||||
@StableAPI(since = "0.10.0")
|
||||
@StableAPI.Expose
|
||||
public abstract void draw(Gui guiIn, int x, int y);
|
||||
}
|
||||
Reference in new issue
Block a user