Fixes #2675: cells did not check that the fluid was flowable when trying to place it (#2676)

This commit is contained in:
Ayutac 2021-12-23 01:43:05 +01:00 committed by GitHub
parent 8dbab8f62e
commit 2c792a72ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,7 +171,7 @@ public class DynamicCellItem extends Item implements ItemFluidInfo {
Fluid containedFluid = getFluid(stack);
BlockHitResult hitResult = raycast(world, player, containedFluid == Fluids.EMPTY ? RaycastContext.FluidHandling.SOURCE_ONLY : RaycastContext.FluidHandling.NONE);
if (hitResult.getType() == HitResult.Type.MISS) {
if (hitResult.getType() == HitResult.Type.MISS || !(containedFluid instanceof FlowableFluid)) {
return TypedActionResult.pass(stack);
}
if (hitResult.getType() != HitResult.Type.BLOCK) {