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(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(ChunkManager level,
int x,
int y,
int z,
BlockFilter filter,
Direction except)
Checks whether all the blocks that horizontally neighbor the given coordinates match the given
BlockFilter. |
void |
replaceGrassWithDirt(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(BlockState state) |
boolean |
testOrLiquid(BlockState state) |
boolean |
testOrLiquid(int runtimeId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitplacepublic boolean test(BlockState state)
test in interface Predicate<BlockState>test in interface BlockFilterpublic boolean testOrLiquid(BlockState state)
public boolean testOrLiquid(int runtimeId)
public void replaceGrassWithDirt(ChunkManager level, int x, int y, int z)
The following blocks are considered "grassy":
- BlockIds.GRASS
- BlockIds.MYCELIUM
- BlockIds.PODZOL
public boolean allNeighborsMatch(ChunkManager level, int x, int y, int z, BlockFilter filter)
BlockFilter.public boolean allNeighborsMatch(ChunkManager level, int x, int y, int z, BlockFilter filter, Direction except)
BlockFilter.Copyright © 2020. All rights reserved.