Package net.citizensnpcs.trait
Class BoundingBoxTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.BoundingBoxTrait
- All Implemented Interfaces:
- Runnable,- Supplier<BoundingBox>,- Listener
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionget()voidCalled just before the attachedNPCis despawned.voidonRemove()Called when a trait is removed from the attachedNPC.voidonSpawn()Called when anNPCis spawned.voidrun()Called every tick if overridden.voidvoidsetHeight(float height) voidsetScale(float scale) voidsetWidth(float width) 
- 
Constructor Details- 
BoundingBoxTraitpublic BoundingBoxTrait()
 
- 
- 
Method Details- 
get- Specified by:
- getin interface- Supplier<BoundingBox>
 
- 
getAdjustedDimensions
- 
onDespawnpublic void onDespawn()Description copied from class:TraitCalled just before the attachedNPCis despawned.NPC.getEntity()will be non-null.
- 
onRemovepublic void onRemove()Description copied from class:TraitCalled when a trait is removed from the attachedNPC.
- 
onSpawnpublic void onSpawn()Description copied from class:TraitCalled when anNPCis spawned.NPC.getEntity()will return null until this is called. This is also called onAttach when the NPC is already spawned.
- 
runpublic void run()Description copied from class:TraitCalled every tick if overridden.
- 
setBoundingBoxFunction
- 
setHeightpublic void setHeight(float height) 
- 
setScalepublic void setScale(float scale) 
- 
setWidthpublic void setWidth(float width) 
 
-