aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-08 22:53:48 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-08 22:53:48 +0300
commitf351859b68cf1cbe7191fd039f371e66207c4159 (patch)
treea7de686b797a2ae60aae7aa9642a7b80c837f1ca /src/main
parent6afe7543ae5c99981a7f6cd180a92d63832637ae (diff)
downloadLibGui-f351859b68cf1cbe7191fd039f371e66207c4159.tar.gz
LibGui-f351859b68cf1cbe7191fd039f371e66207c4159.tar.bz2
LibGui-f351859b68cf1cbe7191fd039f371e66207c4159.zip
Optimize imports
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java23
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonHud.java8
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java1
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.java5
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/NinePatch.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java11
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java5
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java11
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WBar.java8
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java5
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WClippedPanel.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java12
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WListPanel.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WSprite.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java22
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java5
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java9
33 files changed, 139 insertions, 108 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java b/src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java
index 2721ff3..3a93706 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java
@@ -1,12 +1,5 @@
package io.github.cottonmc.cotton.gui;
-import java.util.ArrayList;
-
-import javax.annotation.Nullable;
-
-import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
-import io.github.cottonmc.cotton.gui.widget.*;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.Block;
@@ -17,11 +10,25 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
-import net.minecraft.screen.*;
+import net.minecraft.screen.ArrayPropertyDelegate;
+import net.minecraft.screen.PropertyDelegate;
+import net.minecraft.screen.ScreenHandler;
+import net.minecraft.screen.ScreenHandlerContext;
import net.minecraft.screen.slot.Slot;
import net.minecraft.screen.slot.SlotActionType;
import net.minecraft.world.World;
+import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+import io.github.cottonmc.cotton.gui.widget.WGridPanel;
+import io.github.cottonmc.cotton.gui.widget.WLabel;
+import io.github.cottonmc.cotton.gui.widget.WPanel;
+import io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel;
+import io.github.cottonmc.cotton.gui.widget.WWidget;
+
+import javax.annotation.Nullable;
+import java.util.ArrayList;
+
public class CottonInventoryController extends ScreenHandler implements GuiDescription {
protected Inventory blockInventory;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java
index 3239179..febaaa7 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java
@@ -1,13 +1,14 @@
package io.github.cottonmc.cotton.gui;
-import javax.annotation.Nullable;
-
-import io.github.cottonmc.cotton.gui.widget.WPanel;
-import io.github.cottonmc.cotton.gui.widget.WWidget;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.screen.PropertyDelegate;
+import io.github.cottonmc.cotton.gui.widget.WPanel;
+import io.github.cottonmc.cotton.gui.widget.WWidget;
+
+import javax.annotation.Nullable;
+
public interface GuiDescription {
public WPanel getRootPanel();
public int getTitleColor();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java b/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java
index 70d8ba4..b2b4943 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/BackgroundPainter.java
@@ -1,8 +1,9 @@
package io.github.cottonmc.cotton.gui.client;
+import net.minecraft.util.Identifier;
+
import io.github.cottonmc.cotton.gui.widget.WItemSlot;
import io.github.cottonmc.cotton.gui.widget.WWidget;
-import net.minecraft.util.Identifier;
/**
* Background painters are used to paint the background of a widget.
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
index 968cbba..13824ad 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
@@ -1,14 +1,15 @@
package io.github.cottonmc.cotton.gui.client;
-import io.github.cottonmc.cotton.gui.GuiDescription;
-import io.github.cottonmc.cotton.gui.widget.WPanel;
-import io.github.cottonmc.cotton.gui.widget.WWidget;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
+import io.github.cottonmc.cotton.gui.GuiDescription;
+import io.github.cottonmc.cotton.gui.widget.WPanel;
+import io.github.cottonmc.cotton.gui.widget.WWidget;
+
public class CottonClientScreen extends Screen implements TextHoverRendererScreen {
protected GuiDescription description;
protected int left = 0;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonHud.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonHud.java
index ae0f232..9549b99 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonHud.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonHud.java
@@ -1,6 +1,5 @@
package io.github.cottonmc.cotton.gui.client;
-import io.github.cottonmc.cotton.gui.widget.WWidget;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
@@ -8,7 +7,12 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.client.util.Window;
import net.minecraft.client.util.math.MatrixStack;
-import java.util.*;
+import io.github.cottonmc.cotton.gui.widget.WWidget;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
/**
* Manages widgets that are painted on the in-game HUD.
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
index a018173..9cfe88d 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
@@ -1,17 +1,17 @@
package io.github.cottonmc.cotton.gui.client;
-import io.github.cottonmc.cotton.gui.CottonInventoryController;
+import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.client.render.DiffuseLighting;
import net.minecraft.client.util.math.MatrixStack;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.text.LiteralText;
+import net.minecraft.text.Text;
import org.lwjgl.glfw.GLFW;
+import io.github.cottonmc.cotton.gui.CottonInventoryController;
import io.github.cottonmc.cotton.gui.widget.WPanel;
import io.github.cottonmc.cotton.gui.widget.WWidget;
-import net.minecraft.client.MinecraftClient;
-import net.minecraft.entity.player.PlayerEntity;
-import net.minecraft.text.LiteralText;
-import net.minecraft.text.Text;
public class CottonInventoryScreen<T extends CottonInventoryController> extends HandledScreen<T> implements TextHoverRendererScreen {
protected CottonInventoryController description;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java b/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
index 013382f..386f5ad 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
@@ -7,7 +7,6 @@ import io.github.cottonmc.jankson.JanksonFactory;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.fabricmc.loader.api.FabricLoader;
-
import net.minecraft.resource.ResourceType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.java
index 7c9c73c..3eb6578 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.java
@@ -1,6 +1,6 @@
package io.github.cottonmc.cotton.gui.client;
-import javax.annotation.Nullable;
+import net.minecraft.screen.PropertyDelegate;
import io.github.cottonmc.cotton.gui.GuiDescription;
import io.github.cottonmc.cotton.gui.ValidatedSlot;
@@ -8,7 +8,8 @@ import io.github.cottonmc.cotton.gui.widget.WGridPanel;
import io.github.cottonmc.cotton.gui.widget.WLabel;
import io.github.cottonmc.cotton.gui.widget.WPanel;
import io.github.cottonmc.cotton.gui.widget.WWidget;
-import net.minecraft.screen.PropertyDelegate;
+
+import javax.annotation.Nullable;
/**
* A GuiDescription without any associated Minecraft classes
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/NinePatch.java b/src/main/java/io/github/cottonmc/cotton/gui/client/NinePatch.java
index 34a50b1..9828715 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/NinePatch.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/NinePatch.java
@@ -1,6 +1,5 @@
package io.github.cottonmc.cotton.gui.client;
-import io.github.cottonmc.cotton.gui.widget.WWidget;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
@@ -11,9 +10,15 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.profiler.Profiler;
+import io.github.cottonmc.cotton.gui.widget.WWidget;
+
import javax.annotation.Nullable;
import java.io.InputStream;
-import java.util.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
/**
* The nine-patch background painter paints rectangles using a nine-patch texture.
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
index 786f2ee..4d892ce 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
@@ -1,18 +1,17 @@
package io.github.cottonmc.cotton.gui.client;
-import net.minecraft.client.util.math.MatrixStack;
-import net.minecraft.text.Text;
-import org.lwjgl.opengl.GL11;
-
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
-
-import io.github.cottonmc.cotton.gui.widget.data.Alignment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.Tessellator;
import net.minecraft.client.render.VertexFormats;
+import net.minecraft.client.util.math.MatrixStack;
+import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
+import org.lwjgl.opengl.GL11;
+
+import io.github.cottonmc.cotton.gui.widget.data.Alignment;
/**
* {@code ScreenDrawing} contains utility methods for drawing contents on a screen.
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java
index b8abd22..ccc9679 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java
@@ -1,5 +1,9 @@
package io.github.cottonmc.cotton.gui.client.modmenu;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.screen.Screen;
+import net.minecraft.text.TranslatableText;
+
import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.LibGuiClient;
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription;
@@ -7,9 +11,6 @@ import io.github.cottonmc.cotton.gui.widget.WButton;
import io.github.cottonmc.cotton.gui.widget.WGridPanel;
import io.github.cottonmc.cotton.gui.widget.WTextField;
import io.github.cottonmc.cotton.gui.widget.WToggleButton;
-import net.minecraft.client.MinecraftClient;
-import net.minecraft.client.gui.screen.Screen;
-import net.minecraft.text.TranslatableText;
public class ConfigGui extends LightweightGuiDescription {
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java
index 2ab2a47..5cec105 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java
@@ -1,12 +1,13 @@
package io.github.cottonmc.cotton.gui.client.modmenu;
-import io.github.cottonmc.cotton.gui.client.CottonClientScreen;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import net.minecraft.text.TranslatableText;
+import io.github.cottonmc.cotton.gui.client.CottonClientScreen;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+
public class ModMenuSupport implements ModMenuApi {
@Override
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java
index bc55760..74d5357 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java
@@ -1,15 +1,16 @@
package io.github.cottonmc.cotton.gui.client.modmenu;
-import java.util.ArrayList;
-
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import io.github.cottonmc.cotton.gui.widget.WWidget;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+import io.github.cottonmc.cotton.gui.widget.WWidget;
+
+import java.util.ArrayList;
+
public class WKirbSprite extends WWidget {
private static final Identifier KIRB = new Identifier("libgui:textures/widget/kirb.png");
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java b/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
index e7318a7..2376a07 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
@@ -1,9 +1,9 @@
package io.github.cottonmc.cotton.gui.style;
-import java.util.HashMap;
-
import io.github.cottonmc.cotton.gui.widget.data.Color;
+import java.util.HashMap;
+
public class StyleEntry {
private String selector = "*";
private HashMap<String, String> customEntries = new HashMap<>();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WBar.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WBar.java
index 1884243..999effc 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WBar.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WBar.java
@@ -1,9 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import java.util.List;
-
-import io.github.cottonmc.cotton.gui.GuiDescription;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
@@ -13,7 +9,11 @@ import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.Identifier;
+import io.github.cottonmc.cotton.gui.GuiDescription;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+
import javax.annotation.Nullable;
+import java.util.List;
/**
* A bar that displays int values from a {@link PropertyDelegate}.
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java
index fc6eb72..1f9525d 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java
@@ -1,7 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import io.github.cottonmc.cotton.gui.widget.data.Alignment;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
@@ -11,6 +9,9 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.Text;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+import io.github.cottonmc.cotton.gui.widget.data.Alignment;
+
public class WButton extends WWidget {
private Text label;
protected int color = WLabel.DEFAULT_TEXT_COLOR;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WClippedPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WClippedPanel.java
index ad93259..d4cd9f5 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WClippedPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WClippedPanel.java
@@ -1,10 +1,9 @@
package io.github.cottonmc.cotton.gui.widget;
+import net.minecraft.client.MinecraftClient;
import net.minecraft.client.util.math.MatrixStack;
import org.lwjgl.opengl.GL11;
-import net.minecraft.client.MinecraftClient;
-
/**
* A panel that is clipped to only render widgets inside its bounds.
*/
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.java
index 69332d6..9e87174 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.java
@@ -1,9 +1,10 @@
package io.github.cottonmc.cotton.gui.widget;
+import net.minecraft.client.util.math.MatrixStack;
+
import io.github.cottonmc.cotton.gui.client.LibGuiClient;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import io.github.cottonmc.cotton.gui.widget.data.Alignment;
-import net.minecraft.client.util.math.MatrixStack;
import java.util.function.Supplier;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
index c1e07e8..a7f3921 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
@@ -12,7 +12,9 @@ import net.minecraft.item.ItemConvertible;
import net.minecraft.item.ItemStack;
import net.minecraft.tag.Tag;
-import java.util.*;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
/**
* A widget that displays an item or a list of items.
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
index 96814aa..9006457 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
@@ -1,17 +1,17 @@
package io.github.cottonmc.cotton.gui.widget;
-import java.util.List;
-
import com.google.common.collect.Lists;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.minecraft.client.util.math.MatrixStack;
+import net.minecraft.inventory.Inventory;
import io.github.cottonmc.cotton.gui.GuiDescription;
import io.github.cottonmc.cotton.gui.ValidatedSlot;
import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import net.fabricmc.api.EnvType;
-import net.fabricmc.api.Environment;
-import net.minecraft.client.util.math.MatrixStack;
-import net.minecraft.inventory.Inventory;
+
+import java.util.List;
public class WItemSlot extends WWidget {
private final List<ValidatedSlot> peers = Lists.newArrayList();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java
index 3889ac2..c0fc7f6 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java
@@ -1,9 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import io.github.cottonmc.cotton.gui.client.TextHoverRendererScreen;
-import io.github.cottonmc.cotton.gui.widget.data.Alignment;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
@@ -12,6 +8,11 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+import io.github.cottonmc.cotton.gui.client.TextHoverRendererScreen;
+import io.github.cottonmc.cotton.gui.widget.data.Alignment;
+
import javax.annotation.Nullable;
/**
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
index 77e51ce..d853bd7 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
@@ -1,8 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import io.github.cottonmc.cotton.gui.widget.data.Alignment;
-import io.github.cottonmc.cotton.gui.widget.data.Axis;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.widget.AbstractButtonWidget;
@@ -11,6 +8,10 @@ import net.minecraft.client.util.math.Vector3f;
import net.minecraft.text.Text;
import net.minecraft.util.math.Quaternion;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+import io.github.cottonmc.cotton.gui.widget.data.Alignment;
+import io.github.cottonmc.cotton.gui.widget.data.Axis;
+
import javax.annotation.Nullable;
/**
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WListPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WListPanel.java
index 9416f95..786072f 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WListPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WListPanel.java
@@ -1,14 +1,15 @@
package io.github.cottonmc.cotton.gui.widget;
+import net.minecraft.client.util.math.MatrixStack;
+
+import io.github.cottonmc.cotton.gui.widget.data.Axis;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Supplier;
-import io.github.cottonmc.cotton.gui.widget.data.Axis;
-import net.minecraft.client.util.math.MatrixStack;
-
/**
* Similar to the RecyclerView in Android, this widget represents a scrollable list of items.
*
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
index fe32718..5b99ca9 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
@@ -1,15 +1,15 @@
package io.github.cottonmc.cotton.gui.widget;
-import java.util.List;
-
import com.google.common.collect.Lists;
-
-import io.github.cottonmc.cotton.gui.GuiDescription;
-import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
+import io.github.cottonmc.cotton.gui.GuiDescription;
+import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
+
+import java.util.List;
+
/**
* Panels are widgets tthat contain other widgets.
*/
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
index 0fda576..d637cd6 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
@@ -1,8 +1,9 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import net.minecraft.entity.player.PlayerInventory;
+import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
+
public class WPlayerInvPanel extends WPlainPanel {
private WItemSlot inv;
private WItemSlot hotbar;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java
index c538cda..2acfb80 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java
@@ -1,9 +1,10 @@
package io.github.cottonmc.cotton.gui.widget;
+import net.minecraft.client.util.math.MatrixStack;
+
import io.github.cottonmc.cotton.gui.client.LibGuiClient;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import io.github.cottonmc.cotton.gui.widget.data.Axis;
-import net.minecraft.client.util.math.MatrixStack;
public class WScrollBar extends WAbstractSlider {
protected int window = 16;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java
index bd91f06..e02e415 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java
@@ -1,8 +1,9 @@
package io.github.cottonmc.cotton.gui.widget;
+import net.minecraft.client.util.math.MatrixStack;
+
import io.github.cottonmc.cotton.gui.GuiDescription;
import io.github.cottonmc.cotton.gui.widget.data.Axis;
-import net.minecraft.client.util.math.MatrixStack;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java
index f68c5bb..88e532c 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java
@@ -1,14 +1,15 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import io.github.cottonmc.cotton.gui.widget.data.Axis;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;
+import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+import io.github.cottonmc.cotton.gui.widget.data.Axis;
+
import javax.annotation.Nullable;
/**
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSprite.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSprite.java
index 1c78793..a5555fc 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSprite.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSprite.java
@@ -1,11 +1,12 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+
public class WSprite extends WWidget {
protected int currentFrame= 0;
protected long currentFrameTime = 0;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java
index 094817c..6172a8c 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java
@@ -1,9 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import io.github.cottonmc.cotton.gui.client.TextHoverRendererScreen;
-import io.github.cottonmc.cotton.gui.widget.data.Alignment;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
@@ -13,6 +9,11 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Style;
import net.minecraft.text.Text;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+import io.github.cottonmc.cotton.gui.client.TextHoverRendererScreen;
+import io.github.cottonmc.cotton.gui.widget.data.Alignment;
+
import javax.annotation.Nullable;
import java.util.List;
import java.util.Objects;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
index d6eadac..e5d5b13 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
@@ -1,19 +1,7 @@
package io.github.cottonmc.cotton.gui.widget;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-
-import javax.annotation.Nullable;
-
-import net.minecraft.client.util.math.MatrixStack;
-import org.lwjgl.glfw.GLFW;
-import org.lwjgl.opengl.GL11;
-
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
-
-import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
@@ -22,8 +10,18 @@ import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.Tessellator;
import net.minecraft.client.render.VertexFormats;
+import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.minecraft.util.math.MathHelper;
+import org.lwjgl.glfw.GLFW;
+import org.lwjgl.opengl.GL11;
+
+import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+
+import javax.annotation.Nullable;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
public class WTextField extends WWidget {
public static final int OFFSET_X_TEXT = 4;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java
index 87a9265..69fef45 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java
@@ -1,7 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
@@ -11,6 +9,9 @@ import net.minecraft.sound.SoundEvents;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
+import io.github.cottonmc.cotton.gui.client.LibGuiClient;
+import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
+
import javax.annotation.Nullable;
import java.util.function.Consumer;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
index cee18d5..8b4c06c 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
@@ -1,10 +1,5 @@
package io.github.cottonmc.cotton.gui.widget;
-import java.util.ArrayList;
-import java.util.List;
-
-import io.github.cottonmc.cotton.gui.GuiDescription;
-import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
@@ -12,7 +7,11 @@ import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
+import io.github.cottonmc.cotton.gui.GuiDescription;
+
import javax.annotation.Nullable;
+import java.util.ArrayList;
+import java.util.List;
/**
* The base class for all widgets.