diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java index f7b5688..b51e9ee 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java @@ -61,6 +61,13 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio protected WWidget focus; private Vec2i titlePos = new Vec2i(8, 6); + /** + * Constructs a new synced GUI description without a block inventory or a property delegate. + * + * @param type the {@link ScreenHandlerType} of this GUI description + * @param syncId the current sync ID + * @param playerInventory the player inventory of the player viewing this screen + */ public SyncedGuiDescription(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory) { super(type, syncId); this.blockInventory = null; @@ -68,8 +75,17 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio this.world = playerInventory.player.world; this.propertyDelegate = null;//new ArrayPropertyDelegate(1); } - - public SyncedGuiDescription(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, Inventory blockInventory, PropertyDelegate propertyDelegate) { + + /** + * Constructs a new synced GUI description. + * + * @param type the {@link ScreenHandlerType} of this GUI description + * @param syncId the current sync ID + * @param playerInventory the player inventory of the player viewing this screen + * @param blockInventory the block inventory of a corresponding container block, or null if not found or applicable + * @param propertyDelegate a property delegate whose properties, if any, will automatically be {@linkplain #addProperties(PropertyDelegate) added} + */ + public SyncedGuiDescription(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, @Nullable Inventory blockInventory, @Nullable PropertyDelegate propertyDelegate) { super(type, syncId); this.blockInventory = blockInventory; this.playerInventory = playerInventory; |