mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Use a static builder and reset it, rather than asking the Sponge registry for a new builder
This commit is contained in:
parent
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())
|
||||
|
Loading…
Reference in New Issue
Block a user