From 5865e9c41a0140b9f1acdd2fb095353c467fbb45 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Fri, 11 Dec 2020 21:41:29 +0000 Subject: [PATCH] Not sure what irritates me more The fact that I didn't run checkstyle before pushing or checkstyle itself. I wish this ran fast enough I could put it as a commit hook. --- .../shared/peripheral/generic/methods/EnergyMethods.java | 2 ++ .../peripheral/generic/methods/InventoryMethods.java | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/EnergyMethods.java b/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/EnergyMethods.java index 5df9a7993..5eab3f94f 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/EnergyMethods.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/EnergyMethods.java @@ -40,6 +40,7 @@ public ResourceLocation id() /** * Get the energy of this block. * + * @param energy The current energy storage. * @return The energy stored in this block, in FE. */ @LuaFunction( mainThread = true ) @@ -51,6 +52,7 @@ public static int getEnergy( IEnergyStorage energy ) /** * Get the maximum amount of energy this block can store. * + * @param energy The current energy storage. * @return The energy capacity of this block. */ @LuaFunction( mainThread = true ) diff --git a/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java b/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java index 4c4864386..b8585f425 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java @@ -50,6 +50,7 @@ public ResourceLocation id() /** * Get the size of this inventory. * + * @param inventory The current inventory. * @return The number of slots in this inventory. */ @LuaFunction( mainThread = true ) @@ -68,6 +69,7 @@ public static int size( IItemHandler inventory ) * The table is sparse, and so empty slots will be `nil` - it is recommended to loop over using `pairs` rather than * `ipairs`. * + * @param inventory The current inventory. * @return All items in this inventory. * @cc.treturn { (table|nil)... } All items in this inventory. */ @@ -88,6 +90,7 @@ public static int size( IItemHandler inventory ) /** * Get detailed information about an item. * + * @param inventory The current inventory. * @param slot The slot to get information about. * @return Information about the item in this slot, or {@code nil} if not present. * @throws LuaException If the slot is out of range. @@ -109,6 +112,8 @@ public static int size( IItemHandler inventory ) * This allows you to push an item in an inventory to another inventory on the same wired network. Both * inventories must attached to wired modems which are connected via a cable. * + * @param from Inventory to move items from. + * @param computer The current computer. * @param toName The name of the peripheral/inventory to push to. This is the string given to @{peripheral.wrap}, * and displayed by the wired modem. * @param fromSlot The slot in the current inventory to move items to. @@ -155,6 +160,8 @@ public static int pushItems( * This allows you to transfer items between inventories on the same wired network. Both this and the source * inventory must attached to wired modems which are connected via a cable. * + * @param to Inventory to move items to. + * @param computer The current computer. * @param fromName The name of the peripheral/inventory to pull from. This is the string given to @{peripheral.wrap}, * and displayed by the wired modem. * @param fromSlot The slot in the source inventory to move items from.