public class BlockPredicate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BlockPredicate.Builder |
Modifier and Type | Field and Description |
---|---|
static BlockPredicate |
ANY |
private Block |
block |
private NbtPredicate |
nbt |
private StatePredicate |
state |
private Tag<Block> |
tag |
Constructor and Description |
---|
BlockPredicate(Tag<Block> tag,
Block block,
StatePredicate state,
NbtPredicate nbt) |
Modifier and Type | Method and Description |
---|---|
static BlockPredicate |
fromJson(JsonElement json) |
boolean |
test(ServerWorld world,
BlockPos pos) |
JsonElement |
toJson() |
public static final BlockPredicate ANY
private final StatePredicate state
private final NbtPredicate nbt
public BlockPredicate(@Nullable Tag<Block> tag, @Nullable Block block, StatePredicate state, NbtPredicate nbt)
public boolean test(ServerWorld world, BlockPos pos)
public static BlockPredicate fromJson(@Nullable JsonElement json)
public JsonElement toJson()