mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +01:00
Various
Fix random 1000ms brush delay Fix brush perform location not using snapshot location Add fall command Add getlight debug command Fix relight NPE
This commit is contained in:
parent
efc0de27d4
commit
50ba6427a2
@ -52,7 +52,7 @@ public enum BBC {
|
|||||||
TRANSFORM_DISABLED("Global transform disabled", "WorldEdit.General"),
|
TRANSFORM_DISABLED("Global transform disabled", "WorldEdit.General"),
|
||||||
TRANSFORM("Global transform set", "WorldEdit.General"),
|
TRANSFORM("Global transform set", "WorldEdit.General"),
|
||||||
|
|
||||||
COMMAND_COPY("%s0 blocks were copied", "WorldEdit.Copy"),
|
COMMAND_COPY("%s0 blocks were copied (Note: lazycopy is faster)", "WorldEdit.Copy"),
|
||||||
COMMAND_CUT("%s0 blocks were cut", "WorldEdit.Cut"),
|
COMMAND_CUT("%s0 blocks were cut", "WorldEdit.Cut"),
|
||||||
COMMAND_PASTE("The clipboard has been pasted at %s0", "WorldEdit.Paste"),
|
COMMAND_PASTE("The clipboard has been pasted at %s0", "WorldEdit.Paste"),
|
||||||
COMMAND_ROTATE("The clipboard has been rotated", "WorldEdit.Rotate"),
|
COMMAND_ROTATE("The clipboard has been rotated", "WorldEdit.Rotate"),
|
||||||
|
@ -138,7 +138,10 @@ public class NMSRelighter {
|
|||||||
@Override
|
@Override
|
||||||
public void run(Object value) {
|
public void run(Object value) {
|
||||||
for (Map.Entry<FaweChunk, int[]> entry : fcs.entrySet()) {
|
for (Map.Entry<FaweChunk, int[]> entry : fcs.entrySet()) {
|
||||||
queue.setHeightMap(entry.getKey(), entry.getValue());
|
FaweChunk chunk = entry.getKey();
|
||||||
|
if (queue.isChunkLoaded(chunk.getX(), chunk.getZ())) {
|
||||||
|
queue.setHeightMap(chunk, entry.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package com.boydti.fawe.object;
|
package com.boydti.fawe.object;
|
||||||
|
|
||||||
public class IntegerTrio {
|
public class IntegerTrio {
|
||||||
public final int z;
|
public int x,y,z;
|
||||||
public final int x;
|
|
||||||
public final int y;
|
|
||||||
|
|
||||||
public IntegerTrio(int x, int y, int z) {
|
public IntegerTrio(int x, int y, int z) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
@ -11,13 +9,41 @@ public class IntegerTrio {
|
|||||||
this.z = z;
|
this.z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IntegerTrio(IntegerTrio node) {
|
||||||
|
this.x = node.x;
|
||||||
|
this.y = node.y;
|
||||||
|
this.z = node.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerTrio() {}
|
||||||
|
|
||||||
|
public final void set(int x, int y, int z) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.z = z;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void set(IntegerTrio node) {
|
||||||
|
this.x = node.x;
|
||||||
|
this.y = node.y;
|
||||||
|
this.z = node.z;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public final int hashCode() {
|
||||||
int hash = 13;
|
return (x ^ (z << 12)) ^ (y << 24);
|
||||||
hash = hash * 13 + x;
|
}
|
||||||
hash = hash * 13 + y;
|
|
||||||
hash = hash * 13 + z;
|
public final int getX() {
|
||||||
return hash;
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final int getY() {
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final int getZ() {
|
||||||
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -27,13 +53,7 @@ public class IntegerTrio {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == null) {
|
IntegerTrio other = (IntegerTrio) obj;
|
||||||
return false;
|
return other.x == x && other.z == z && other.y == y;
|
||||||
}
|
|
||||||
if (obj instanceof IntegerTrio) {
|
|
||||||
IntegerTrio other = (IntegerTrio) obj;
|
|
||||||
return other.x == x && other.z == z && other.y == y;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,9 @@ public abstract class FaweChangeSet implements ChangeSet {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
waiting.decrementAndGet();
|
waiting.decrementAndGet();
|
||||||
|
synchronized (lock) {
|
||||||
|
lock.notifyAll();
|
||||||
|
}
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package com.boydti.fawe.wrappers;
|
package com.boydti.fawe.wrappers;
|
||||||
|
|
||||||
import com.sk89q.worldedit.LocalWorld;
|
import com.sk89q.worldedit.*;
|
||||||
import com.sk89q.worldedit.Vector;
|
|
||||||
import com.sk89q.worldedit.WorldVector;
|
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.internal.LocalWorldAdapter;
|
import com.sk89q.worldedit.internal.LocalWorldAdapter;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
@ -38,6 +36,10 @@ public class LocationMaskedPlayerWrapper extends PlayerWrapper {
|
|||||||
return WorldVector.toBlockPoint(pos.getWorld(), pos.getX(), pos.getY() - 1, pos.getZ());
|
return WorldVector.toBlockPoint(pos.getWorld(), pos.getX(), pos.getY() - 1, pos.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPosition(Location position) {
|
||||||
|
this.position = position;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldVector getPosition() {
|
public WorldVector getPosition() {
|
||||||
LocalWorld world;
|
LocalWorld world;
|
||||||
|
@ -4,24 +4,17 @@ import com.boydti.fawe.Fawe;
|
|||||||
import com.boydti.fawe.object.FawePlayer;
|
import com.boydti.fawe.object.FawePlayer;
|
||||||
import com.boydti.fawe.object.RunnableVal;
|
import com.boydti.fawe.object.RunnableVal;
|
||||||
import com.boydti.fawe.util.TaskManager;
|
import com.boydti.fawe.util.TaskManager;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.*;
|
||||||
import com.sk89q.worldedit.EditSessionFactory;
|
|
||||||
import com.sk89q.worldedit.LocalSession;
|
|
||||||
import com.sk89q.worldedit.PlayerDirection;
|
|
||||||
import com.sk89q.worldedit.Vector;
|
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
|
||||||
import com.sk89q.worldedit.WorldVector;
|
|
||||||
import com.sk89q.worldedit.WorldVectorFace;
|
|
||||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||||
import com.sk89q.worldedit.blocks.BlockType;
|
import com.sk89q.worldedit.blocks.BlockType;
|
||||||
import com.sk89q.worldedit.entity.BaseEntity;
|
import com.sk89q.worldedit.entity.BaseEntity;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extension.platform.AbstractPlayerActor;
|
||||||
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
||||||
import com.sk89q.worldedit.internal.cui.CUIEvent;
|
import com.sk89q.worldedit.internal.cui.CUIEvent;
|
||||||
import com.sk89q.worldedit.session.SessionKey;
|
import com.sk89q.worldedit.session.SessionKey;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
|
import com.sk89q.worldedit.util.TargetBlock;
|
||||||
import com.sk89q.worldedit.util.auth.AuthorizationException;
|
import com.sk89q.worldedit.util.auth.AuthorizationException;
|
||||||
import com.sk89q.worldedit.world.AbstractWorld;
|
import com.sk89q.worldedit.world.AbstractWorld;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
@ -29,7 +22,7 @@ import java.io.File;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class PlayerWrapper implements Player {
|
public class PlayerWrapper extends AbstractPlayerActor {
|
||||||
private final Player parent;
|
private final Player parent;
|
||||||
|
|
||||||
public PlayerWrapper(Player parent) {
|
public PlayerWrapper(Player parent) {
|
||||||
@ -57,11 +50,6 @@ public class PlayerWrapper implements Player {
|
|||||||
return parent.isHoldingPickAxe();
|
return parent.isHoldingPickAxe();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public PlayerDirection getCardinalDirection(int yawOffset) {
|
|
||||||
return parent.getCardinalDirection(yawOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemInHand() {
|
public int getItemInHand() {
|
||||||
return parent.getItemInHand();
|
return parent.getItemInHand();
|
||||||
@ -222,22 +210,13 @@ public class PlayerWrapper implements Player {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public WorldVector getBlockIn() {
|
|
||||||
return parent.getBlockIn();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public WorldVector getBlockOn() {
|
|
||||||
return parent.getBlockOn();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldVector getBlockTrace(final int range, final boolean useLastBlock) {
|
public WorldVector getBlockTrace(final int range, final boolean useLastBlock) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<WorldVector>() {
|
return TaskManager.IMP.sync(new RunnableVal<WorldVector>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(WorldVector value) {
|
public void run(WorldVector value) {
|
||||||
this.value = parent.getBlockTrace(range, useLastBlock);
|
TargetBlock tb = new TargetBlock(PlayerWrapper.this, range, 0.2D);
|
||||||
|
this.value = useLastBlock?tb.getAnyTargetBlock():tb.getTargetBlock();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -247,22 +226,19 @@ public class PlayerWrapper implements Player {
|
|||||||
return TaskManager.IMP.sync(new RunnableVal<WorldVectorFace>() {
|
return TaskManager.IMP.sync(new RunnableVal<WorldVectorFace>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(WorldVectorFace value) {
|
public void run(WorldVectorFace value) {
|
||||||
this.value = parent.getBlockTraceFace(range, useLastBlock);
|
TargetBlock tb = new TargetBlock(PlayerWrapper.this, range, 0.2D);
|
||||||
|
this.value = useLastBlock?tb.getAnyTargetBlockFace():tb.getTargetBlockFace();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public WorldVector getBlockTrace(int range) {
|
|
||||||
return getBlockTrace(range, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldVector getSolidBlockTrace(final int range) {
|
public WorldVector getSolidBlockTrace(final int range) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<WorldVector>() {
|
return TaskManager.IMP.sync(new RunnableVal<WorldVector>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(WorldVector value) {
|
public void run(WorldVector value) {
|
||||||
this.value = parent.getSolidBlockTrace(range);
|
TargetBlock tb = new TargetBlock(PlayerWrapper.this, range, 0.2D);
|
||||||
|
this.value = tb.getSolidTargetBlock();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -295,7 +271,47 @@ public class PlayerWrapper implements Player {
|
|||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
this.value = parent.passThroughForwardWall(range);
|
int searchDist = 0;
|
||||||
|
TargetBlock hitBlox = new TargetBlock(PlayerWrapper.this, range, 0.2D);
|
||||||
|
LocalWorld world = PlayerWrapper.this.getPosition().getWorld();
|
||||||
|
boolean firstBlock = true;
|
||||||
|
int freeToFind = 2;
|
||||||
|
boolean inFree = false;
|
||||||
|
|
||||||
|
while(true) {
|
||||||
|
BlockWorldVector block;
|
||||||
|
while((block = hitBlox.getNextBlock()) != null) {
|
||||||
|
boolean free = BlockType.canPassThrough(world.getBlock(block));
|
||||||
|
if(firstBlock) {
|
||||||
|
firstBlock = false;
|
||||||
|
if(!free) {
|
||||||
|
--freeToFind;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
++searchDist;
|
||||||
|
if(searchDist > 20) {
|
||||||
|
this.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(inFree != free && free) {
|
||||||
|
--freeToFind;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(freeToFind == 0) {
|
||||||
|
PlayerWrapper.this.setOnGround(block);
|
||||||
|
this.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
inFree = free;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -305,11 +321,6 @@ public class PlayerWrapper implements Player {
|
|||||||
parent.setPosition(pos, pitch, yaw);
|
parent.setPosition(pos, pitch, yaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setPosition(Vector pos) {
|
|
||||||
parent.setPosition(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public BaseEntity getState() {
|
public BaseEntity getState() {
|
||||||
@ -321,11 +332,6 @@ public class PlayerWrapper implements Player {
|
|||||||
return parent.getLocation();
|
return parent.getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Extent getExtent() {
|
|
||||||
return parent.getExtent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove() {
|
public boolean remove() {
|
||||||
return parent.remove();
|
return parent.remove();
|
||||||
|
@ -1302,6 +1302,35 @@ public class EditSession extends AbstractWorld implements HasFaweQueue {
|
|||||||
return this.countBlock(region, ids);
|
return this.countBlock(region, ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int fall(final Region region, boolean fullHeight, BaseBlock replace) {
|
||||||
|
FlatRegion flat = asFlatRegion(region);
|
||||||
|
int startPerformY = region.getMinimumPoint().getBlockY();
|
||||||
|
int startCheckY = fullHeight ? 0 : startPerformY;
|
||||||
|
int endY = region.getMaximumPoint().getBlockY();
|
||||||
|
for (BlockVector pos : flat) {
|
||||||
|
int x = (int) pos.x;
|
||||||
|
int z = (int) pos.z;
|
||||||
|
int freeSpot = startCheckY;
|
||||||
|
for (int y = startCheckY; y <= endY; y++) {
|
||||||
|
if (y < startPerformY) {
|
||||||
|
if (getLazyBlock(x, y, z) != EditSession.nullBlock) {
|
||||||
|
freeSpot = y + 1;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BaseBlock block = getLazyBlock(x, y, z);
|
||||||
|
if (block != EditSession.nullBlock) {
|
||||||
|
if (freeSpot != y) {
|
||||||
|
setBlock(x, freeSpot, z, block);
|
||||||
|
setBlock(x, y, z, replace);
|
||||||
|
}
|
||||||
|
freeSpot++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.changes;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fills an area recursively in the X/Z directions.
|
* Fills an area recursively in the X/Z directions.
|
||||||
*
|
*
|
||||||
|
@ -113,6 +113,20 @@ public class RegionCommands {
|
|||||||
BBC.FIX_LIGHTING_SELECTION.send(fp, count);
|
BBC.FIX_LIGHTING_SELECTION.send(fp, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Command(
|
||||||
|
aliases = { "/getlighting" },
|
||||||
|
desc = "Get the light at a position",
|
||||||
|
min = 0,
|
||||||
|
max = 0
|
||||||
|
)
|
||||||
|
@CommandPermissions("worldedit.light.fix")
|
||||||
|
public void getlighting(Player player, EditSession editSession) throws WorldEditException {
|
||||||
|
FawePlayer fp = FawePlayer.wrap(player);
|
||||||
|
final FaweLocation loc = fp.getLocation();
|
||||||
|
FaweQueue queue = SetQueue.IMP.getNewQueue(loc.world, true, false);
|
||||||
|
fp.sendMessage("Light: " + queue.getEmmittedLight(loc.x, loc.y, loc.z) + " | " + queue.getSkyLight(loc.x, loc.y, loc.z));
|
||||||
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "/removelight", "/removelighting" },
|
aliases = { "/removelight", "/removelighting" },
|
||||||
desc = "Removing lighting in a selection",
|
desc = "Removing lighting in a selection",
|
||||||
@ -395,6 +409,28 @@ public class RegionCommands {
|
|||||||
BBC.VISITOR_BLOCK.send(player, affected);
|
BBC.VISITOR_BLOCK.send(player, affected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Command(
|
||||||
|
aliases = { "/fall" },
|
||||||
|
usage = "[replace]",
|
||||||
|
flags = "m",
|
||||||
|
desc = "Have the blocks in the selection fall",
|
||||||
|
help =
|
||||||
|
"Make the blocks in the selection fall\n" +
|
||||||
|
"The -m flag will only fall within the vertical selection.",
|
||||||
|
min = 0,
|
||||||
|
max = 2
|
||||||
|
)
|
||||||
|
@CommandPermissions("worldedit.region.fall")
|
||||||
|
@Logging(ORIENTATION_REGION)
|
||||||
|
public void fall(Player player, EditSession editSession, LocalSession session,
|
||||||
|
@Selection Region region,
|
||||||
|
@Optional("air") BaseBlock replace,
|
||||||
|
@Switch('m') boolean notFullHeight) throws WorldEditException {
|
||||||
|
|
||||||
|
int affected = editSession.fall(region, !notFullHeight, replace);
|
||||||
|
BBC.VISITOR_BLOCK.send(player, affected);
|
||||||
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "/stack" },
|
aliases = { "/stack" },
|
||||||
usage = "[count] [direction]",
|
usage = "[count] [direction]",
|
||||||
|
@ -421,12 +421,12 @@ public class PlatformManager {
|
|||||||
if (tool != null && tool instanceof BlockTool) {
|
if (tool != null && tool instanceof BlockTool) {
|
||||||
if (tool.canUse(player)) {
|
if (tool.canUse(player)) {
|
||||||
FawePlayer<?> fp = FawePlayer.wrap(player);
|
FawePlayer<?> fp = FawePlayer.wrap(player);
|
||||||
fp.runAsyncIfFree(new Runnable() {
|
fp.runAction(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
reset((BlockTool) tool).actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location);
|
reset((BlockTool) tool).actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location);
|
||||||
}
|
}
|
||||||
});
|
}, true, true);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -519,12 +519,12 @@ public class PlatformManager {
|
|||||||
if (tool != null && tool instanceof TraceTool) {
|
if (tool != null && tool instanceof TraceTool) {
|
||||||
if (tool.canUse(player)) {
|
if (tool.canUse(player)) {
|
||||||
FawePlayer<?> fp = FawePlayer.wrap(player);
|
FawePlayer<?> fp = FawePlayer.wrap(player);
|
||||||
fp.runAsyncIfFree(new Runnable() {
|
fp.runAction(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
reset((TraceTool) tool).actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session);
|
reset((TraceTool) tool).actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session);
|
||||||
}
|
}
|
||||||
});
|
}, true, true);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -154,13 +154,13 @@ public abstract class BreadthFirstSearch implements Operation {
|
|||||||
|
|
||||||
public Node() {}
|
public Node() {}
|
||||||
|
|
||||||
private final void set(int x, int y, int z) {
|
public final void set(int x, int y, int z) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void set(Node node) {
|
public final void set(Node node) {
|
||||||
this.x = node.x;
|
this.x = node.x;
|
||||||
this.y = node.y;
|
this.y = node.y;
|
||||||
this.z = node.z;
|
this.z = node.z;
|
||||||
@ -171,15 +171,15 @@ public abstract class BreadthFirstSearch implements Operation {
|
|||||||
return (x ^ (z << 12)) ^ (y << 24);
|
return (x ^ (z << 12)) ^ (y << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int getX() {
|
public final int getX() {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int getY() {
|
public final int getY() {
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int getZ() {
|
public final int getZ() {
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user