Skip to content

Commit

Permalink
Remove 'setInterfacePattern' method (#209)
Browse files Browse the repository at this point in the history
The 'setInterfacePattern' method can use OpenComputer to directly generate items in the game.
  • Loading branch information
SmileYik authored Jun 7, 2024
1 parent 72ce3a0 commit c1c6a03
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,6 @@ public Object[] getInterfaceConfiguration(Context context, Arguments args) {
return new Object[] { stack };
}

@Callback(
doc = "function([slot:number][, database:address, entry:number[, size:number]]):boolean -- Configure the interface.")
public Object[] setInterfaceConfiguration(Context context, Arguments args) {
IInventory config = tileEntity.getInternalInventory();
int slot = args.isString(0) ? 0 : optSlot(args, config, 0, 0);
config.setInventorySlotContents(slot, getStack(args));
context.pause(0.5);
return new Object[] { true };
}

@Callback(doc = "function([slot:number]):table -- Get the given pattern in the interface.")
public Object[] getInterfacePattern(Context context, Arguments args) {
IInventory inv = tileEntity.getInternalInventory();
Expand Down

0 comments on commit c1c6a03

Please sign in to comment.