I am trying to make my machine put stack in output slot when it detects particular itemstack in input
When I place itemstack in input it doesnt do anything.
I am pretty sure that getOreMelterRecipeOutput is OK.
Whole code: http://github.com/leSamo/Total-Automation
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
ItemStack input = ((Slot)this.inventorySlots.get(0)).getStack();
ItemStack output = ((Slot)this.inventorySlots.get(1)).getStack();
if (input != null) {
output = TARecipeHandler.getOreMelterRecipeOutput(input);
this.putStackInSlot(1, output);
}
}
public static ItemStack getOreMelterRecipeOutput(ItemStack input) {
if (input != null) {
if (Arrays.asList(OreMelterInput).contains(input)) {
int slot = Arrays.asList(OreMelterInput).indexOf(input);
return OreMelterOutput[slot];
}
else return null;
}
else return null;
}
I know this question was solved already, but it doesn't work for me.
I've made a custom GUI, but I cant move items around - if I try to move it it goes back.
Here's my code: https://github.com/leSamo/Total-Automation
Thanks so much, much, much, much for help.