Class GroupRecipe.Matter
-
- All Implemented Interfaces:
-
io.github.sakaki_aruka.customcrafter.matter.CMatter
public final class GroupRecipe.Matter implements CMatter
- Since:
5.0.15
-
-
Field Summary
Fields Modifier and Type Field Description public final static CMatterPredicateoriginalCheckerprivate final Stringnameprivate final Set<Material>candidateprivate final Integeramountprivate final BooleananyAmountprivate final List<CMatterPredicate>predicatesprivate final CMatteroriginal
-
Method Summary
Modifier and Type Method Description StringgetName()Name of this matter. Set<Material>getCandidate()Set of acceptable Material types for this slot. IntegergetAmount()Required item count. BooleangetAnyAmount()If true, any input amount ≥ 1 is accepted regardless of amount.List<CMatterPredicate>getPredicates()List of additional CMatterPredicate checks that run during slot matching. final CMattergetOriginal()UnitisValidMatter()Validates this matter. final static GroupRecipe.Matterof(CMatter matter, Boolean includeAir)Create Matter instance from CMatter. final static GroupRecipe.Matterof(CMatter matter)Create Matter instance from CMatter. -
-
Method Detail
-
getCandidate
Set<Material> getCandidate()
Set of acceptable Material types for this slot.
-
getAmount
Integer getAmount()
Required item count. Ignored when anyAmount is
true. Must be 1 or greater.
-
getAnyAmount
Boolean getAnyAmount()
If
true, any input amount ≥ 1 is accepted regardless of amount. Iffalse, input must have at least amount items.
-
getPredicates
List<CMatterPredicate> getPredicates()
List of additional CMatterPredicate checks that run during slot matching.
nullor empty means no additional conditions.Ordered, so an unnamed predicate can be reported by its index in diagnostic logs.
-
getOriginal
final CMatter getOriginal()
-
isValidMatter
Unit isValidMatter()
Validates this matter.
-
of
@JvmOverloads() final static GroupRecipe.Matter of(CMatter matter, Boolean includeAir)
- Parameters:
matter- Base matterincludeAir- Add 'Material.- Since:
5.0.15
-
of
@JvmOverloads() final static GroupRecipe.Matter of(CMatter matter)
- Parameters:
matter- Base matter- Since:
5.0.15
-
-
-
-