diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2021-07-11 13:25:07 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2021-07-11 13:25:07 +0300 |
commit | 5a8a3011e4830dfadb080d2c821f12dc517b9152 (patch) | |
tree | 9bd204b0c42bf0757e051daae4a98b4fb5422ed6 | |
parent | 84a07a241ddc03be92680a077c9308695b66a179 (diff) | |
download | LibGui-5a8a3011e4830dfadb080d2c821f12dc517b9152.tar.gz LibGui-5a8a3011e4830dfadb080d2c821f12dc517b9152.tar.bz2 LibGui-5a8a3011e4830dfadb080d2c821f12dc517b9152.zip |
Document SyncedGuiDescription constructors
-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; |