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.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;
|
||||||
|
|
Loading…
Reference in a new issue