Class WorldEventInstance
java.lang.Object
team.lodestar.lodestone.systems.worldevent.WorldEventInstance
World events are tickable instanced objects which are saved in a level capability, which means they are unique per dimension.
They can exist on the client and are ticked separately.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends WorldEventInstance>
TdeserializeDefaultWorldEventNBT(T instance, net.minecraft.nbt.CompoundTag tag) voidend(net.minecraft.world.level.Level level) booleanShould this event exist on the client? It will be automatically synced insync(Level)net.minecraft.nbt.CompoundTagserializeNBT(net.minecraft.nbt.CompoundTag tag) voidstart(net.minecraft.world.level.Level level) voidsync(net.minecraft.world.level.Level level) Syncs the world event to all players.static <T extends WorldEventInstance>
voidsync(T instance) static <T extends WorldEventInstance>
voidsync(T instance, net.minecraft.server.level.ServerPlayer player) voidtick(net.minecraft.world.level.Level level)
-
Field Details
-
uuid
-
type
-
discarded
public boolean discarded
-
-
Constructor Details
-
WorldEventInstance
-
-
Method Details
-
sync
public void sync(net.minecraft.world.level.Level level) Syncs the world event to all players. -
isClientSynced
public boolean isClientSynced()Should this event exist on the client? It will be automatically synced insync(Level) -
start
public void start(net.minecraft.world.level.Level level) -
tick
public void tick(net.minecraft.world.level.Level level) -
end
public void end(net.minecraft.world.level.Level level) -
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT(net.minecraft.nbt.CompoundTag tag) -
deserializeDefaultWorldEventNBT
public static <T extends WorldEventInstance> T deserializeDefaultWorldEventNBT(T instance, net.minecraft.nbt.CompoundTag tag) -
sync
-
sync
public static <T extends WorldEventInstance> void sync(T instance, net.minecraft.server.level.ServerPlayer player)
-