mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fix some merge issues
This commit is contained in:
parent
025360753f
commit
0632a9ce96
@ -133,6 +133,18 @@ public class CompoundTagBuilder {
|
|||||||
return put(key, new IntTag(value));
|
return put(key, new IntTag(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put the given key and value into the compound tag as a
|
||||||
|
* {@code LongArrayTag}.
|
||||||
|
*
|
||||||
|
* @param key they key
|
||||||
|
* @param value the value
|
||||||
|
* @return this object
|
||||||
|
*/
|
||||||
|
public CompoundTagBuilder putLongArray(String key, long[] value) {
|
||||||
|
return put(key, new LongArrayTag(value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put the given key and value into the compound tag as a
|
* Put the given key and value into the compound tag as a
|
||||||
* {@code LongTag}.
|
* {@code LongTag}.
|
||||||
|
@ -67,7 +67,7 @@ public class FloodFillTool implements BlockTool {
|
|||||||
EditSession editSession = session.createEditSession(player);
|
EditSession editSession = session.createEditSession(player);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
recurse(editSession, world, clicked.toVector().toBlockVector(),
|
recurse(editSession, clicked.toVector().toBlockVector(),
|
||||||
clicked.toVector(), range, initialType, new HashSet<BlockVector>());
|
clicked.toVector(), range, initialType, new HashSet<BlockVector>());
|
||||||
} catch (WorldEditException e) {
|
} catch (WorldEditException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
@ -77,7 +77,7 @@ public class FloodFillTool implements BlockTool {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recurse(EditSession editSession, World world, BlockVector pos, Vector origin, int size, BlockType initialType,
|
private void recurse(EditSession editSession, BlockVector pos, Vector origin, int size, BlockType initialType,
|
||||||
Set<BlockVector> visited) throws WorldEditException {
|
Set<BlockVector> visited) throws WorldEditException {
|
||||||
|
|
||||||
if (origin.distance(pos) > size || visited.contains(pos)) {
|
if (origin.distance(pos) > size || visited.contains(pos)) {
|
||||||
@ -92,17 +92,17 @@ public class FloodFillTool implements BlockTool {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
recurse(editSession, world, pos.add(1, 0, 0).toBlockVector(),
|
recurse(editSession, pos.add(1, 0, 0).toBlockVector(),
|
||||||
origin, size, initialType, visited);
|
origin, size, initialType, visited);
|
||||||
recurse(editSession, world, pos.add(-1, 0, 0).toBlockVector(),
|
recurse(editSession, pos.add(-1, 0, 0).toBlockVector(),
|
||||||
origin, size, initialType, visited);
|
origin, size, initialType, visited);
|
||||||
recurse(editSession, world, pos.add(0, 0, 1).toBlockVector(),
|
recurse(editSession, pos.add(0, 0, 1).toBlockVector(),
|
||||||
origin, size, initialType, visited);
|
origin, size, initialType, visited);
|
||||||
recurse(editSession, world, pos.add(0, 0, -1).toBlockVector(),
|
recurse(editSession, pos.add(0, 0, -1).toBlockVector(),
|
||||||
origin, size, initialType, visited);
|
origin, size, initialType, visited);
|
||||||
recurse(editSession, world, pos.add(0, 1, 0).toBlockVector(),
|
recurse(editSession, pos.add(0, 1, 0).toBlockVector(),
|
||||||
origin, size, initialType, visited);
|
origin, size, initialType, visited);
|
||||||
recurse(editSession, world, pos.add(0, -1, 0).toBlockVector(),
|
recurse(editSession, pos.add(0, -1, 0).toBlockVector(),
|
||||||
origin, size, initialType, visited);
|
origin, size, initialType, visited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
|||||||
|
|
||||||
byte free = 0;
|
byte free = 0;
|
||||||
|
|
||||||
while (y <= world.getMinimumPoint().getBlockY() + 2) {
|
while (y <= world.getMaximumPoint().getBlockY() + 2) {
|
||||||
if (!world.getBlock(new Vector(x, y, z)).getBlockType().getMaterial().isMovementBlocker()) {
|
if (!world.getBlock(new Vector(x, y, z)).getBlockType().getMaterial().isMovementBlocker()) {
|
||||||
++free;
|
++free;
|
||||||
} else {
|
} else {
|
||||||
|
@ -96,7 +96,7 @@ public class FloraGenerator implements RegionFunction {
|
|||||||
*/
|
*/
|
||||||
public static Pattern getTemperatePattern() {
|
public static Pattern getTemperatePattern() {
|
||||||
RandomPattern pattern = new RandomPattern();
|
RandomPattern pattern = new RandomPattern();
|
||||||
pattern.add(new BlockPattern(BlockTypes.GRASS_BLOCK.getDefaultState()), 300);
|
pattern.add(new BlockPattern(BlockTypes.GRASS.getDefaultState()), 300);
|
||||||
pattern.add(new BlockPattern(BlockTypes.POPPY.getDefaultState()), 5);
|
pattern.add(new BlockPattern(BlockTypes.POPPY.getDefaultState()), 5);
|
||||||
pattern.add(new BlockPattern(BlockTypes.DANDELION.getDefaultState()), 5);
|
pattern.add(new BlockPattern(BlockTypes.DANDELION.getDefaultState()), 5);
|
||||||
return pattern;
|
return pattern;
|
||||||
|
@ -1011,6 +1011,10 @@ public enum BlockTypes implements BlockType {
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final @Nullable BlockTypes get(final String id) {
|
||||||
|
return $REGISTRY.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
public static final @Nullable BlockTypes get(final CharSequence id) {
|
public static final @Nullable BlockTypes get(final CharSequence id) {
|
||||||
return $REGISTRY.get(id);
|
return $REGISTRY.get(id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user