Class WorldEventType.Builder<T extends WorldEventInstance>
java.lang.Object
team.lodestar.lodestone.systems.worldevent.WorldEventType.Builder<T>
- Enclosing class:
WorldEventType
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the WorldEventType with the specified parameters.Sets the event to be client-synced without assigning a renderer.clientSynced(WorldEventRenderer<T> renderer) Sets the event to be client-synced and assigns a renderer for the event.static <T extends WorldEventInstance>
WorldEventType.Builder<T> of(WorldEventType.EventInstanceSupplier<T> supplier, net.minecraft.resources.ResourceLocation id) Creates a new world event type.
-
Method Details
-
of
public static <T extends WorldEventInstance> WorldEventType.Builder<T> of(WorldEventType.EventInstanceSupplier<T> supplier, net.minecraft.resources.ResourceLocation id) Creates a new world event type.- Parameters:
supplier- The supplier for the event instance.id- The ID of the event type.- Returns:
- A new Builder instance for the specified event type.
-
clientSynced
Sets the event to be client-synced and assigns a renderer for the event. The event will be automatically synced upon creation inWorldEventInstance.sync(net.minecraft.world.level.Level).- Parameters:
renderer- The renderer for the event. Set to null if you don't want a renderer for this world event.- Returns:
- The builder instance with the clientSynced flag set and the renderer assigned.
-
clientSynced
Sets the event to be client-synced without assigning a renderer. The event will be automatically synced upon creation inWorldEventInstance.sync(net.minecraft.world.level.Level).If you want to use a renderer, use
clientSynced(WorldEventRenderer).- Returns:
- The builder instance with the clientSynced flag set and no renderer assigned.
-
build
Builds the WorldEventType with the specified parameters. Registers the renderer if it is set.- Returns:
- The built WorldEventType.
-