mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Minor image brush changes
This commit is contained in:
parent
33c3cb2f33
commit
437d5a2a43
@ -27,8 +27,10 @@ import java.util.Arrays;
|
|||||||
public class ImageBrush implements Brush {
|
public class ImageBrush implements Brush {
|
||||||
private final LocalSession session;
|
private final LocalSession session;
|
||||||
private final SummedColorTable table;
|
private final SummedColorTable table;
|
||||||
private final int width, height;
|
private final int width;
|
||||||
private final double centerX, centerZ;
|
private final int height;
|
||||||
|
private final double centerX;
|
||||||
|
private final double centerZ;
|
||||||
|
|
||||||
private final ColorFunction colorFunction;
|
private final ColorFunction colorFunction;
|
||||||
|
|
||||||
@ -66,10 +68,6 @@ public class ImageBrush implements Brush {
|
|||||||
int call(int x1, int z1, int x2, int z2, Extent extent, BlockVector3 pos);
|
int call(int x1, int z1, int x2, int z2, Extent extent, BlockVector3 pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
private interface BlockFunction {
|
|
||||||
void apply(int color, Extent extent, BlockVector3 pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(EditSession editSession, BlockVector3 position, Pattern pattern, double sizeDouble) throws MaxChangedBlocksException {
|
public void build(EditSession editSession, BlockVector3 position, Pattern pattern, double sizeDouble) throws MaxChangedBlocksException {
|
||||||
TextureUtil texture = session.getTextureUtil();
|
TextureUtil texture = session.getTextureUtil();
|
||||||
|
@ -463,12 +463,11 @@ public class BrushCommands {
|
|||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
name = "image",
|
name = "image",
|
||||||
aliases = {"color"},
|
|
||||||
desc = "Use a height map to paint a surface",
|
desc = "Use a height map to paint a surface",
|
||||||
descFooter = "Use a height map to paint any surface.\n")
|
descFooter = "Use a height map to paint any surface.\n")
|
||||||
@CommandPermissions("worldedit.brush.stencil")
|
@CommandPermissions("worldedit.brush.stencil")
|
||||||
public void imageBrush(LocalSession session, InjectedValueAccess context,
|
public void imageBrush(LocalSession session, InjectedValueAccess context,
|
||||||
@Arg(desc = "Expression", def = "5")
|
@Arg(desc = "The size of the brush", def = "5")
|
||||||
Expression radius,
|
Expression radius,
|
||||||
ProvideBindings.ImageUri imageUri,
|
ProvideBindings.ImageUri imageUri,
|
||||||
@Arg(def = "1", desc = "scale height")
|
@Arg(def = "1", desc = "scale height")
|
||||||
|
Loading…
Reference in New Issue
Block a user