Skip to content

Commit

Permalink
Deprecate fullySupports3DBiomes and BiomeQuirkExtent (EngineHub#2496)
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 authored Jul 7, 2024
1 parent eac445d commit 4d3d820
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import com.sk89q.worldedit.extent.reorder.MultiStageReorder;
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.ChunkLoadingExtent;
import com.sk89q.worldedit.extent.world.SideEffectExtent;
import com.sk89q.worldedit.extent.world.SurvivalModeExtent;
Expand Down Expand Up @@ -261,7 +260,6 @@ public String getDisplayName() {
watchdogExtents.add(watchdogExtent);
}
extent = traceIfNeeded(survivalExtent = new SurvivalModeExtent(extent, world));
extent = traceIfNeeded(new BiomeQuirkExtent(extent));
extent = traceIfNeeded(new ChunkLoadingExtent(extent, world));
extent = traceIfNeeded(new LastAccessExtentCache(extent));
extent = traceIfNeeded(blockBagExtent = new BlockBagExtent(extent, blockBag));
Expand Down Expand Up @@ -682,11 +680,6 @@ public int getBlockChangeCount() {
return changeSet.size();
}

@Override
public boolean fullySupports3DBiomes() {
return bypassNone.fullySupports3DBiomes();
}

@Override
public BiomeType getBiome(BlockVector3 position) {
return bypassNone.getBiome(position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ public List<? extends Entity> getEntities(Region region) {
return extent.getEntities(region);
}

@Override
public boolean fullySupports3DBiomes() {
return extent.fullySupports3DBiomes();
}

@Override
public BiomeType getBiome(BlockVector3 position) {
return extent.getBiome(position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B
return false;
}

@Override
public boolean fullySupports3DBiomes() {
return false;
}

@Override
public boolean setBiome(BlockVector3 position, BiomeType biome) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public interface OutputExtent {
* </p>
*
* @return if the extent fully supports 3D biomes
* @deprecated All supported platforms now support this, the check is no longer necessary
*/
@Deprecated
default boolean fullySupports3DBiomes() {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@

/**
* Handles quirks when placing biomes.
*
* @deprecated This extent currently performs no functions.
*/
@Deprecated
public class BiomeQuirkExtent extends AbstractDelegateExtent {

/**
Expand All @@ -40,11 +43,6 @@ public BiomeQuirkExtent(Extent extent) {

@Override
public boolean setBiome(BlockVector3 position, BiomeType biome) {
boolean success = false;
if (!fullySupports3DBiomes()) {
// Also place at Y = 0 for proper handling
success = super.setBiome(position.withY(0), biome);
}
return super.setBiome(position, biome) || success;
return super.setBiome(position, biome);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ public <T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T
return getExtent().setBlock(position, block);
}

@Override
public boolean fullySupports3DBiomes() {
return getExtent().fullySupports3DBiomes();
}

@Override
public boolean setBiome(BlockVector3 position, BiomeType biome) {
return getExtent().setBiome(position, biome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ public boolean clearContainerBlockContents(BlockVector3 position) {
return false;
}

@Override
public boolean fullySupports3DBiomes() {
return false;
}

@Override
public BiomeType getBiome(BlockVector3 position) {
return BiomeTypes.THE_VOID;
Expand Down

0 comments on commit 4d3d820

Please sign in to comment.