aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-06-05 18:01:27 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-06-05 18:01:27 +0300
commitffa5a02e44381983ffdbddad0debc4569c1a1994 (patch)
treeb86b0d9f6353e715a203fd8b237a6fb89d63cd29 /src
parentd866f96541b03c80fbc417c5ab5e87d7189bb723 (diff)
downloadLibGui-ffa5a02e44381983ffdbddad0debc4569c1a1994.tar.gz
LibGui-ffa5a02e44381983ffdbddad0debc4569c1a1994.tar.bz2
LibGui-ffa5a02e44381983ffdbddad0debc4569c1a1994.zip
CottonInventoryController -> SyncedGuiDescription
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java (renamed from src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java)10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java10
4 files changed, 12 insertions, 12 deletions
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 815b179..0c31912 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/GuiDescription.java
@@ -16,7 +16,7 @@ import net.minecraft.screen.PropertyDelegate;
* They also manage the focused widget.
*
* @see io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
- * @see CottonInventoryController
+ * @see SyncedGuiDescription
*/
public interface GuiDescription {
public WPanel getRootPanel();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.java b/src/main/java/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.java
index af61892..6aa46bd 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.java
@@ -6,7 +6,7 @@ import net.minecraft.screen.PropertyDelegate;
* This interface can be implemented on block entity classes
* for providing a property delegate.
*
- * @see CottonInventoryController#getBlockPropertyDelegate(net.minecraft.screen.ScreenHandlerContext)
+ * @see SyncedGuiDescription#getBlockPropertyDelegate(net.minecraft.screen.ScreenHandlerContext)
*/
public interface PropertyDelegateHolder {
/**
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java
index 219f576..5f2bef0 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/CottonInventoryController.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java
@@ -25,7 +25,7 @@ import net.minecraft.world.World;
/**
* A screen handler-based GUI description for GUIs with slots.
*/
-public class CottonInventoryController extends ScreenHandler implements GuiDescription {
+public class SyncedGuiDescription extends ScreenHandler implements GuiDescription {
protected Inventory blockInventory;
protected PlayerInventory playerInventory;
@@ -38,7 +38,7 @@ public class CottonInventoryController extends ScreenHandler implements GuiDescr
protected WWidget focus;
- public CottonInventoryController(int syncId, PlayerInventory playerInventory) {
+ public SyncedGuiDescription(int syncId, PlayerInventory playerInventory) {
super(null, syncId);
this.blockInventory = null;
this.playerInventory = playerInventory;
@@ -46,7 +46,7 @@ public class CottonInventoryController extends ScreenHandler implements GuiDescr
this.propertyDelegate = null;//new ArrayPropertyDelegate(1);
}
- public CottonInventoryController(int syncId, PlayerInventory playerInventory, Inventory blockInventory, PropertyDelegate propertyDelegate) {
+ public SyncedGuiDescription(int syncId, PlayerInventory playerInventory, Inventory blockInventory, PropertyDelegate propertyDelegate) {
super(null, syncId);
this.blockInventory = blockInventory;
this.playerInventory = playerInventory;
@@ -63,12 +63,12 @@ public class CottonInventoryController extends ScreenHandler implements GuiDescr
return LibGuiClient.config.darkMode ? darkTitleColor : titleColor;
}
- public CottonInventoryController setRootPanel(WPanel panel) {
+ public SyncedGuiDescription setRootPanel(WPanel panel) {
this.rootPanel = panel;
return this;
}
- public CottonInventoryController setTitleColor(int color) {
+ public SyncedGuiDescription setTitleColor(int color) {
this.titleColor = color;
return this;
}
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 5744aba..10ff4f6 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,5 +1,6 @@
package io.github.cottonmc.cotton.gui.client;
+import io.github.cottonmc.cotton.gui.SyncedGuiDescription;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.client.render.DiffuseLighting;
@@ -10,17 +11,16 @@ import net.minecraft.text.Style;
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;
/**
- * A screen for a {@link CottonInventoryController}.
+ * A screen for a {@link SyncedGuiDescription}.
*
- * @param <T> the controller type
+ * @param <T> the description type
*/
-public class CottonInventoryScreen<T extends CottonInventoryController> extends HandledScreen<T> implements TextHoverRendererScreen {
- protected CottonInventoryController description;
+public class CottonInventoryScreen<T extends SyncedGuiDescription> extends HandledScreen<T> implements TextHoverRendererScreen {
+ protected SyncedGuiDescription description;
protected WWidget lastResponder = null;
/**