Add ability to insert\extract from fusion reactor. Closes #1237

This commit is contained in:
drcrazy 2017-10-02 21:08:05 +03:00
parent 0ae99ebae8
commit 08c2f8921e

View file

@ -194,7 +194,6 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IInv
this.currentRecipe = reactorRecipe; this.currentRecipe = reactorRecipe;
this.finalTickTime = this.currentRecipe.getTickTime(); this.finalTickTime = this.currentRecipe.getTickTime();
this.neededPower = (int) this.currentRecipe.getStartEU(); this.neededPower = (int) this.currentRecipe.getStartEU();
this.hasStartedCrafting = false;
break; break;
} }
} }
@ -246,6 +245,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IInv
} }
} }
} }
this.markDirty();
} }
if (this.inventory.hasChanged) { if (this.inventory.hasChanged) {
@ -306,6 +306,31 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IInv
return null; return null;
} }
@Override
public int[] getSlotsForFace(EnumFacing side) {
return new int[] { 0, 1, 2 };
}
/**
* Returns true if automation can insert the given item in the given slot from the given side.
*/
@Override
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction){
if (index == 0 || index == 1) {
return true;
}
return false;
}
/**
* Returns true if automation can extract the given item in the given slot from the given side.
*/
@Override
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction){
return index == 2;
}
@Override @Override
public Inventory getInventory() { public Inventory getInventory() {
return this.inventory; return this.inventory;