Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Fix some merge issues
Dieser Commit ist enthalten in:
Ursprung
025360753f
Commit
0632a9ce96
@ -135,12 +135,24 @@ public class CompoundTagBuilder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 LongArrayTag}.
|
||||||
*
|
*
|
||||||
* @param key they key
|
* @param key they key
|
||||||
* @param value the value
|
* @param value the value
|
||||||
* @return this object
|
* @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
|
||||||
|
* {@code LongTag}.
|
||||||
|
*
|
||||||
|
* @param key they key
|
||||||
|
* @param value the value
|
||||||
|
* @return this object
|
||||||
|
*/
|
||||||
public CompoundTagBuilder putLong(String key, long value) {
|
public CompoundTagBuilder putLong(String key, long value) {
|
||||||
return put(key, new LongTag(value));
|
return put(key, new LongTag(value));
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren