public static class PlacedBlockCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private Block |
block |
private ItemPredicate |
item |
private LocationPredicate |
location |
private StatePredicate |
state |
Constructor and Description |
---|
Conditions(Block block,
StatePredicate state,
LocationPredicate location,
ItemPredicate item) |
Modifier and Type | Method and Description |
---|---|
static PlacedBlockCriterion.Conditions |
block(Block block) |
boolean |
matches(BlockState state,
BlockPos pos,
ServerWorld world,
ItemStack stack) |
JsonElement |
toJson() |
getId, toString
private final Block block
private final StatePredicate state
private final LocationPredicate location
private final ItemPredicate item
public Conditions(@Nullable Block block, StatePredicate state, LocationPredicate location, ItemPredicate item)
public static PlacedBlockCriterion.Conditions block(Block block)
public boolean matches(BlockState state, BlockPos pos, ServerWorld world, ItemStack stack)
public JsonElement toJson()