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(EntityPredicate.Extended player,
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) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final Block block
private final StatePredicate state
private final LocationPredicate location
private final ItemPredicate item
public Conditions(EntityPredicate.Extended player, @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 JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions