public static class ItemUsedOnBlockCriterion.Conditions extends AbstractCriterionConditions
Modifier and Type | Field and Description |
---|---|
private ItemPredicate |
item |
private LocationPredicate |
location |
Constructor and Description |
---|
Conditions(EntityPredicate.Extended extended,
LocationPredicate location,
ItemPredicate item) |
Modifier and Type | Method and Description |
---|---|
static ItemUsedOnBlockCriterion.Conditions |
create(LocationPredicate.Builder builder,
ItemPredicate.Builder builder2) |
boolean |
test(BlockState state,
ServerWorld world,
BlockPos pos,
ItemStack stack) |
JsonObject |
toJson(AdvancementEntityPredicateSerializer predicateSerializer) |
getId, getPlayerPredicate, toString
private final LocationPredicate location
private final ItemPredicate item
public Conditions(EntityPredicate.Extended extended, LocationPredicate location, ItemPredicate item)
public static ItemUsedOnBlockCriterion.Conditions create(LocationPredicate.Builder builder, ItemPredicate.Builder builder2)
public boolean test(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack)
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer)
toJson
in interface CriterionConditions
toJson
in class AbstractCriterionConditions