@Suppress("unused")
@EventBusSubscriber( modid = Katton.MOD_ID, value = [Dist.DEDICATED_SERVER] )
modidChunk, block, and explosion events for NeoForge platform.
This object provides events related to chunk loading/unloading, block breaking/placing, and explosions.
ChunkAndBlockEvent.onChunkLoad
val onChunkLoadEvent triggered when a chunk is loaded.
ChunkAndBlockEvent.onChunkUnload
val onChunkUnloadEvent triggered when a chunk is unloaded.
ChunkAndBlockEvent.onChunkDataLoad
val onChunkDataLoadEvent triggered when chunk data is loaded from disk.
ChunkAndBlockEvent.onChunkDataSave
val onChunkDataSaveEvent triggered when chunk data is saved to disk.
ChunkAndBlockEvent.onChunkWatch
val onChunkWatchEvent triggered when a player starts watching a chunk.
ChunkAndBlockEvent.onChunkSent
val onChunkSentEvent triggered when a chunk is sent to a player.
ChunkAndBlockEvent.onChunkUnWatch
val onChunkUnWatchEvent triggered when a player stops watching a chunk.
ChunkAndBlockEvent.onChunkLevelTypeChange
@JvmField
@JvmField val onChunkLevelTypeChangeEvent triggered when a chunk's level type changes. Note: This is a placeholder for NeoForge compatibility.
ChunkAndBlockEvent.onBlockEntityLoad
@JvmField
@JvmField val onBlockEntityLoadEvent triggered when a block entity is loaded. Note: This is a placeholder for NeoForge compatibility.
ChunkAndBlockEvent.onBlockEntityUnload
@JvmField
@JvmField val onBlockEntityUnloadEvent triggered when a block entity is unloaded. Note: This is a placeholder for NeoForge compatibility.
ChunkAndBlockEvent.onBlockBreak
val onBlockBreakEvent triggered when a player breaks a block. Can be cancelled to prevent the break.
ChunkAndBlockEvent.onBlockPlace
val onBlockPlaceEvent triggered when a player places a block. Can be cancelled to prevent the placement.
ChunkAndBlockEvent.onExplosionStart
val onExplosionStartEvent triggered when an explosion starts. Can be cancelled to prevent the explosion.
ChunkAndBlockEvent.onExplosionDetonate
val onExplosionDetonateEvent triggered when an explosion detonates. Use this to modify affected blocks/entities.
ChunkAndBlockEvent.NeoChunkDataLoadArg
data class NeoChunkDataLoadArg( val level: ServerLevel, val chunk: ChunkAccess, val data: SerializableChunkData, val type: ChunkType )Argument class for NeoForge chunk data load events.
Properties
| Property | Description |
|---|---|
level | The server level |
chunk | The chunk being loaded |
data | The serializable chunk data |
type | The chunk type |
ChunkAndBlockEvent.NeoChunkDataSaveArg
data class NeoChunkDataSaveArg( val level: ServerLevel, val chunk: ChunkAccess, val data: SerializableChunkData )Argument class for NeoForge chunk data save events.
Properties
| Property | Description |
|---|---|
level | The server level |
chunk | The chunk being saved |
data | The serializable chunk data |
ChunkAndBlockEvent.NeoChunkWatchArg
data class NeoChunkWatchArg( val player: ServerPlayer, val level: ServerLevel, val chunk: LevelChunk )Argument class for NeoForge chunk watch events.
Properties
| Property | Description |
|---|---|
player | The player watching the chunk |
level | The server level |
chunk | The level chunk being watched |
ChunkAndBlockEvent.NeoChunkUnWatchArg
data class NeoChunkUnWatchArg( val player: ServerPlayer, val level: ServerLevel, val pos: ChunkPos )Argument class for NeoForge chunk unwatch events.
Properties
| Property | Description |
|---|---|
player | The player stopping watching the chunk |
level | The server level |
pos | The chunk position |