mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Added library support for non-integer radius spheres and cylinders.
This commit is contained in:
@ -39,6 +39,6 @@ public interface Brush {
|
||||
* @param size
|
||||
* @throws MaxChangedBlocksException
|
||||
*/
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class ClipboardBrush implements Brush {
|
||||
this.noAir = noAir;
|
||||
}
|
||||
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException {
|
||||
clipboard.place(editSession,
|
||||
pos.subtract(clipboard.getSize().divide(2)), noAir);
|
||||
|
@ -31,7 +31,7 @@ public class CylinderBrush implements Brush {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException {
|
||||
editSession.makeCylinder(pos, mat, size, height);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class HollowCylinderBrush implements Brush {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException {
|
||||
editSession.makeHollowCylinder(pos, mat, size, height);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class HollowSphereBrush implements Brush {
|
||||
public HollowSphereBrush() {
|
||||
}
|
||||
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException {
|
||||
editSession.makeSphere(pos, mat, size, false);
|
||||
}
|
||||
|
@ -36,9 +36,9 @@ public class SmoothBrush implements Brush {
|
||||
this.iterations = iterations;
|
||||
}
|
||||
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException {
|
||||
int rad = size;
|
||||
double rad = size;
|
||||
Vector min = pos.subtract(rad, rad, rad);
|
||||
Vector max = pos.add(rad, rad + 10, rad);
|
||||
Region region = new CuboidRegion(min, max);
|
||||
|
@ -28,7 +28,7 @@ public class SphereBrush implements Brush {
|
||||
public SphereBrush() {
|
||||
}
|
||||
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, int size)
|
||||
public void build(EditSession editSession, Vector pos, Pattern mat, double size)
|
||||
throws MaxChangedBlocksException {
|
||||
editSession.makeSphere(pos, mat, size, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user