Use SingleBlockTypeMask for fixLiquid

This commit is contained in:
Jesse Boyd 2019-11-14 17:57:43 +00:00
parent 2670e66ce2
commit d7b3db215e
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -1595,13 +1595,13 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
checkArgument(radius >= 0, "radius >= 0 required"); checkArgument(radius >= 0, "radius >= 0 required");
// Our origins can only be liquids // Our origins can only be liquids
Mask liquidMask = new BlockTypeMask(this, fluid); Mask liquidMask = new SingleBlockTypeMask(this, fluid);
// But we will also visit air blocks // But we will also visit air blocks
MaskIntersection blockMask = new MaskUnion(liquidMask, Masks.negate(new ExistingBlockMask(this))); MaskIntersection blockMask = new MaskUnion(liquidMask, Masks.negate(new ExistingBlockMask(this)));
// There are boundaries that the routine needs to stay in // There are boundaries that the routine needs to stay in
MaskIntersection mask = new MaskIntersection( Mask mask = new MaskIntersection(
new BoundedHeightMask(0, Math.min(origin.getBlockY(), getWorld().getMaxY())), new BoundedHeightMask(0, Math.min(origin.getBlockY(), getWorld().getMaxY())),
new RegionMask(new EllipsoidRegion(null, origin, Vector3.at(radius, radius, radius))), new RegionMask(new EllipsoidRegion(null, origin, Vector3.at(radius, radius, radius))),
blockMask blockMask