mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-17 09:55:02 +00:00
code cleanup
This commit is contained in:
76 files changed
+691
-622
No files matched your search
@@ -51,9 +51,9 @@ public class SimpleToast implements IToast {
|
||||
private float currentProgress;
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
public SimpleToast(@NonNull ToastBG background, @Nullable ToastIcon icon,
|
||||
IChatComponent titleComponent, @Nullable IChatComponent subtitleComponent,
|
||||
boolean drawProgressBar, long timeout) {
|
||||
public SimpleToast(@NonNull ToastBG background,
|
||||
@Nullable ToastIcon icon, IChatComponent titleComponent,
|
||||
@Nullable IChatComponent subtitleComponent, boolean drawProgressBar, long timeout) {
|
||||
this.background = background;
|
||||
this.icon = icon;
|
||||
this.title = titleComponent.getFormattedText();
|
||||
@@ -83,7 +83,8 @@ public class SimpleToast implements IToast {
|
||||
if (hasProgressBar) {
|
||||
val bgWidth = background.getIcon().getIconWidth();
|
||||
Gui.drawRect(3, bgHeight - 4, bgWidth - 3, bgHeight - 3, 0xFFFFFFFF);
|
||||
float f = (float) MathUtil.clampedLerp(displayedProgress, currentProgress, (float) (delta - lastDelta) / 100.0F);
|
||||
float f = (float) MathUtil.clampedLerp(displayedProgress, currentProgress,
|
||||
(float) (delta - lastDelta) / 100.0F);
|
||||
int i;
|
||||
|
||||
if (currentProgress >= displayedProgress) {
|
||||
|
||||
@@ -36,17 +36,24 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@StableAPI(since = "0.10.0")
|
||||
public class ToastBG extends ToastTexture {
|
||||
@StableAPI(since = "0.10.0")
|
||||
public static final ToastBG TOAST_DARK = new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_dark.png"), 160, 32, 0xFFFFFFFF);
|
||||
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")
|
||||
public static final ToastBG TOAST_DARK_ROUNDED = new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_dark_rounded.png"), 160, 32, 0xFFFFFFFF);
|
||||
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")
|
||||
public static final ToastBG TOAST_NARRATOR = new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_narrator.png"), 160, 32, 0xFFAAAA00);
|
||||
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")
|
||||
public static final ToastBG TOAST_NARRATOR_ROUNDED = new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_narrator_rounded.png"), 160, 32, 0xFFAAAA00);
|
||||
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")
|
||||
public static final ToastBG TOAST_WHITE = new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_white.png"), 160, 32, 0xFF500050);
|
||||
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")
|
||||
public static final ToastBG TOAST_WHITE_ROUNDED = new ToastBG(new ResourceLocation(Tags.MODID, "textures/gui/toast_white_rounded.png"), 160, 32, 0xFF500050);
|
||||
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")
|
||||
public final int defaultTextColor;
|
||||
|
||||
@@ -34,9 +34,9 @@ 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(since = "0.10.0")})
|
||||
protected final IIcon icon;
|
||||
@Getter(onMethod_={@StableAPI(since = "0.10.0")})
|
||||
@Getter(onMethod_ = {@StableAPI(since = "0.10.0")})
|
||||
protected final ResourceLocation texture;
|
||||
|
||||
@StableAPI(since = "0.10.0")
|
||||
|
||||
Reference in new issue
Block a user