public class CartAttachmentEntity extends CartAttachment
Constructor and Description |
---|
CartAttachmentEntity() |
Modifier and Type | Method and Description |
---|---|
void |
applyDefaultSeatTransform(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Some attachment types, like entities, will have a default position relative
to it where the player is normally seated.
|
boolean |
containsEntityId(int entityId)
Gets whether this attachment uses a particular Entity Id as part of
displaying its contents in the world.
|
int |
getMountEntityId()
Gets an Entity Id of an Entity other entities can mount to mount this attachment.
|
static boolean |
isEntityTypeSupported(org.bukkit.entity.EntityType entityType)
Whether a particular entity type can be used at all in an entity attachment
|
void |
makeHidden(org.bukkit.entity.Player viewer)
Makes this attachment invisible (despawns) for a viewer.
|
void |
makeVisible(org.bukkit.entity.Player viewer)
Makes this attachment visible to a viewer for the first time.
|
void |
onAttached()
Called when the controller is attached to the real world.
|
void |
onBlur()
Called when an attachment loses focus in the editor or by other means.
|
void |
onDetached()
Called when the controller is detached from the real world.
|
void |
onFocus()
Called when an attachment is focused in the editor or by other means.
|
void |
onMove(boolean absolute)
Called every now and then to refresh the position of the attachment
|
void |
onTick()
Called every tick to update the attachment
|
void |
onTransformChanged(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Called right after the
Attachment.getTransform() has been updated. |
getController, getInternalState, getViewers, onLoad, updateGlowColor, updateGlowColorFor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAnimation, addChild, clearAnimations, findChild, getAnimations, getChildren, getConfig, getConfiguredPosition, getCurrentAnimation, getManager, getParent, getPreviousTransform, getTransform, isActive, isAttached, isFocused, isHiddenWhenInactive, playNamedAnimation, playNamedAnimation, playNamedAnimationRecursive, playNamedAnimationRecursive, setActive, setFocused, startAnimation, stopAnimation
public void onDetached()
Attachment
#onSave(config)
is called
before this method is called, if saving is required.onDetached
in interface Attachment
onDetached
in class CartAttachment
public void onAttached()
Attachment
onAttached
in interface Attachment
onAttached
in class CartAttachment
public void onFocus()
Attachment
public void onBlur()
Attachment
Attachment.onFocus()
.public boolean containsEntityId(int entityId)
Attachment
containsEntityId
in interface Attachment
containsEntityId
in class CartAttachment
public int getMountEntityId()
CartAttachment
getMountEntityId
in class CartAttachment
public void applyDefaultSeatTransform(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Attachment
transform
- to apply the transformation to. The input transform will be the current
position of this attachment.public void makeVisible(org.bukkit.entity.Player viewer)
Attachment
Attachment.onAttached()
is called,
and whenever a new viewer moves within range.viewer
- to make it visible topublic void makeHidden(org.bukkit.entity.Player viewer)
Attachment
Attachment.onDetached()
is called,
and whenever a new viewer moves out of range.viewer
- to hide it frompublic void onTransformChanged(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Attachment
Attachment.getTransform()
has been updated.
Additional transformations can be performed here on the transformation matrix,
and position information can be calculated.onTransformChanged
in interface Attachment
onTransformChanged
in class CartAttachment
transform
- (same as Attachment.getTransform()
but mutable)public void onMove(boolean absolute)
Attachment
absolute
- whether this is an absolute (synchronize) movement update.
If this is true, the position information should be refreshed.public void onTick()
Attachment
public static boolean isEntityTypeSupported(org.bukkit.entity.EntityType entityType)
entityType
- Copyright © 2019. All rights reserved.