Package forgottentowns.mod.api
Interface EquipmentTransform
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Pure conversion hook. The engine owns input consumption, output identity and persistence.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordSelected equipment and its conversion rule, validated by the host before invoking a handler. -
Method Summary
Modifier and TypeMethodDescriptionbooleanproducesOutput(EquipmentTransform.Input input, IntSupplier percentile) Chooses whether the configured single output is produced; failure still destroys the input.
-
Method Details
-
producesOutput
Chooses whether the configured single output is produced; failure still destroys the input. The hook must be deterministic and must not mutate game state or use another random source.- Parameters:
input- immutable selected equipment and authored rulepercentile- deterministic draws in the inclusive range 0 to 99- Returns:
- whether to produce exactly one configured output resource
-