3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 02:50:05 +01:00

some minor fixes

/br sspl - says to click same spot again to apply, clicked same spot and nothing happens
/br layer - gives an error message "there was an error handling a FAWE command: [See console]
/br clipboard - doesn't let me execute because of max radius of 5, however am unable to set a lower radius as there is no option for it
/br butcher - tried to kill some mobs, but didn't work (nothing happened)
/br splatter - tried to execute the command, nothing happened
Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-11 05:14:58 +10:00
Ursprung 21be61f03a
Commit d61e5f33f1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
6 geänderte Dateien mit 17 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -67,7 +67,7 @@ public class CopyPastaBrush implements Brush, ResettableTool {
@Override
public boolean test(BlockVector3 vector) {
if (super.test(vector) && vector.getBlockY() >= minY) {
BaseBlock block = editSession.getFullBlock(position);
BaseBlock block = editSession.getFullBlock(vector);
if (!block.getBlockType().getMaterial().isAir()) {
builder.add(vector, EditSession.nullBlock.toBaseBlock(), block);
return true;

Datei anzeigen

@ -25,7 +25,7 @@ public class SurfaceSpline implements Brush {
this.quality = quality;
}
private ArrayList<Vector3> path = new ArrayList<>();
private ArrayList<BlockVector3> path = new ArrayList<>();
@Override
public void build(EditSession editSession, BlockVector3 pos, Pattern pattern, double radius) throws MaxChangedBlocksException {
@ -35,7 +35,7 @@ public class SurfaceSpline implements Brush {
int max = editSession.getNearestSurfaceTerrainBlock(pos.getBlockX(), pos.getBlockZ(), pos.getBlockY(), 0, editSession.getMaxY());
if (max == -1) return;
// pos.mutY(max);
path.add(Vector3.at(pos.getBlockX(), max, pos.getBlockZ()));
path.add(BlockVector3.at(pos.getBlockX(), max, pos.getBlockZ()));
editSession.getPlayer().sendMessage(BBC.getPrefix() + BBC.BRUSH_SPLINE_PRIMARY_2.s());
if (!vis) return;
}
@ -43,8 +43,8 @@ public class SurfaceSpline implements Brush {
final List<Node> nodes = new ArrayList<>(path.size());
final KochanekBartelsInterpolation interpol = new KochanekBartelsInterpolation();
for (final Vector3 nodevector : path) {
final Node n = new Node(nodevector);
for (final BlockVector3 nodevector : path) {
final Node n = new Node(nodevector.toVector3());
n.setTension(tension);
n.setBias(bias);
n.setContinuity(continuity);

Datei anzeigen

@ -411,7 +411,8 @@ public class BlockTransformExtent extends ResettableExtent {
return BlockState.getFromInternalId(newMaskedId | (internalId & (~mask)));
}
int newMaskId = transformState(state, transform);
newMaskedId = transformState(state, transform);
arr[maskedId >> BlockTypes.BIT_OFFSET] = newMaskedId & mask;
return BlockState.getFromInternalId(newMaskedId);
}

Datei anzeigen

@ -86,7 +86,7 @@ public class DispatcherNode {
* @see ParametricBuilder#registerMethodsAsCommands(com.sk89q.worldedit.util.command.Dispatcher, Object)
*/
public DispatcherNode registerMethods(Object object) {
return registerMethods(object, null);
return registerMethods(object, object instanceof CallableProcessor ? (CallableProcessor) object : null);
}
/**

Datei anzeigen

@ -194,6 +194,9 @@ public class ParametricBuilder {
else if (object instanceof CallableProcessor) {
callable = new ProcessedCallable(callable, (CallableProcessor) object);
}
if (object instanceof MethodCommands) {
((MethodCommands) object).register(method, callable, dispatcher);
}
dispatcher.registerCommand(callable, definition.aliases());
}
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.world.block;
import com.sk89q.worldedit.blocks.TileEntityBlock;
import com.sk89q.worldedit.function.pattern.FawePattern;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.registry.state.Property;
import com.sk89q.worldedit.registry.state.PropertyKey;
import com.sk89q.worldedit.world.registry.BlockMaterial;
@ -32,6 +33,11 @@ import java.util.stream.Collectors;
public interface BlockStateHolder<B extends BlockStateHolder<B>> extends FawePattern, TileEntityBlock {
@Override
default BaseBlock apply(BlockVector3 position) {
return this.toBaseBlock();
}
/**
* Get the block type
*