Deprecate BlockQuirkExtent, handle lower down

Ice is no longer turning into water since before 1.7.10, so that part has been
removed entirely.
This commit is contained in:
Octavia Togami 2020-08-28 20:37:11 -07:00
parent 1a6fe32da6
commit 3996998c5f
5 changed files with 6 additions and 2 deletions

View File

@ -442,6 +442,7 @@ public com.sk89q.worldedit.world.block.BlockState getBlock(BlockVector3 position
@Override
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, SideEffectSet sideEffects) {
clearContainerBlockContents(position);
if (worldNativeAccess != null) {
try {
return worldNativeAccess.setBlock(position, block, sideEffects);

View File

@ -40,7 +40,6 @@
import com.sk89q.worldedit.extent.validation.BlockChangeLimiter;
import com.sk89q.worldedit.extent.validation.DataValidatorExtent;
import com.sk89q.worldedit.extent.world.BiomeQuirkExtent;
import com.sk89q.worldedit.extent.world.BlockQuirkExtent;
import com.sk89q.worldedit.extent.world.ChunkLoadingExtent;
import com.sk89q.worldedit.extent.world.SideEffectExtent;
import com.sk89q.worldedit.extent.world.SurvivalModeExtent;
@ -257,7 +256,6 @@ public String getDisplayName() {
watchdogExtents.add(watchdogExtent);
}
extent = traceIfNeeded(survivalExtent = new SurvivalModeExtent(extent, world));
extent = traceIfNeeded(new BlockQuirkExtent(extent, world));
extent = traceIfNeeded(new BiomeQuirkExtent(extent));
extent = traceIfNeeded(new ChunkLoadingExtent(extent, world));
extent = traceIfNeeded(new LastAccessExtentCache(extent));

View File

@ -33,7 +33,10 @@
/**
* Handles various quirks when setting blocks, such as ice turning
* into water or containers dropping their contents.
*
* @deprecated Handled by the world entirely now
*/
@Deprecated
public class BlockQuirkExtent extends AbstractDelegateExtent {
private final World world;

View File

@ -186,6 +186,7 @@ public Path getStoragePath() {
@Override
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, SideEffectSet sideEffects) throws WorldEditException {
clearContainerBlockContents(position);
return worldNativeAccess.setBlock(position, block, sideEffects);
}

View File

@ -189,6 +189,7 @@ public Path getStoragePath() {
@Override
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, SideEffectSet sideEffects) throws WorldEditException {
clearContainerBlockContents(position);
return nativeAccess.setBlock(position, block, sideEffects);
}