Contents
Interface ModifyEvent<T>
- Type Parameters:
T- The container entry type.
- All Superinterfaces:
IBaseEvent<Content.Type>, IEvent<Content.Type>
- All Known Implementing Classes:
ModifyEvents.BiomeCovers, ModifyEvents.BiomeDynamicLayers, ModifyEvents.BiomeEnvironments, ModifyEvents.BiomeFluids, ModifyEvents.BiomePrefabs, ModifyEvents.BiomeStaticLayers, ModifyEvents.BiomeTints, ModifyEvents.CaveCovers, ModifyEvents.CavePrefabs, ModifyEvents.CaveTypes
Event interface for a series of world-gen content modification hooks that are fired for
Zone and Biome containers during the loading process to allow for the addition and removal
of entries that are not included in the base asset file.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for loading content from a given path.static classModifyEvent.SeedGenerator<K extends SeedStringResource>Util for generating uniqueSeedStringinstances based on a counter. -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends ModifyEvent<?>>
voidHelper for posting a loading event and propagating errors thrown during handling of the event.entries()Get the mutable list of entries.FileContext<?> file()Get the file context for this event.loader()Get the content loader for this event.seed()type()Get the type of event.
-
Method Details
-
seed
SeedString<SeedStringResource> seed() -
type
-
file
-
entries
-
loader
Get the content loader for this event.- Returns:
- the content loader used to load entries from a world-gen asset path.
-
dispatch
static <E extends ModifyEvent<?>> void dispatch(@Nonnull Class<E> type, @Nonnull E event) throws Error Helper for posting a loading event and propagating errors thrown during handling of the event.- Type Parameters:
E- The type of event.- Parameters:
type- The type of event to post.event- The event to post.- Throws:
Error- Propagates any errors thrown during event handling.
-