Fix barrel fluid transformation recipes only crafting witch water
This commit is contained in:
parent
a3676fec66
commit
5981bff4cf
|
|
@ -525,12 +525,13 @@ public class BarrelBlockEntity extends EBlockEntity {
|
||||||
barrel.currentTransformRecipe = null;
|
barrel.currentTransformRecipe = null;
|
||||||
} else {
|
} else {
|
||||||
barrel.progress += catalysts * (1.0f / barrel.currentTransformRecipe.duration());
|
barrel.progress += catalysts * (1.0f / barrel.currentTransformRecipe.duration());
|
||||||
|
|
||||||
if (barrel.progress >= 1.0f - Mth.EPSILON) {
|
if (barrel.progress >= 1.0f - Mth.EPSILON) {
|
||||||
// Reset progress
|
// Reset progress
|
||||||
barrel.progress = 0.0f;
|
barrel.progress = 0.0f;
|
||||||
level.playSound(null, pos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0f, 0.6f);
|
level.playSound(null, pos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0f, 0.6f);
|
||||||
barrel.tank.setFluid(FluidStack.EMPTY);
|
barrel.tank.setFluid(FluidStack.EMPTY);
|
||||||
barrel.tank.fill(new FluidStack(EFluids.WITCH_WATER.get(), 1000), IFluidHandler.FluidAction.EXECUTE);
|
barrel.tank.fill(new FluidStack(recipe.resultFluid(), 1000), IFluidHandler.FluidAction.EXECUTE);
|
||||||
}
|
}
|
||||||
barrel.markUpdated();
|
barrel.markUpdated();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user