public abstract class ReplacingWorldFeature extends Object implements WorldFeature, BlockFilter
WorldFeature to quickly check if a block can be replaced.AIR, REPLACEABLE| Constructor and Description |
|---|
ReplacingWorldFeature() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allNeighborsMatch(org.cloudburstmc.api.level.ChunkManager level,
int x,
int y,
int z,
BlockFilter filter)
Checks whether all the blocks that horizontally neighbor the given coordinates match the given
BlockFilter. |
boolean |
allNeighborsMatch(org.cloudburstmc.api.level.ChunkManager level,
int x,
int y,
int z,
BlockFilter filter,
org.cloudburstmc.api.util.Direction except)
Checks whether all the blocks that horizontally neighbor the given coordinates match the given
BlockFilter. |
void |
replaceGrassWithDirt(org.cloudburstmc.api.level.ChunkManager level,
int x,
int y,
int z)
Replaces the block at the given coordinates with dirt if it is a grassy block type.
|
boolean |
test(org.cloudburstmc.api.block.BlockState state) |
boolean |
testOrLiquid(org.cloudburstmc.api.block.BlockState state) |
boolean |
testOrLiquid(int runtimeId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitplacepublic boolean test(org.cloudburstmc.api.block.BlockState state)
test in interface Predicate<org.cloudburstmc.api.block.BlockState>test in interface BlockFilterpublic boolean testOrLiquid(org.cloudburstmc.api.block.BlockState state)
public boolean testOrLiquid(int runtimeId)
public void replaceGrassWithDirt(org.cloudburstmc.api.level.ChunkManager level,
int x,
int y,
int z)
The following blocks are considered "grassy":
- BlockIds.GRASS
- BlockIds.MYCELIUM
- BlockIds.PODZOL
public boolean allNeighborsMatch(org.cloudburstmc.api.level.ChunkManager level,
int x,
int y,
int z,
BlockFilter filter)
BlockFilter.public boolean allNeighborsMatch(org.cloudburstmc.api.level.ChunkManager level,
int x,
int y,
int z,
BlockFilter filter,
org.cloudburstmc.api.util.Direction except)
BlockFilter.Copyright © 2021. All rights reserved.