Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-07 00:22:51 +02:00
Use a static builder and reset it, rather than asking the Sponge registry for a new builder
Dieser Commit ist enthalten in:
Ursprung
a31546eda2
Commit
d1e9446d47
@ -116,6 +116,8 @@ public abstract class SpongeWorld extends AbstractWorld {
|
||||
|
||||
protected abstract void applyTileEntityData(TileEntity entity, BaseBlock block);
|
||||
|
||||
private static final BlockSnapshot.Builder builder = BlockSnapshot.builder();
|
||||
|
||||
@Override
|
||||
public boolean setBlock(Vector position, BaseBlock block, boolean notifyAndLight) throws WorldEditException {
|
||||
checkNotNull(position);
|
||||
@ -127,7 +129,7 @@ public abstract class SpongeWorld extends AbstractWorld {
|
||||
Vector3i pos = new Vector3i(position.getX(), position.getY(), position.getZ());
|
||||
BlockState newState = getBlockState(block);
|
||||
|
||||
BlockSnapshot snapshot = BlockSnapshot.builder()
|
||||
BlockSnapshot snapshot = builder.reset()
|
||||
.blockState(newState)
|
||||
.position(pos)
|
||||
.world(world.getProperties())
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren