22
33import dan200 .computercraft .api .lua .LuaException ;
44import dan200 .computercraft .api .lua .LuaFunction ;
5- import dan200 .computercraft .api .lua .LuaTable ;
65import dan200 .computercraft .api .lua .MethodResult ;
6+ import dan200 .computercraft .api .lua .ObjectLuaTable ;
77import de .srendi .advancedperipherals .AdvancedPeripherals ;
88import de .srendi .advancedperipherals .common .addons .computercraft .owner .BlockEntityPeripheralOwner ;
99import de .srendi .advancedperipherals .common .blocks .blockentities .InventoryManagerEntity ;
@@ -55,8 +55,8 @@ public final String getOwner() throws LuaException {
5555 //The item is specified the same as with the RS/ME bridge:
5656 //{name="minecraft:enchanted_book", count=1, nbt="ae70053c97f877de546b0248b9ddf525"}
5757 @ LuaFunction (mainThread = true )
58- public final MethodResult addItemToPlayer (String invDirection , LuaTable <?, ?> item ) throws LuaException {
59- Pair <ItemFilter , String > filter = ItemFilter .parse (item );
58+ public final MethodResult addItemToPlayer (String invDirection , Map <?, ?> item ) throws LuaException {
59+ Pair <ItemFilter , String > filter = ItemFilter .parse (new ObjectLuaTable ( item ) );
6060 if (filter .rightPresent ())
6161 return MethodResult .of (0 , filter .getRight ());
6262
@@ -80,8 +80,8 @@ private MethodResult addItemCommon(String invDirection, ItemFilter filter) throw
8080 }
8181
8282 @ LuaFunction (mainThread = true )
83- public final MethodResult removeItemFromPlayer (String invDirection , LuaTable <?, ?> item ) throws LuaException {
84- Pair <ItemFilter , String > filter = ItemFilter .parse (item );
83+ public final MethodResult removeItemFromPlayer (String invDirection , Map <?, ?> item ) throws LuaException {
84+ Pair <ItemFilter , String > filter = ItemFilter .parse (new ObjectLuaTable ( item ) );
8585 if (filter .rightPresent ())
8686 return MethodResult .of (0 , filter .getRight ());
8787
0 commit comments