mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-03-07 13:48:00 +08:00
Fix Cycler tool not using full block data (#1868)
This commit is contained in:
parent
b9f0416624
commit
8ee45137aa
@ -34,7 +34,7 @@
|
||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -60,7 +60,7 @@ private boolean handleCycle(LocalConfiguration config, Player player, LocalSessi
|
||||
World world = (World) clicked.getExtent();
|
||||
|
||||
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
|
||||
BlockState block = world.getBlock(blockPoint);
|
||||
BaseBlock block = world.getFullBlock(blockPoint);
|
||||
|
||||
if (!config.allowedDataCycleBlocks.isEmpty()
|
||||
&& !player.hasPermission("worldedit.override.data-cycler")
|
||||
@ -85,7 +85,7 @@ private boolean handleCycle(LocalConfiguration config, Player player, LocalSessi
|
||||
index = (index + 1) % currentProperty.getValues().size();
|
||||
@SuppressWarnings("unchecked")
|
||||
Property<Object> objProp = (Property<Object>) currentProperty;
|
||||
BlockState newBlock = block.with(objProp, currentProperty.getValues().get(index));
|
||||
BaseBlock newBlock = block.with(objProp, currentProperty.getValues().get(index));
|
||||
|
||||
try (EditSession editSession = session.createEditSession(player)) {
|
||||
editSession.disableBuffering();
|
||||
|
Loading…
Reference in New Issue
Block a user