Painting

Undocumented in source.

Constructors

this
this(World world, BlockPosition position, string title, uint direction)
Undocumented in source.

Members

Properties

data
sul.entities.Entity data [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
direction
uint direction [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
title
string title [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

ALBAN
string ALBAN;
Undocumented in source.
AZTEC
string AZTEC;
Undocumented in source.
AZTEC2
string AZTEC2;
Undocumented in source.
BOMB
string BOMB;
Undocumented in source.
BURNINGSKULL
string BURNINGSKULL;
Undocumented in source.
BUST
string BUST;
Undocumented in source.
COURBET
string COURBET;
Undocumented in source.
CREEBET
string CREEBET;
Undocumented in source.
DONKEYKONG
string DONKEYKONG;
Undocumented in source.
FIGHTERS
string FIGHTERS;
Undocumented in source.
GRAHAM
string GRAHAM;
Undocumented in source.
KEBAB
string KEBAB;
Undocumented in source.
MATCH
string MATCH;
Undocumented in source.
PIGSCENE
string PIGSCENE;
Undocumented in source.
PLANT
string PLANT;
Undocumented in source.
POINTER
string POINTER;
Undocumented in source.
POOL
string POOL;
Undocumented in source.
SEA
string SEA;
Undocumented in source.
SKELETON
string SKELETON;
Undocumented in source.
SKULL_AND_ROSES
string SKULL_AND_ROSES;
Undocumented in source.
STAGE
string STAGE;
Undocumented in source.
SUNSET
string SUNSET;
Undocumented in source.
VOID
string VOID;
Undocumented in source.
WANDERER
string WANDERER;
Undocumented in source.
WASTELAND
string WASTELAND;
Undocumented in source.
WITHER
string WITHER;
Undocumented in source.

Variables

ticking
bool ticking;
Undocumented in source.

Inherited Members

From Entity

reserveLocalId
uint reserveLocalId()
Undocumented in source. Be warned that the author may not have intended to support it.
_id
uint _id;
Undocumented in source.
n_uuid
UUID n_uuid;
Undocumented in source.
n_world
World n_world;
Undocumented in source.
ticking
bool ticking;
Undocumented in source.
n_alive
bool n_alive;
Undocumented in source.
oldposition
EntityPosition oldposition;
Undocumented in source.
m_position
EntityPosition m_position;
Undocumented in source.
m_last
EntityPosition m_last;
Undocumented in source.
m_motion
EntityPosition m_motion;
Undocumented in source.
m_yaw
float m_yaw;
Undocumented in source.
m_body_yaw
float m_body_yaw;
Undocumented in source.
m_pitch
float m_pitch;
Undocumented in source.
moved
bool moved;
Undocumented in source.
motionmoved
bool motionmoved;
Undocumented in source.
n_on_ground
bool n_on_ground;
Undocumented in source.
last_puncher
Entity last_puncher;
Undocumented in source.
n_eye_height
double n_eye_height;
Undocumented in source.
n_box
EntityAxis n_box;
Undocumented in source.
metadata
Metadata metadata;
Undocumented in source.
n_data
uint n_data;
Undocumented in source.
acceleration
float acceleration;
Undocumented in source.
drag
float drag;
Undocumented in source.
terminal_velocity
float terminal_velocity;
Undocumented in source.
id
uint id [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
data
sul.entities.Entity data [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
type
string type [@property getter]

Gets the entity's type in a string format.

java
bool java [@property getter]

Indicates whether the entity exists in Minecraft.

javaId
ubyte javaId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
bedrock
bool bedrock [@property getter]

Indicates whether the entity exists in Minecraft.

bedrockId
ubyte bedrockId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
width
double width [@property getter]

Gets the item's width.

height
double height [@property getter]

Gets the item's height.

object
bool object [@property getter]

Indicates whether the entity is an object. If not the entity is a mob (living entity).

objectData
int objectData [@property getter]

If the entity is an object gets the object's extra data used in Minecraft's SpawnObject packet.

uuid
UUID uuid [@property getter]

Gets the unique identifier (UUID). It's usually randomly generated when the entity is created and it can only be changed by the child classes.

world
World world [@property getter]

Gets the world the entity has been spawned into. Non-player entities should always have the same world for their whole life-cycle.

server
shared(NodeServer) server [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
tick
void tick()
Undocumented in source. Be warned that the author may not have intended to support it.
ticks
tick_t ticks [@property getter]

Gets the amount of ticks for this entity. The ticks doesn't indicates the life-time of the entity, but how many times it has been ticked by its world.

onFire
bool onFire [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
onFire
bool onFire [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
sneaking
bool sneaking [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
sneaking
bool sneaking [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
sprinting
bool sprinting [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
sprinting
bool sprinting [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
usingItem
bool usingItem [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
actionFlag
bool actionFlag [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
invisible
bool invisible [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
invisible
bool invisible [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
nametag
string nametag [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
nametag
string nametag [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
showNametag
bool showNametag [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
showNametag
bool showNametag [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
noai
bool noai [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
noai
bool noai [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
shouldSee
bool shouldSee(Entity entity)

Indicates which entities this one should and should not see. By default only the entities indicated as true by this function will be shown through the <a href="#Entity.show">show</a> function and added to the watchlist. For example, an arrow can see a painting, so Arrow.shouldSee(painting) will be true, but a painting shouldn't see an arrow, so Painting.shouldSee(arrow) will be false. This increases the performances as there are less controls, casts and operation on arrays in big worlds or chunks of worlds with an high concetration of entities.

show
bool show(Entity entity)

Adds an entity to the ones this entity can see.

sees
bool sees(Entity entity)

Checks wether this entity can see or not another entity.

hide
bool hide(Entity entity)

Hides an entity from this entity, if this entity can see it.

watchlist
T[] watchlist [@property getter]

Gets a list of the entities that this entity can see.

viewers
T[] viewers [@property getter]

Gets a list of the entities that can see this entity.

despawn
void despawn()

Despawns this entity, calling the event in the world.

setAsDespawned
void setAsDespawned()
Undocumented in source. Be warned that the author may not have intended to support it.
alive
bool alive [@property getter]
dead
bool dead [@property getter]

Checks the dead/alive status of the entity.

chunk
ChunkPosition chunk [@property getter]

Gets the 16x16 chunk the entity is in. A bigger chunk can be obtained by right-shifting the vector by the required amount.

position
EntityPosition position [@property getter]

Gets the entity's position.

motion
EntityPosition motion [@property getter]

Gets the entity's motion.

motion
EntityPosition motion [@property setter]

Sets the entity's motion.

motionless
bool motionless [@property getter]

Checks whether or not an entity has motion. A motionless entity has every value of the motion's vector equal to 0.

motionless
bool motionless [@property setter]

Sets the entity as motionless. This is equivalent to motion = EntityPosition(0).

velocity
Vector3!short velocity [@property getter]

Gets the motion as pc's velocity, ready to be encoded in a packet. Due to this encoding limitation, the entity's motion should never be higher than 4.096 (2^15 / 8000). If it is, it will be clamped.

yaw
float yaw [@property getter]

Gets the entity's looking direction (right-left). The value should always be in range 0..360.

angleYaw
ubyte angleYaw [@property getter]

Gets the yaw as an unsigned byte for encoding reasons. To obtain a valid value the yaw should be in its valid range from 0 to 360.

bodyYaw
float bodyYaw [@property getter]

Gets the entity's body facing direction. This variable may not affect all the entities.

angleBodyYaw
ubyte angleBodyYaw [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
pitch
float pitch [@property getter]

Gets the entity's looking direction (up-down). The value should be in range -90..90 (90 included).

anglePitch
byte anglePitch [@property getter]

Gets the pitch as a byte for encoding reasons. To btain a valid value the pitch should be in its valid range from -90 to 90.

onGround
bool onGround [@property getter]

Boolean value indicating whether or not the player is touching the ground or is in it. This value is true even if the player is in a liquid (like water).

direction
EntityPosition direction [@property getter]

Gets the player's looking direction calculated from yaw and pitch. The return value is in range 0..1 and it should be multiplied to obtain the desired value.

move
void move(EntityPosition position)

Moves the entity.

move
void move(EntityPosition position, float yaw, float pitch)
Undocumented in source. Be warned that the author may not have intended to support it.
move
void move(EntityPosition position, float yaw, float bodyYaw, float pitch)
Undocumented in source. Be warned that the author may not have intended to support it.
teleport
void teleport(EntityPosition position)
void teleport(EntityPosition position, float yaw, float pitch)
void teleport(EntityPosition position, float yaw, float bodyYaw, float pitch)
void teleport(World world, EntityPosition position)
void teleport(World world, EntityPosition position, float yaw, float pitch)
void teleport(World world, EntityPosition position, float yaw, float bodyYaw, float pitch)
void teleport(Position position)
void teleport(Position position, float yaw, float pitch)
void teleport(Position position, float yaw, float bodyYaw, float pitch)
void teleport(World world, Position position)
void teleport(World world, Position position, float yaw, float pitch)
void teleport(World world, Position position, float yaw, float bodyYaw, float pitch)

Teleports the entity.

eyeHeight
double eyeHeight [@property getter]

Gets entity's sizes.

updateGroundStatus
void updateGroundStatus()

Does the onGround updates.

doFallDamage
void doFallDamage(float distance, float modifier)
Undocumented in source. Be warned that the author may not have intended to support it.
falling
bool falling [@property getter]

Boolean value indicating whether or not the entity is falling.

doPhysic
void doPhysic()

Does physic movements using the entity's parameters.

checkCollisionsWithEntities
void checkCollisionsWithEntities()

Checks collisions with the entities in the watchlist and calls onCollideWithEntity on collision.

onCollideWithEntity
bool onCollideWithEntity(Entity entity)

Function called from checkCollisionWithEntities when this entity collides with another entity.

checkCollisionsWithBlocks
void checkCollisionsWithBlocks()
Undocumented in source. Be warned that the author may not have intended to support it.
onCollideWithBlock
bool onCollideWithBlock(Block block, BlockPosition position, uint face)
Undocumented in source. Be warned that the author may not have intended to support it.
setSize
void setSize(float width, float height)

Updates the size of the entity and its bounding box.

box
EntityAxis box [@property getter]

Gets the entity's bounding box.

scale
float scale [@property getter]

/** * Gets the entity's width. */ public final @property @safe @nogc float width() { return this.box.width; }

scale
float scale [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
vehicle
Entity vehicle [@property getter]

Gets the entity's vechicle.

vehicle
Entity vehicle [@property setter]

Sets the entity's vehicle.

passenger
Entity passenger [@property getter]

Gets the entity's passenger.

passenger
Entity passenger [@property setter]

Sets the entity's passenger. The vehicle of the passenger is set automatically.

attack
T attack(T event)

Attacks an entity and returns the event used.

validateAttack
bool validateAttack(EntityDamageEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
attackImpl
void attackImpl(EntityDamageEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
broadcastMetadata
void broadcastMetadata()

Send the metadata to the viewers

drop
void drop(Slot slot)

Drop an item from this entity

name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
displayName
string displayName [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta