Package net.minecraftforge.event.world
package net.minecraftforge.event.world
-
ClassDescriptionThis event fires when a Biome is created from json or when a registered biome is re-created for worldgen.Fired when when this block is right clicked by a tool to change its state.Event that is fired when an Block is about to be broken by a player Canceling this event will prevent the Block from being broken.Fired to check whether a non-source block can turn into a source block.Fired when a crop block grows.Fired when "growing age" blocks (for example cacti, chorus plants, or crops in vanilla) have successfully grown.Fired when any "growing age" blocks (for example cacti, chorus plants, or crops in vanilla) attempt to advance to the next growth age state during a random tick.
Event.Result.DEFAULT
will pass on to the vanilla growth mechanics.
Event.Result.ALLOW
will force the plant to advance a growth stage.
Event.Result.DENY
will prevent the plant from advancing a growth stage.
This event is notCancelable
.
Fired when a single block placement triggers the creation of multiple blocks(e.g.Called when a block is placed.Fired when when farmland gets trampled This event isCancelable
Fired when a liquid places a block.Fired when a physics update occurs on a block.ChunkDataEvent is fired when an event involving chunk data occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
ChunkDataEvent.data
contains the NBTTagCompound containing the chunk data for this event.
All children of this event are fired on theMinecraftForge.EVENT_BUS
.ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.
This event is fired during chunk loading in {@link net.minecraft.world.chunk.storage.ChunkSerializer.read(ServerWorld, TemplateManager, PointOfInterestManager, ChunkPos, CompoundNBT)} which means it is async, so be careful.
This event is notCancelable
.
This event does not have a result.ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.
This event is fired during chunk saving inAnvilChunkLoader#saveChunk(World, Chunk)
.ChunkEvent is fired when an event involving a chunk occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
ChunkEvent.chunk
contains the Chunk this event is affecting.
All children of this event are fired on theMinecraftForge.EVENT_BUS
.ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the world.
This event is fired during chunk loading in
ChunkProviderClient#loadChunk(int, int)
,
Chunk.onChunkLoad().ChunkEvent.Unload is fired when vanilla Minecraft attempts to unload a Chunk from the world.
This event is fired during chunk unloading in
Chunk.onChunkUnload().ChunkWatchEvent is fired when an event involving a chunk being watched occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
ChunkWatchEvent.pos
contains the ChunkPos of the Chunk this event is affecting.
ChunkWatchEvent.world
contains the World of the Chunk this event is affecting.
ChunkWatchEvent.player
contains the EntityPlayer that is involved with this chunk being watched.ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.
This event is fired when a chunk is removed from the watched chunks of an EntityPlayer innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient
.ChunkWatchEvent.Watch is fired when an EntityPlayer begins watching a chunk.
This event is fired when a chunk is added to the watched chunks of an EntityPlayer innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient
.ExplosionEvent triggers when an explosion happens in the world.
ExplosionEvent.Start is fired before the explosion actually occurs.
ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities.
ExplosionEvent.Start isCancelable
.
ExplosionEvent.Detonate can modify the affected blocks and entities.
Children do not useEvent.HasResult
.
Children of this event are fired on theMinecraftForge.EVENT_BUS
.ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities.ExplosionEvent.Start is fired before the explosion actually occurs.Base class for Noteblock EventsFired when a Noteblock is changed.Information about the pitch of a Noteblock note.Describes the Octave of a Note being played by a Noteblock.Fired when a Noteblock plays it's note.Base piston event, usePistonEvent.Post
andPistonEvent.Pre
Fires after the piston has moved and set surrounding states.Fires before the piston has updated block states.SaplingGrowTreeEvent is fired when a sapling grows into a tree.
This event is fired during sapling growth inBlockSapling#generateTree(World, BlockPos, IBlockState, Random)
.
SaplingGrowTreeEvent.pos
contains the coordinates of the growing sapling.This event is fired when all players are asleep and the time should be set to day.
setWakeUpTime(wakeUpTime) sets a new time that will be added to the dayTime.This event fires when a Structure is gathering what mobs/creatures can spawn in it.WorldEvent is fired when an event involving the world occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
WorldEvent.world
contains the World this event is occurring in.
All children of this event are fired on theMinecraftForge#EVENT_BUS
.Called by WorldServer when it attempts to create a spawnpoint for a dimension.WorldEvent.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)
.Called by WorldServer to gather a list of all possible entities that can spawn at the specified location.WorldEvent.Save is fired when Minecraft saves a world.
This event is fired when a world is saved inWorldServer#saveAllChunks(boolean, IProgressUpdate)
,ForgeInternalHandler#onDimensionSave(Save)
.WorldEvent.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)
.