Skip to content

Commit 029e353

Browse files
committed
add slot field to inventoryManager.getItemInHand
close IntelligenceModding/Advanced-Peripherals-Features#67
1 parent 4acaa1c commit 029e353

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/InventoryManagerPeripheral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public final int getFreeSlot() throws LuaException {
189189

190190
@LuaFunction(mainThread = true)
191191
public final Map<String, Object> getItemInHand() throws LuaException {
192-
return LuaConverter.stackToObject(getOwnerPlayer().getMainHandItem());
192+
return LuaConverter.stackToObjectWithSlot(getOwnerPlayer().getMainHandItem(), getOwnerPlayer().getInventory().selected);
193193
}
194194

195195
@LuaFunction(mainThread = true)

0 commit comments

Comments
 (0)