public class GlowPainting extends GlowHangingEntity implements org.bukkit.entity.Painting
GlowHangingEntity.HangingFace
facing
active, airDrag, applyDragBeforeAccel, boundingBox, ENTITY_ID_NOBODY, entityId, gravityAccel, liquidDrag, location, metadata, passengerChanged, previousLocation, removed, server, slipMultiplier, teleported, ticksLived, vehicle, velocity, velocityChanged, world, worldLock
Constructor and Description |
---|
GlowPainting(org.bukkit.Location center) |
GlowPainting(org.bukkit.Location center,
org.bukkit.block.BlockFace facing)
Creates a painting with the default art.
|
Modifier and Type | Method and Description |
---|---|
List<com.flowpowered.network.Message> |
createSpawnMessage()
Creates a list of
Message s which can be sent to a client to spawn this entity. |
boolean |
entityInteract(GlowPlayer player,
InteractEntityMessage message) |
org.bukkit.Art |
getArt() |
org.bukkit.Location |
getArtCenter() |
static org.bukkit.Art |
getArtFromTitle(String title) |
String |
getArtTitle() |
double |
getHeight() |
org.bukkit.entity.EntityType |
getType() |
double |
getWidth() |
boolean |
isObstructed()
Check if the painting is obstructed at the current location.
|
void |
pulse()
Called every game cycle.
|
protected void |
pulsePhysics() |
void |
refresh()
Refreshes the painting for nearby clients.
|
boolean |
setArt(org.bukkit.Art art) |
boolean |
setArt(org.bukkit.Art art,
boolean force) |
void |
setArtInternal(org.bukkit.Art art)
Sets the art of this painting, regardless of available space.
|
void |
setFacingDirection(org.bukkit.block.BlockFace blockFace) |
boolean |
setFacingDirection(org.bukkit.block.BlockFace blockFace,
boolean force) |
void |
setRawLocation(org.bukkit.Location location,
boolean fall)
Sets this entity's location.
|
protected void |
updateBoundingBox() |
getAttachedFace, getFacing, getYaw
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, createUpdateMessage, damage, damage, damage, damage, eject, equals, fromMobSpawner, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, getFallDistance, getFireTicks, getGravityAccel, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMetadata, getMetadata, getMountLocation, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isRemoved, isSilent, isTeleported, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, reset, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOnGround, setOp, setPassenger, setPortalCooldown, setRawLocation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, spigot, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addPassenger, addScoreboardTag, eject, fromMobSpawner, getChunk, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport
getMetadata, hasMetadata, removeMetadata, setMetadata
getName, sendMessage, sendMessage, sendMessage, sendMessage
public GlowPainting(org.bukkit.Location center)
public GlowPainting(org.bukkit.Location center, org.bukkit.block.BlockFace facing)
center
- the center of the paintingfacing
- the direction for the painting to facepublic static org.bukkit.Art getArtFromTitle(String title)
public String getArtTitle()
public org.bukkit.entity.EntityType getType()
getType
in interface org.bukkit.entity.Entity
getType
in class GlowEntity
public boolean entityInteract(GlowPlayer player, InteractEntityMessage message)
entityInteract
in class GlowEntity
public List<com.flowpowered.network.Message> createSpawnMessage()
GlowEntity
Message
s which can be sent to a client to spawn this entity.
Implementations in concrete subclasses may return a shallowly immutable list.createSpawnMessage
in class GlowEntity
public boolean setArt(org.bukkit.Art art)
setArt
in interface org.bukkit.entity.Painting
public boolean setArt(org.bukkit.Art art, boolean force)
setArt
in interface org.bukkit.entity.Painting
public void refresh()
This will first destroy, and then spawn the painting again using its current art and facing value.
public void setArtInternal(org.bukkit.Art art)
This matches the behaviour of setArt(art, true)
,
but the painting does not get refreshed.
Null values are ignored.
art
- the Art of the paintingpublic void setFacingDirection(org.bukkit.block.BlockFace blockFace)
setFacingDirection
in interface org.bukkit.material.Directional
public boolean setFacingDirection(org.bukkit.block.BlockFace blockFace, boolean force)
setFacingDirection
in interface org.bukkit.entity.Hanging
public void pulse()
GlowEntity
pulse
in class GlowEntity
protected void pulsePhysics()
pulsePhysics
in class GlowEntity
public boolean isObstructed()
Survivability is defined as:
public double getWidth()
getWidth
in interface org.bukkit.entity.Entity
getWidth
in class GlowEntity
public double getHeight()
getHeight
in interface org.bukkit.entity.Entity
getHeight
in class GlowEntity
protected void updateBoundingBox()
updateBoundingBox
in class GlowEntity
public void setRawLocation(org.bukkit.Location location, boolean fall)
GlowEntity
setRawLocation
in class GlowEntity
location
- The new location.fall
- Whether to calculate fall damage or not.public org.bukkit.Art getArt()
getArt
in interface org.bukkit.entity.Painting
public org.bukkit.Location getArtCenter()
Copyright © 2021. All rights reserved.