Package net.minecraftforge.event.world
Class WorldEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.WorldEvent
-
- Direct Known Subclasses:
ChunkEvent,SaplingGrowTreeEvent,SleepFinishedTimeEvent,WorldEvent.CreateSpawnPosition,WorldEvent.Load,WorldEvent.PotentialSpawns,WorldEvent.Save,WorldEvent.Unload
public class WorldEvent extends net.minecraftforge.eventbus.api.EventWorldEvent is fired when an event involving the world occurs.
If a method utilizes thisEventas its parameter, the method will receive every child event of this class.
worldcontains the World this event is occurring in.
All children of this event are fired on theMinecraftForge#EVENT_BUS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorldEvent.CreateSpawnPositionCalled by WorldServer when it attempts to create a spawnpoint for a dimension.static classWorldEvent.LoadWorldEvent.Load is fired when Minecraft loads a world.
This event is fired when a world is loaded inWorldClient#WorldClient(NetHandlerPlayClient, WorldSettings, int, EnumDifficulty, Profiler),MinecraftServer#loadAllWorlds(String, String, long, WorldType, String),IntegratedServer#loadAllWorlds(String, String, long, WorldType, String)DimensionManager#initDimension(int), andForgeInternalHandler#onDimensionLoad(Load).static classWorldEvent.PotentialSpawnsCalled by WorldServer to gather a list of all possible entities that can spawn at the specified location.static classWorldEvent.SaveWorldEvent.Save is fired when Minecraft saves a world.
This event is fired when a world is saved inWorldServer#saveAllChunks(boolean, IProgressUpdate),ForgeInternalHandler#onDimensionSave(Save).static classWorldEvent.UnloadWorldEvent.Unload is fired when Minecraft unloads a world.
This event is fired when a world is unloaded inMinecraft#loadWorld(WorldClient, String),MinecraftServer.stopServer(),DimensionManager#unloadWorlds(),ForgeInternalHandler#onDimensionUnload(Unload).
-
Constructor Summary
Constructors Constructor Description WorldEvent(IWorld world)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IWorldgetWorld()
-