TaterzenProfession

interface TaterzenProfession

Profession interface, providing hooks for Taterzen's behaviour.

Booleans instead of voids are there to allow you to cancel the base Taterzen method.

Functions

cancelMeleeAttack
Link copied to clipboard
open fun cancelMeleeAttack(target: Entity): Boolean
Whether to cancel melee attack.
cancelRangedAttack
Link copied to clipboard
open fun cancelRangedAttack(target: LivingEntity): Boolean
Whether to cancel ranged attack.
create
Link copied to clipboard
open fun create(taterzen: TaterzenNPC): TaterzenProfession
Method used for creating the new profession for given taterzen.
handleAttack
Link copied to clipboard
open fun handleAttack(attacker: Entity): Boolean
Called when Taterzen is attacked.
interactAt
Link copied to clipboard
open fun interactAt(player: Player, pos: Vec3, hand: InteractionHand): InteractionResult
Called on Taterzen interaction.
onBehaviourSet
Link copied to clipboard
open fun onBehaviourSet(behaviourLevel: NPCData.Behaviour)
Called when Taterzen's behaviour changes.
onMovementSet
Link copied to clipboard
open fun onMovementSet(movement: NPCData.Movement)
Called when Taterzen's movement changes.
onPlayersNearby
Link copied to clipboard
open fun onPlayersNearby(players: List<ServerPlayer>)
Called every tick if players are nearby.
onProfessionRemoved
Link copied to clipboard
open fun onProfessionRemoved()
Called when taterzen "loses" this profession.
onRemove
Link copied to clipboard
open fun onRemove()
Called on Taterzen death / removal.
readNbt
Link copied to clipboard
open fun readNbt(tag: CompoundTag)
Called on parsing Taterzen data from CompoundTag.
saveNbt
Link copied to clipboard
open fun saveNbt(tag: CompoundTag)
Called on saving Taterzen data to CompoundTag.
skipAttackFrom
Link copied to clipboard
open fun skipAttackFrom(attacker: Entity): Boolean
Called when Taterzen is attacked.
tick
Link copied to clipboard
open fun tick(): InteractionResult
Called on Taterzen entity tick.
tickMovement
Link copied to clipboard
open fun tickMovement(): InteractionResult
Called on movement tick.
tryPickupItem
Link copied to clipboard
open fun tryPickupItem(item: ItemEntity): Boolean
Called when Taterzen has a chance to pickup an item.

Inheritors

AbstractProfession
Link copied to clipboard