@JvmInline
value class ServerArg(val server: MinecraftServer)Argument for server-level events.
Properties
| Property | Description |
|---|---|
server | The MinecraftServer instance |
Common
@JvmInline
value class ServerArg(val server: MinecraftServer)Argument for server-level events.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
data class SyncDatapackContentsArg( val player: ServerPlayer, val joined: Boolean )Argument for datapack contents synchronization event.
| Property | Description |
|---|---|
player | The player receiving the sync |
joined | Whether this sync is due to player joining |
data class StartDatapackReloadArg( val server: MinecraftServer, val resourceManager: ResourceManager )Argument for datapack reload start event.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
resourceManager | The resource manager being reloaded |
data class EndDatapackReloadArg( val server: MinecraftServer, val resourceManager: ResourceManager, val success: Boolean )Argument for datapack reload end event.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
resourceManager | The resource manager that was reloaded |
success | Whether the reload completed successfully |
data class ServerSaveArg( val server: MinecraftServer, val flush: Boolean, val force: Boolean )Argument for server save event.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
flush | Whether data should be flushed to disk |
force | Whether this is a forced save |
@JvmInline
value class ServerTickArg(val server: MinecraftServer)Argument for server tick event.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
@JvmInline
value class WorldTickArg(val world: ServerLevel)Argument for world tick event.
| Property | Description |
|---|---|
world | The ServerLevel being ticked |
data class EntityLoadArg( val entity: Entity, val world: ServerLevel ): CancellableEventArg()Argument for entity load event.
Triggered when an entity is loaded into a world. Can be cancelled to prevent the entity from loading.
| Property | Description |
|---|---|
entity | The entity being loaded |
world | The ServerLevel the entity is loading into |
data class EntityUnloadArg( val entity: Entity, val world: ServerLevel )Argument for entity unload event.
Triggered when an entity is unloaded from a world.
| Property | Description |
|---|---|
entity | The entity being unloaded |
world | The ServerLevel the entity is unloading from |
data class EquipmentChangeArg( val entity: LivingEntity, val slot: EquipmentSlot, val from: ItemStack, val to: ItemStack )Argument for equipment change event.
Triggered when a living entity's equipment changes.
| Property | Description |
|---|---|
entity | The entity whose equipment changed |
slot | The equipment slot that changed |
from | The previous ItemStack in the slot |
to | The new ItemStack in the slot |
data class ChunkLoadArg( val world: ServerLevel, val chunk: LevelChunk, val generated: Boolean )Argument for chunk load event.
| Property | Description |
|---|---|
world | The ServerLevel containing the chunk |
chunk | The LevelChunk that was loaded |
generated | Whether the chunk was newly generated |
data class ChunkUnloadArg( val world: ServerLevel, val chunk: LevelChunk )Argument for chunk unload event.
| Property | Description |
|---|---|
world | The ServerLevel containing the chunk |
chunk | The LevelChunk being unloaded |
data class ChunkStatusChangeArg( val world: ServerLevel, val chunk: LevelChunk, val oldStatus: FullChunkStatus, val newStatus: FullChunkStatus )Argument for chunk status change event.
Triggered when a chunk's loading status changes.
| Property | Description |
|---|---|
world | The ServerLevel containing the chunk |
chunk | The LevelChunk whose status changed |
oldStatus | The previous chunk status |
newStatus | The new chunk status |
data class BlockEntityLoadArg( val blockEntity: BlockEntity, val world: ServerLevel )Argument for block entity load event.
| Property | Description |
|---|---|
blockEntity | The BlockEntity that was loaded |
world | The ServerLevel containing the block entity |
data class BlockBreakArg( val world: Level, val player: Player, val pos: BlockPos, val state: BlockState, val blockEntity: BlockEntity?, ) : CancellableEventArg()Argument for block break event.
Can be cancelled to prevent the block from being broken.
| Property | Description |
|---|---|
world | The Level containing the block |
player | The player breaking the block |
pos | The position of the block |
state | The BlockState being broken |
blockEntity | The BlockEntity at the position, if any |
data class BlockPlaceArg( val world: Level, val player: Player?, val pos: BlockPos, val state: BlockState, val blockEntity: BlockEntity? ): CancellableEventArg()Argument for block place event.
Can be cancelled to prevent the block from being placed.
| Property | Description |
|---|---|
world | The Level where the block is being placed |
player | The player placing the block (may be null for non-player placement) |
pos | The position where the block is being placed |
state | The BlockState being placed |
blockEntity | The BlockEntity being placed, if any |
data class UseItemOnArg( val stack: ItemStack, val state: BlockState, val world: Level, val pos: BlockPos, val player: Player, val hand: InteractionHand, val hitResult: BlockHitResult )Argument for item use on block event.
| Property | Description |
|---|---|
stack | The ItemStack being used |
state | The BlockState of the block being interacted with |
world | The Level containing the block |
pos | The position of the block |
player | The player using the item |
hand | The hand holding the item |
hitResult | The block hit result containing face and position details |
data class UseWithoutItemOnArg( val state: BlockState, val world: Level, val pos: BlockPos, val player: Player, val hitResult: BlockHitResult )Argument for block interaction without item event.
| Property | Description |
|---|---|
state | The BlockState of the block being interacted with |
world | The Level containing the block |
pos | The position of the block |
player | The player interacting with the block |
hitResult | The block hit result |
data class AllowEnchantingArg( val enchantment: Holder<Enchantment>, val target: ItemStack, val context: EnchantingContext )Argument for enchantment allowance check event.
Used to determine if an enchantment can be applied to an item.
| Property | Description |
|---|---|
enchantment | The enchantment being checked |
target | The target ItemStack |
context | The enchanting context (PRIMARY or ACCEPTABLE) |
data class ModifyEnchantmentArg( val key: ResourceKey<Enchantment>, val builder: Enchantment.Builder )Argument for enchantment modification event.
| Property | Description |
|---|---|
key | The ResourceKey of the enchantment being modified |
builder | The Enchantment.Builder for modification |
data class ElytraAllowArg(val entity: LivingEntity)Argument for elytra flight allowance check.
| Property | Description |
|---|---|
entity | The entity attempting to use elytra flight |
data class ElytraCustomArg( val entity: LivingEntity, val tickElytra: Boolean )Argument for custom elytra flight event.
| Property | Description |
|---|---|
entity | The entity using elytra flight |
tickElytra | Whether vanilla elytra tick logic should run |
data class AllowSleepingArg( val entity: LivingEntity, val pos: BlockPos )Argument for sleeping allowance check.
| Property | Description |
|---|---|
entity | The entity attempting to sleep |
pos | The position of the bed |
data class SleepingArg( val entity: LivingEntity, val pos: BlockPos )Argument for sleeping event.
| Property | Description |
|---|---|
entity | The entity that is sleeping |
pos | The position of the bed |
data class AllowBedArg( val entity: LivingEntity, val pos: BlockPos, val state: BlockState, val vanillaResult: Boolean )Argument for bed usage allowance check.
| Property | Description |
|---|---|
entity | The entity attempting to use the bed |
pos | The position of the bed |
state | The BlockState of the bed |
vanillaResult | The vanilla game's result for this check |
data class AllowNearbyMonstersArg( val entity: Player, val pos: BlockPos, val vanillaResult: Boolean )Argument for nearby monsters check during sleeping.
| Property | Description |
|---|---|
entity | The player attempting to sleep |
pos | The position of the bed |
vanillaResult | The vanilla game's result for this check |
data class AllowResettingTimeArg(val player: Player)Argument for time reset allowance check.
| Property | Description |
|---|---|
player | The player attempting to reset the time |
data class ModifySleepingDirectionArg( val entity: LivingEntity, val pos: BlockPos, val direction: Direction? )Argument for sleeping direction modification.
| Property | Description |
|---|---|
entity | The entity sleeping |
pos | The position of the bed |
direction | The direction the entity is facing while sleeping |
data class AllowSettingSpawnArg( val entity: LivingEntity, val pos: BlockPos )Argument for spawn point setting allowance.
| Property | Description |
|---|---|
entity | The entity whose spawn point is being set |
pos | The position of the spawn point |
data class SetBedOccupationStateArg( val entity: LivingEntity, val pos: BlockPos, val state: BlockState, val occupied: Boolean )Argument for bed occupation state change.
| Property | Description |
|---|---|
entity | The entity occupying the bed |
pos | The position of the bed |
state | The BlockState of the bed |
occupied | Whether the bed is now occupied |
data class ModifyWakeUpPositionArg( val entity: LivingEntity, val sleepingPos: BlockPos, val bedState: BlockState, val wakeUpPos: Vec3? )Argument for wake-up position modification.
| Property | Description |
|---|---|
entity | The entity waking up |
sleepingPos | The position where the entity was sleeping |
bedState | The BlockState of the bed |
wakeUpPos | The calculated wake-up position (may be modified) |
data class ItemUseOnArg(val context: UseOnContext)Argument for item use on block context.
| Property | Description |
|---|---|
context | The UseOnContext containing all interaction details |
data class ItemUseArg( val world: Level, val player: Player, val hand: InteractionHand )Argument for item use event.
| Property | Description |
|---|---|
world | The Level where the item is being used |
player | The player using the item |
hand | The hand holding the item |
data class LootTableReplaceArg( val key: ResourceKey<LootTable>, val original: LootTable, val registries: HolderLookup.Provider )Argument for loot table replacement event.
| Property | Description |
|---|---|
key | The ResourceKey of the loot table |
original | The original LootTable |
registries | The registry lookup provider |
data class LootTableModifyArg( val key: ResourceKey<LootTable>, val tableBuilder: LootTable.Builder, val registries: HolderLookup.Provider )Argument for loot table modification event.
| Property | Description |
|---|---|
key | The ResourceKey of the loot table |
tableBuilder | The LootTable.Builder for modification |
registries | The registry lookup provider |
data class LootTableAllLoadArg( val resourceManager: ResourceManager, val lootDataManager: Registry<LootTable> )Argument for all loot tables load event.
| Property | Description |
|---|---|
resourceManager | The resource manager |
lootDataManager | The loot data manager registry |
data class LootTableModifyDropsArg( val table: Holder<LootTable>, val context: LootContext, val drops: List<ItemStack> )Argument for loot table drops modification.
| Property | Description |
|---|---|
table | The loot table holder |
context | The loot context for the drop |
drops | The list of dropped ItemStacks (may be modified) |
data class PlayerAttackBlockArg( val player: Player, val world: Level, val hand: InteractionHand, val pos: BlockPos, val direction: Direction, )Argument for player attack block event.
| Property | Description |
|---|---|
player | The player attacking the block |
world | The Level containing the block |
hand | The hand used to attack |
pos | The position of the block being attacked |
direction | The face being attacked |
data class PlayerAttackEntityArg( val player: Player, val world: Level, val hand: InteractionHand, val entity: Entity, val hitResult: EntityHitResult? )Argument for player attack entity event.
| Property | Description |
|---|---|
player | The player attacking |
world | The Level where the attack occurs |
hand | The hand used to attack |
entity | The entity being attacked |
hitResult | The entity hit result |
data class PlayerUseBlockArg( val player: Player, val world: Level, val hand: InteractionHand, val hitResult: BlockHitResult )Argument for player use block event.
| Property | Description |
|---|---|
player | The player interacting |
world | The Level containing the block |
hand | The hand used for interaction |
hitResult | The block hit result |
data class PlayerUseEntityArg( val player: Player, val world: Level, val hand: InteractionHand, val entity: Entity, val hitResult: EntityHitResult? )Argument for player use entity event.
| Property | Description |
|---|---|
player | The player interacting |
world | The Level containing the entity |
hand | The hand used for interaction |
entity | The entity being interacted with |
hitResult | The entity hit result |
data class PlayerUseItemArg( val player: Player, val world: Level, val hand: InteractionHand )Argument for player use item event.
| Property | Description |
|---|---|
player | The player using the item |
world | The Level where the item is used |
hand | The hand holding the item |
data class PlayerPickFromBlockArg( val player: ServerPlayer, val pos: BlockPos, val state: BlockState, val includeData: Boolean )Argument for player pick block event.
| Property | Description |
|---|---|
player | The player picking the block |
pos | The position of the block being picked |
state | The BlockState of the block |
includeData | Whether block entity data should be included |
data class PlayerPickFromEntityArg( val player: ServerPlayer, val entity: Entity, val includeData: Boolean )Argument for player pick entity event.
| Property | Description |
|---|---|
player | The player picking the entity |
entity | The entity being picked |
includeData | Whether entity data should be included |
data class AfterKilledOtherEntityArg( val world: ServerLevel, val entity: Entity, val killedEntity: LivingEntity, val source: DamageSource )Argument for after entity killed another entity event.
| Property | Description |
|---|---|
world | The ServerLevel where the kill occurred |
entity | The killer entity |
killedEntity | The entity that was killed |
source | The damage source that caused the death |
data class AfterEntityChangeLevelArg( val originalEntity: Entity, val destinationEntity: Entity, val originalLevel: ServerLevel, val destinationLevel: ServerLevel )Argument for entity level change event.
| Property | Description |
|---|---|
originalEntity | The entity before level change |
destinationEntity | The entity after level change |
originalLevel | The ServerLevel the entity was in |
destinationLevel | The ServerLevel the entity is now in |
data class AfterPlayerChangeLevelArg( val player: ServerPlayer, val originalLevel: ServerLevel, val destinationLevel: ServerLevel )Argument for player level change event.
| Property | Description |
|---|---|
player | The ServerPlayer who changed level |
originalLevel | The ServerLevel the player was in |
destinationLevel | The ServerLevel the player is now in |
data class AllowDamageArg( val entity: LivingEntity, val source: DamageSource, val amount: Float )Argument for damage allowance check.
| Property | Description |
|---|---|
entity | The entity potentially receiving damage |
source | The damage source |
amount | The damage amount |
data class AfterDamageArg( val entity: LivingEntity, val source: DamageSource, val initialDamage: Float, val finalDamage: Float, val handled: Boolean )Argument for after damage event.
| Property | Description |
|---|---|
entity | The entity that received damage |
source | The damage source |
initialDamage | The damage amount before reductions |
finalDamage | The damage amount after reductions |
handled | Whether the damage was handled |
data class AllowDeathArg( val entity: LivingEntity, val source: DamageSource, val amount: Float )Argument for death allowance check.
| Property | Description |
|---|---|
entity | The entity potentially dying |
source | The damage source causing death |
amount | The damage amount |
data class AfterDeathArg( val entity: LivingEntity, val source: DamageSource )Argument for after death event.
| Property | Description |
|---|---|
entity | The entity that died |
source | The damage source that caused death |
data class MobConversionArg( val oldEntity: Mob, val newEntity: Mob, val keepEquipment: ConversionParams? )Argument for mob conversion event.
| Property | Description |
|---|---|
oldEntity | The original Mob before conversion |
newEntity | The new Mob after conversion |
keepEquipment | Parameters for equipment retention during conversion |
data class AllowChatMessageArg( val message: PlayerChatMessage, val sender: ServerPlayer, val params: Bound )Argument for chat message allowance check.
| Property | Description |
|---|---|
message | The PlayerChatMessage being sent |
sender | The ServerPlayer sending the message |
params | The chat type bound parameters |
data class AllowGameMessageArg( val server: MinecraftServer, val message: Component, val overlay: Boolean )Argument for game message allowance check.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
message | The message Component |
overlay | Whether the message should show as overlay |
data class AllowCommandMessageArg( val message: PlayerChatMessage, val source: CommandSourceStack, val params: Bound )Argument for command message allowance check.
| Property | Description |
|---|---|
message | The PlayerChatMessage from command |
source | The CommandSourceStack executing the command |
params | The chat type bound parameters |
data class ChatMessageArg( val message: PlayerChatMessage, val sender: ServerPlayer, val params: Bound )Argument for chat message event.
| Property | Description |
|---|---|
message | The PlayerChatMessage being sent |
sender | The ServerPlayer sending the message |
params | The chat type bound parameters |
data class GameMessageArg( val server: MinecraftServer, val message: Component, val overlay: Boolean )Argument for game message event.
| Property | Description |
|---|---|
server | The MinecraftServer instance |
message | The message Component |
overlay | Whether the message shows as overlay |
data class CommandMessageArg( val message: PlayerChatMessage, val source: CommandSourceStack, val params: Bound )Argument for command message event.
| Property | Description |
|---|---|
message | The PlayerChatMessage from command |
source | The CommandSourceStack executing the command |
params | The chat type bound parameters |
data class PlayerArg(val player: ServerPlayer)Argument for player-related events.
| Property | Description |
|---|---|
player | The ServerPlayer involved in the event |
data class ServerPlayerAfterRespawnArg( val oldPlayer: ServerPlayer, val newPlayer: ServerPlayer, val alive: Boolean )Argument for player respawn event.
| Property | Description |
|---|---|
oldPlayer | The ServerPlayer before respawn |
newPlayer | The ServerPlayer after respawn |
alive | Whether the player was alive before respawn |
data class ServerPlayerAllowDeathArg( val player: ServerPlayer, val damageSource: DamageSource, val damageAmount: Float )Argument for player death allowance check.
| Property | Description |
|---|---|
player | The ServerPlayer potentially dying |
damageSource | The damage source causing death |
damageAmount | The damage amount |
data class ServerPlayerCopyArg( val oldPlayer: ServerPlayer, val newPlayer: ServerPlayer, val alive: Boolean )Argument for player copy event (dimension change, etc.).
| Property | Description |
|---|---|
oldPlayer | The original ServerPlayer |
newPlayer | The new ServerPlayer copy |
alive | Whether the player was alive during copy |
data class AnimalTameArg( val animal: Animal, val tamer: Player ): CancellableEventArg()Argument for animal tame event.
Can be cancelled to prevent taming.
| Property | Description |
|---|---|
animal | The Animal being tamed |
tamer | The Player taming the animal |
data class BabySpawnArg( val parentA: LivingEntity, val parentB: LivingEntity, val child: AgeableMob? ): CancellableEventArg()Argument for baby spawn event.
Can be cancelled to prevent baby spawning.
| Property | Description |
|---|---|
parentA | The first parent LivingEntity |
parentB | The second parent LivingEntity |
child | The baby AgeableMob (may be null) |
data class CriticalHitArg( val player: Player, val target: Entity, val isVanillaCritical: Boolean )Argument for critical hit event.
| Property | Description |
|---|---|
player | The Player making the attack |
target | The Entity being attacked |
isVanillaCritical | Whether vanilla considers this a critical hit |
data class PlayerWakeUpArg( val player: Player, val wakeImmediately: Boolean, val updateLevelList: Boolean )Argument for player wake up event.
| Property | Description |
|---|---|
player | The Player waking up |
wakeImmediately | Whether to wake immediately |
updateLevelList | Whether to update the level list |
data class EntityTeleportArg( val entity: Entity, val fromX: Double, val fromY: Double, val fromZ: Double, val toX: Double, val toY: Double, val toZ: Double ): CancellableEventArg()Argument for entity teleport event.
Can be cancelled to prevent teleportation.
| Property | Description |
|---|---|
entity | The Entity teleporting |
fromX | The original X coordinate |
fromY | The original Y coordinate |
fromZ | The original Z coordinate |
toX | The destination X coordinate |
toY | The destination Y coordinate |
toZ | The destination Z coordinate |
data class EndermanAngerArg( val enderman: EnderMan, val player: Player ): CancellableEventArg()Argument for enderman anger event.
Can be cancelled to prevent the enderman from becoming angry.
| Property | Description |
|---|---|
enderman | The EnderMan becoming angry |
player | The Player the enderman is targeting |
data class ExplosionStartArg( val level: Level, val explosion: Explosion ): CancellableEventArg()Argument for explosion start event.
Can be cancelled to prevent the explosion.
| Property | Description |
|---|---|
level | The Level where the explosion is starting |
explosion | The Explosion instance |
data class ExplosionDetonateArg( val level: Level, val explosion: Explosion, val affectedEntities: List<Entity> )Argument for explosion detonate event.
| Property | Description |
|---|---|
level | The Level where the explosion is detonating |
explosion | The Explosion instance |
affectedEntities | List of entities affected by the explosion |
data class ItemTossArg( val player: Player, val item: ItemEntity )Argument for item toss event.
| Property | Description |
|---|---|
player | The Player tossing the item |
item | The ItemEntity being tossed |
data class PlayerDestroyItemArg( val player: Player, val item: ItemStack, val hand: InteractionHand? )Argument for item destruction event.
| Property | Description |
|---|---|
player | The Player whose item was destroyed |
item | The ItemStack that was destroyed |
hand | The hand the item was in (may be null) |
data class LivingUseItemStartArg( val entity: LivingEntity, val item: ItemStack, val hand: InteractionHand, val duration: Int ): CancellableEventArg()Argument for item use start event.
Can be cancelled to prevent item use.
| Property | Description |
|---|---|
entity | The LivingEntity starting to use the item |
item | The ItemStack being used |
hand | The hand holding the item |
duration | The initial use duration in ticks |
data class LivingUseItemTickArg( val entity: LivingEntity, val item: ItemStack, var duration: Int ): CancellableEventArg()Argument for item use tick event.
| Property | Description |
|---|---|
entity | The LivingEntity using the item |
item | The ItemStack being used |
duration | The remaining use duration (modifiable) |
data class LivingUseItemStopArg( val entity: LivingEntity, val item: ItemStack, val duration: Int ): CancellableEventArg()Argument for item use stop event.
| Property | Description |
|---|---|
entity | The LivingEntity that stopped using the item |
item | The ItemStack that was being used |
duration | The remaining use duration when stopped |
data class LivingUseItemFinishArg( val entity: LivingEntity, val item: ItemStack, val duration: Int, var result: ItemStack )Argument for item use finish event.
| Property | Description |
|---|---|
entity | The LivingEntity that finished using the item |
item | The ItemStack that was used |
duration | The total use duration in ticks |
result | The resulting ItemStack (modifiable) |
data class NeoPlayerAttackEntityArg( val player: Player, val target: Entity ) : CancellableEventArg()Argument for NeoForge player attack entity event.
Can be cancelled to prevent the attack.
| Property | Description |
|---|---|
player | The Player attacking |
target | The Entity being attacked |
data class NeoPlayerInteractEntityArg( val player: Player, val entity: Entity, val hand: InteractionHand ) : CancellableEventArg()Argument for NeoForge player interact entity event.
Can be cancelled to prevent the interaction.
| Property | Description |
|---|---|
player | The Player interacting |
entity | The Entity being interacted with |
hand | The hand used for interaction |
data class NeoPlayerInteractBlockArg( val player: Player, val pos: BlockPos, val face: Direction?, val hand: InteractionHand ) : CancellableEventArg()Argument for NeoForge player interact block event.
Can be cancelled to prevent the interaction.
| Property | Description |
|---|---|
player | The Player interacting |
pos | The BlockPos being interacted with |
face | The Direction of the face being interacted with |
hand | The hand used for interaction |
data class NeoPlayerInteractItemArg( val player: Player, val hand: InteractionHand ) : CancellableEventArg()Argument for NeoForge player interact item event.
Can be cancelled to prevent the interaction.
| Property | Description |
|---|---|
player | The Player interacting |
hand | The hand holding the item |
data class NeoPlayerLeftClickBlockArg( val player: Player, val pos: BlockPos, val face: Direction? ) : CancellableEventArg()Argument for NeoForge player left click block event.
Can be cancelled to prevent the action.
| Property | Description |
|---|---|
player | The Player left-clicking |
pos | The BlockPos being clicked |
face | The Direction of the face being clicked |
data class PlayerXpChangeArg( val player: Player, val amount: Int ): CancellableEventArg()Argument for player XP change event.
Can be cancelled to prevent the XP change.
| Property | Description |
|---|---|
player | The Player receiving XP |
amount | The amount of XP points being added |
data class PlayerXpLevelChangeArg( val player: Player, val levels: Int ): CancellableEventArg()Argument for player XP level change event.
Can be cancelled to prevent the level change.
| Property | Description |
|---|---|
player | The Player receiving levels |
levels | The number of levels being added |
data class PlayerPickupXpArg( val player: Player, val orb: ExperienceOrb ): CancellableEventArg()Argument for player pickup XP orb event.
Can be cancelled to prevent the pickup.
| Property | Description |
|---|---|
player | The Player picking up the orb |
orb | The ExperienceOrb being picked up |
data class LivingHurtArg( val entity: LivingEntity, val source: DamageSource, val amount: Float ): CancellableEventArg()Argument for living entity hurt event.
Can be cancelled to prevent the damage.
| Property | Description |
|---|---|
entity | The LivingEntity being hurt |
source | The DamageSource causing the hurt |
amount | The damage amount |
data class NeoLivingDamageArg( val entity: LivingEntity, val source: DamageSource, val amount: Float )Argument for NeoForge living damage event.
| Property | Description |
|---|---|
entity | The LivingEntity receiving damage |
source | The DamageSource |
amount | The damage amount |
data class NeoLivingDeathArg( val entity: LivingEntity, val source: DamageSource )Argument for NeoForge living death event.
| Property | Description |
|---|---|
entity | The LivingEntity that died |
source | The DamageSource that caused death |
data class LivingDropsArg( val entity: LivingEntity, val source: DamageSource, val drops: List<ItemStack> ): CancellableEventArg()Argument for living entity drops event.
Can be cancelled to prevent drops.
| Property | Description |
|---|---|
entity | The LivingEntity dropping items |
source | The DamageSource that caused the drops |
drops | The list of ItemStacks being dropped |
data class LivingFallArg( val entity: LivingEntity, val distance: Double, val damageMultiplier: Float ): CancellableEventArg()Argument for living entity fall event.
Can be cancelled to prevent fall damage.
| Property | Description |
|---|---|
entity | The LivingEntity falling |
distance | The fall distance in blocks |
damageMultiplier | The damage multiplier |
@JvmInline
value class LivingJumpArg(val entity: LivingEntity)Argument for living entity jump event.
| Property | Description |
|---|---|
entity | The LivingEntity jumping |
data class ServerChatArg( val player: ServerPlayer, val message: String, val component: Component ) : CancellableEventArg()Argument for server chat event.
Can be cancelled to prevent the message from being sent.
| Property | Description |
|---|---|
player | The ServerPlayer sending the message |
message | The raw message string |
component | The message as a Component |
data class ShieldBlockArg( val entity: LivingEntity, val source: DamageSource, val blockedDamage: Float, val originalBlockedState: Boolean )Argument for shield block event.
| Property | Description |
|---|---|
entity | The LivingEntity blocking with a shield |
source | The DamageSource being blocked |
blockedDamage | The amount of damage blocked |
originalBlockedState | Whether the shield was originally blocking |