Class WorldEvents

java.lang.Object
net.fabricmc.yarn.constants.WorldEvents

public final class WorldEvents
extends Object
Constants of World Event IDs.

World Events are used to trigger things on the client from the server side. Most commonly, playing sound events or spawning particles.

Some events have an extra data integer sent alongside them.
Some events are global, meaning they will be sent to every player regardless of their position.

Events are sent from the server to the client using WorldEventS2CPacket, received on the client by ClientPlayNetworkHandler#onWorldEvent, synced by ClientWorld#syncWorldEvent and ClientWorld#syncGlobalEvent (for regular and global events respectively), and finally processed by WorldRenderer#processWorldEvent and WorldRenderer#processGlobalEvent (for regular and global events respectively).