mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
fix fixwater/lava + tile paste
This commit is contained in:
@ -2010,7 +2010,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
|
||||
* @return number of blocks affected
|
||||
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
||||
*/
|
||||
public int fixLiquid(final Vector origin, final double radius, Mask liquidMask) {
|
||||
public int fixLiquid(final Vector origin, final double radius, Mask liquidMask, Pattern pattern) {
|
||||
checkNotNull(origin);
|
||||
checkArgument(radius >= 0, "radius >= 0 required");
|
||||
|
||||
@ -2020,7 +2020,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
|
||||
new RegionMask(new EllipsoidRegion(null, origin, new Vector(radius, radius, radius))),
|
||||
liquidMask);
|
||||
|
||||
BlockReplace replace = new BlockReplace(this, BlockTypes.AIR.getDefaultState());
|
||||
BlockReplace replace = new BlockReplace(this, pattern);
|
||||
NonRisingVisitor visitor = new NonRisingVisitor(mask, replace, (int) (radius * 2 + 1), this);
|
||||
|
||||
// Around the origin in a 3x3 block
|
||||
|
@ -305,7 +305,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
public void fixLava(Player player, LocalSession session, EditSession editSession, double radius) throws WorldEditException {
|
||||
worldEdit.checkMaxRadius(radius);
|
||||
int affected = editSession.fixLiquid(
|
||||
session.getPlacementPosition(player), radius, BlockTypes.LAVA.toMask(editSession));
|
||||
session.getPlacementPosition(player), radius, BlockTypes.LAVA.toMask(editSession), BlockTypes.LAVA.getDefaultState());
|
||||
player.print(BBC.getPrefix() + affected + " block(s) have been changed.");
|
||||
}
|
||||
|
||||
@ -321,7 +321,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
public void fixWater(Player player, LocalSession session, EditSession editSession, double radius) throws WorldEditException {
|
||||
worldEdit.checkMaxRadius(radius);
|
||||
int affected = editSession.fixLiquid(
|
||||
session.getPlacementPosition(player), radius, BlockTypes.WATER.toMask(editSession));
|
||||
session.getPlacementPosition(player), radius, BlockTypes.WATER.toMask(editSession), BlockTypes.WATER.getDefaultState());
|
||||
player.print(BBC.getPrefix() + affected + " block(s) have been changed.");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user