diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-03-18 00:35:36 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-03-18 00:35:36 +0800 |
| commit | 550fe32e612801daa99493aa0bade083f3330133 (patch) | |
| tree | 7825027dd8933d542a831e2bda6626c63f4cd8db /src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java | |
| parent | 9e990de7685960391d78ca2cca0ff68bebe1a8cd (diff) | |
| download | RoughlyEnoughItems-550fe32e612801daa99493aa0bade083f3330133.tar.gz RoughlyEnoughItems-550fe32e612801daa99493aa0bade083f3330133.tar.bz2 RoughlyEnoughItems-550fe32e612801daa99493aa0bade083f3330133.zip | |
4.0.14: Better widgets system
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java b/src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java index 8ea7759e9..fab8f95b9 100644 --- a/src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java +++ b/src/main/java/me/shedaniel/rei/api/widgets/BurningFire.java @@ -24,12 +24,19 @@ package me.shedaniel.rei.api.widgets; import me.shedaniel.rei.gui.widget.WidgetWithBounds; +import org.jetbrains.annotations.NotNull; public abstract class BurningFire extends WidgetWithBounds { + /** + * @return the x coordinate for the top left corner of this widget. + */ public final int getX() { return getBounds().getX(); } + /** + * @return the y coordinate for the top left corner of this widget. + */ public final int getY() { return getBounds().getY(); } @@ -42,16 +49,17 @@ public abstract class BurningFire extends WidgetWithBounds { /** * Sets the animation duration in milliseconds. * - * @param animationDurationMS animation duration in milliseconds, animation is disabled when below or equals to 0 + * @param animationDurationMS animation duration in milliseconds, animation is disabled when below or equals to 0. */ public abstract void setAnimationDuration(double animationDurationMS); /** * Sets the animation duration in milliseconds. * - * @param animationDurationMS animation duration in milliseconds, animation is disabled when below or equals to 0 - * @return the arrow itself + * @param animationDurationMS animation duration in milliseconds, animation is disabled when below or equals to 0. + * @return the arrow itself. */ + @NotNull public final BurningFire animationDurationMS(double animationDurationMS) { setAnimationDuration(animationDurationMS); return this; @@ -60,9 +68,10 @@ public abstract class BurningFire extends WidgetWithBounds { /** * Sets the animation duration in ticks. * - * @param animationDurationTicks animation duration in ticks, animation is disabled when below or equals to 0 - * @return the arrow itself + * @param animationDurationTicks animation duration in ticks, animation is disabled when below or equals to 0. + * @return the arrow itself. */ + @NotNull public final BurningFire animationDurationTicks(double animationDurationTicks) { return animationDurationMS(animationDurationTicks * 50); } @@ -70,8 +79,9 @@ public abstract class BurningFire extends WidgetWithBounds { /** * Disables the animation. * - * @return the arrow itself + * @return the arrow itself. */ + @NotNull public final BurningFire disableAnimation() { return animationDurationMS(-1); } |
