Add ability to insert\extract from fusion reactor. Closes #1237
This commit is contained in:
parent
0ae99ebae8
commit
08c2f8921e
1 changed files with 26 additions and 1 deletions
|
@ -194,7 +194,6 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IInv
|
|||
this.currentRecipe = reactorRecipe;
|
||||
this.finalTickTime = this.currentRecipe.getTickTime();
|
||||
this.neededPower = (int) this.currentRecipe.getStartEU();
|
||||
this.hasStartedCrafting = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -246,6 +245,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IInv
|
|||
}
|
||||
}
|
||||
}
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
if (this.inventory.hasChanged) {
|
||||
|
@ -305,6 +305,31 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IInv
|
|||
public ITextComponent getDisplayName() {
|
||||
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
|
||||
public Inventory getInventory() {
|
||||
|
|
Loading…
Reference in a new issue