PetBehaviorEntry

public final class PetBehaviorEntry extends Record

One line of a pet file's behaviors list: a module by its file name, and the settings this creature gives it.

Constructors

Link copied to clipboard
public void PetBehaviorEntry(String module, Map<String, Object> settings)

Functions

Link copied to clipboard
public static List<PetBehaviorEntry> overlay(List<PetBehaviorEntry> species, List<PetBehaviorEntry> variant)
A variant's entries over its species' list: a module both lists name keeps its place and takes the variant's settings on top of the species', except that a setting the variant leaves without a value keeps the species' value when it has one; the variant's other modules follow the species' own.
Link copied to clipboard
public static List<PetBehaviorEntry> read(Object raw, String where, Consumer<String> warn)
Reads a behaviors list: each item is a module name, or a one-key map from a module name to its settings.

Inherited functions

Link copied to clipboard
public abstract boolean equals(Object p)
Link copied to clipboard
public abstract int hashCode()
Link copied to clipboard
public abstract String toString()