Skip to content

Commit

Permalink
Fix Distillation Apparatus prevented from being refilled (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyGost authored Sep 30, 2021
1 parent 238495d commit 7ed368e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,14 @@ public void tick(World world, BlockPos pos, BlockState state, BlockEntityDistill
sync(); // KG: Maybe this is laggy?
}
}
private void updateEssentiaTankSize() {
essentiaInput.setCapacity(TANK_MAX - essentia);
}
private void tryConvertEssentia() { // KG: Not clean, could have issues if this function is missed for a tick.
if (!essentiaInput.isEmpty()) {
essentia += essentiaInput.getCount();
essentiaInput.emptyContents();
essentiaInput.setCapacity(TANK_MAX - essentia);
updateEssentiaTankSize();
}
}
private void setLit(boolean lit) {
Expand All @@ -237,6 +240,7 @@ private void distill() {
else if (hasAzoth()) items.get(SLOT_AZOTH).decrement(1);
// Else: Throw?
alkahest += DISTILL_GAIN;
updateEssentiaTankSize();
}

private boolean isFull() {
Expand Down

0 comments on commit 7ed368e

Please sign in to comment.