mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fixed NullPointerException in Spline and Sweep brush
This commit is contained in:
parent
4041b2aa1d
commit
b7e9547cd5
@ -46,7 +46,7 @@ public class SweepBrush implements Brush, ResettableTool {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean newPos = !position.equals(this.position);
|
boolean newPos = this.position == null || !position.equals(this.position);
|
||||||
this.position = position;
|
this.position = position;
|
||||||
Player player = editSession.getPlayer();
|
Player player = editSession.getPlayer();
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
|
@ -104,7 +104,7 @@ public abstract class DFSVisitor implements Operation {
|
|||||||
from.getZ() + direction.getZ());
|
from.getZ() + direction.getZ());
|
||||||
if (isVisitable(bv, bv2)) {
|
if (isVisitable(bv, bv2)) {
|
||||||
Node adjacent = new Node(bv2.getBlockX(), bv2.getBlockY(), bv2.getBlockZ());
|
Node adjacent = new Node(bv2.getBlockX(), bv2.getBlockY(), bv2.getBlockZ());
|
||||||
if (!adjacent.equals(current.from)) {
|
if (current.from == null || !adjacent.equals(current.from)) {
|
||||||
AtomicInteger adjacentCount = visited.get(adjacent);
|
AtomicInteger adjacentCount = visited.get(adjacent);
|
||||||
if (adjacentCount == null) {
|
if (adjacentCount == null) {
|
||||||
if (countAdd++ < maxBranch) {
|
if (countAdd++ < maxBranch) {
|
||||||
|
Loading…
Reference in New Issue
Block a user