If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
import crafttweaker . api.entity.type.item . ItemEntity;
ItemEntity extends Entity
.
ItemEntity
implements the following interfaces:
Nameable
,EntityAccess
,CommandSource
,IAttachmentHolder
Undocumented Interfaces TraceableEntity
, SyncedDataHolder
, ScoreHolder
, IEntityExtension
, INBTSerializable <CompoundTag >
// new ItemEntity(level as Level , x as double, y as double, z as double, stack as ItemStack ); new ItemEntity(myLevel, myDouble, myDouble, myDouble, myItemStack);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Checks if the commands from this source should return failure messages // ItemEntity.acceptsFailure as bool
myItemEntity . acceptsFailure
Return Type:
bool
Checks if the commands from this source should return failure messages Returns : True if the commands from this source should return failure messages, false otherwise.
// ItemEntity.acceptsFailure() as bool;
myItemEntity . acceptsFailure();
Return Type:
bool
Checks if the commands from this source should return successful messages // ItemEntity.acceptsSuccess as bool
myItemEntity . acceptsSuccess
Return Type:
bool
Checks if the commands from this source should return successful messages Returns : True if the commands from this source should return successful messages, false otherwise.
// ItemEntity.acceptsSuccess() as bool;
myItemEntity . acceptsSuccess();
Return Type:
bool
Adds a tag to the entity, returning false if the entity has over 1024 Returns : true if the tag was added.
// ItemEntity.addTag(tagName as string) as bool;
myItemEntity . addTag(myString);
Parameters:
tagName: string
Type: string
- The name of the tag to add.
Return Type:
bool
Gets the current air supply of the entity. // ItemEntity.airSupply as int
Return Type:
int
Gets the current air supply of the entity. Returns : The current air supply of the entity.
// ItemEntity.airSupply() as int;
myItemEntity . airSupply();
Return Type:
int
Checks if the command source always accepts. // ItemEntity.alwaysAccepts as bool
myItemEntity . alwaysAccepts
Return Type:
bool
Checks if the command source always accepts. Returns : True if the command source always accepts, false otherwise.
// ItemEntity.alwaysAccepts() as bool;
myItemEntity . alwaysAccepts();
Return Type:
bool
Gets the height of the bounding box of the entity. // ItemEntity.bbHeight as float
Return Type:
float
Gets the height of the bounding box of the entity. Returns : The height of the bounding box of the entity.
// ItemEntity.bbHeight() as float;
Return Type:
float
Gets the width of the bounding box of the entity. // ItemEntity.bbWidth as float
Return Type:
float
Gets the width of the bounding box of the entity. Returns : The width of the bounding box of the entity.
// ItemEntity.bbWidth() as float;
Return Type:
float
Gets the position
of the entity. myItemEntity . blockPosition
Return Type:
BlockPos
Gets the position
of the entity. Returns : The block position of the entity.
// ItemEntity.blockPosition() as BlockPos ; myItemEntity . blockPosition();
Return Type:
BlockPos
Gets the x coordinate of the entity. // ItemEntity.blockX as int
Return Type:
int
Gets the x coordinate of the entity. Returns : The x coordinate of the entity.
// ItemEntity.blockX() as int;
Return Type:
int
Gets the y coordinate of the entity. // ItemEntity.blockY as int
Return Type:
int
Gets the y coordinate of the entity. Returns : The y coordinate of the entity.
// ItemEntity.blockY() as int;
Return Type:
int
Gets the z coordinate of the entity. // ItemEntity.blockZ as int
Return Type:
int
Gets the z coordinate of the entity. Returns : The z coordinate of the entity.
// ItemEntity.blockZ() as int;
Return Type:
int
Gets the bounding box of the entity. // ItemEntity.boundingBox as AABB
Return Type:
AABB
Gets the bounding box of the entity. Returns : The bounding box of the entity.
// ItemEntity.boundingBox() as AABB ; myItemEntity . boundingBox();
Return Type:
AABB
Gets the bounding box for culling of the entity. // ItemEntity.boundingBoxForCulling as AABB myItemEntity . boundingBoxForCulling
Return Type:
AABB
Gets the bounding box for culling of the entity. Returns : The bounding box for culling of the entity.
// ItemEntity.boundingBoxForCulling() as AABB ; myItemEntity . boundingBoxForCulling();
Return Type:
AABB
Checks if the entity can be collided with. // ItemEntity.canBeCollidedWith as bool
myItemEntity . canBeCollidedWith
Return Type:
bool
Checks if the entity can be collided with. Returns : true if the entity can be collided with.
// ItemEntity.canBeCollidedWith() as bool;
myItemEntity . canBeCollidedWith();
Return Type:
bool
Checks if the entity can collide with the given entity. Returns : true if the entity can collide with the given entity.
// ItemEntity.canCollideWith(other as Entity ) as bool; myItemEntity . canCollideWith(myEntity);
Parameters:
other: Entity
Type: Entity
- The entity to check if the entity can collide with.
Return Type:
bool
Checks if the entity can freeze. // ItemEntity.canFreeze as bool
Return Type:
bool
Checks if the entity can freeze. Returns : Whether the entity can freeze.
// ItemEntity.canFreeze() as bool;
myItemEntity . canFreeze();
Return Type:
bool
Clears the fire of the entity. // ItemEntity.clearFire();
myItemEntity . clearFire();
Checks if the entity is closer than the given distance to another entity. Returns : true if the entity is closer than the given distance to the other entity.
// ItemEntity.closerThan(other as Entity , distance as double) as bool; myItemEntity . closerThan(myEntity, myDouble);
Parameters:
other: Entity
Type: Entity
- The other entity to check the distance to. distance: double
Type: double
- The distance to check.
Return Type:
bool
Gets the Level
used when sending commands as this entity. // ItemEntity.commandSenderWorld as Level myItemEntity . commandSenderWorld
Return Type:
Level
Gets the Level
used when sending commands as this entity. Returns : The Level
used when sending commands as this entity.
// ItemEntity.commandSenderWorld() as Level ; myItemEntity . commandSenderWorld();
Return Type:
Level
Gets the controlling passenger of the entity. // ItemEntity.controllingPassenger as Entity myItemEntity . controllingPassenger
Return Type:
Entity
Gets the controlling passenger of the entity. Returns : The controlling passenger of the entity.
// ItemEntity.controllingPassenger() as Entity ; myItemEntity . controllingPassenger();
Return Type:
Entity
Gets the custom NBT data for this Entity. // ItemEntity.customData as MapData
Return Type:
MapData
Gets the custom NBT data for this Entity. Returns : The custom data for this Entity.
// ItemEntity.customData() as MapData ; myItemEntity . customData();
Return Type:
MapData
Gets the custom name of the entity.
Return Type:
Component
Gets the custom name of the entity. Returns : The custom name of the entity.
myItemEntity . customName();
Return Type:
Component
myItemEntity . customName();
Return Type:
Component
Checks if the entity dampens vibrations, such as net.minecraft.world.entity.item.ItemEntity
s who's item is in the dampens_vibrations item tag. // ItemEntity.dampensVibrations as bool
myItemEntity . dampensVibrations
Return Type:
bool
Checks if the entity dampens vibrations, such as net.minecraft.world.entity.item.ItemEntity
s who's item is in the dampens_vibrations item tag. Returns : true if the entity dampens vibrations.
// ItemEntity.dampensVibrations() as bool;
myItemEntity . dampensVibrations();
Return Type:
bool
Gets the NBT data of this Entity.
Return Type:
MapData
Gets the NBT data of this Entity. Returns : The NBT data of this Entity.
Return Type:
MapData
Gets the delta movement of the entity. // ItemEntity.deltaMovement as Vec3 myItemEntity . deltaMovement
Return Type:
Vec3
Sets the delta movement of the entity. // ItemEntity.deltaMovement = (deltaMovement as Vec3 ); myItemEntity . deltaMovement = myVec3;
Parameters:
deltaMovement: Vec3
Type: Vec3
- The delta movement to set. Gets the delta movement of the entity. Returns : The delta movement of the entity.
// ItemEntity.deltaMovement() as Vec3 ; myItemEntity . deltaMovement();
Return Type:
Vec3
Sets the delta movement of the entity. // ItemEntity.deltaMovement(deltaMovement as Vec3 ); myItemEntity . deltaMovement(myVec3);
Parameters:
deltaMovement: Vec3
Type: Vec3
- The delta movement to set. Gets the dimension changing delay of the entity. // ItemEntity.dimensionChangingDelay as int
myItemEntity . dimensionChangingDelay
Return Type:
int
Gets the dimension changing delay of the entity. Returns : The dimension changing delay of the entity.
// ItemEntity.dimensionChangingDelay() as int;
myItemEntity . dimensionChangingDelay();
Return Type:
int
Gets the direction of the entity.
Return Type:
Direction
Gets the direction of the entity. Returns : The direction of the entity.
myItemEntity . direction();
Return Type:
Direction
Checks if the entity dismounts underwater. // ItemEntity.dismountsUnderwater as bool
myItemEntity . dismountsUnderwater
Return Type:
bool
Checks if the entity dismounts underwater. Returns : true if the entity dismounts underwater.
// ItemEntity.dismountsUnderwater() as bool;
myItemEntity . dismountsUnderwater();
Return Type:
bool
Gets the display name of the entity.
Return Type:
Component
Gets the display name of the entity. Returns : The display name of the entity.
myItemEntity . displayName();
Return Type:
Component
myItemEntity . displayName();
Return Type:
Component
Gets the distance to the given entity. Returns : The distance to the given entity.
// ItemEntity.distanceTo(entity as Entity ) as float; myItemEntity . distanceTo(myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity to get the distance to.
Return Type:
float
Gets the squared distance to the given position. Returns : The squared distance to the given position.
// ItemEntity.distanceToSqr(x as double, y as double, z as double) as double;
myItemEntity . distanceToSqr(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x position to get the squared distance to.
y: double
Type: double
- The y position to get the squared distance to.
z: double
Type: double
- The z position to get the squared distance to.
Return Type:
double
Gets the squared distance to the given entity. Returns : The squared distance to the given entity.
// ItemEntity.distanceToSqr(entity as Entity ) as double; myItemEntity . distanceToSqr(myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity to get the squared distance to.
Return Type:
double
Gets the squared distance to the given vector. Returns : The squared distance to the given vector.
// ItemEntity.distanceToSqr(vec as Vec3 ) as double; myItemEntity . distanceToSqr(myVec3);
Parameters:
vec: Vec3
Type: Vec3
- The vector to get the squared distance to.
Return Type:
double
Ejects the passengers of the entity. // ItemEntity.ejectPassengers();
myItemEntity . ejectPassengers();
Gets the eye height of the entity. // ItemEntity.eyeHeight as float
Return Type:
float
Gets the eye height of the entity. Returns : The eye height of the entity.
// ItemEntity.eyeHeight() as float;
myItemEntity . eyeHeight();
Return Type:
float
Gets the eye position of the entity. // ItemEntity.eyePosition as Vec3
Return Type:
Vec3
Gets the eye position of the entity. Returns : The eye position of the entity.
// ItemEntity.eyePosition() as Vec3 ; myItemEntity . eyePosition();
Return Type:
Vec3
Gets the y coordinate of the entity's eyes. // ItemEntity.eyeY as double
Return Type:
double
Gets the y coordinate of the entity's eyes. Returns : The y coordinate of the entity's eyes.
// ItemEntity.eyeY() as double;
Return Type:
double
Checks if the entity is fire immune. // ItemEntity.fireImmune as bool
Return Type:
bool
Checks if the entity is fire immune. Returns : true if the entity is fire immune.
// ItemEntity.fireImmune() as bool;
myItemEntity . fireImmune();
Return Type:
bool
Gets the remaining fire ticks of the entity. // ItemEntity.fireTicks as int
Return Type:
int
Sets the remaining fire ticks of the entity. // ItemEntity.fireTicks = (ticks as int);
myItemEntity . fireTicks = myInt;
Parameters:
ticks: int
Type: int
- The number of ticks to set the remaining fire ticks to.
Sets the remaining fire ticks of the entity. // ItemEntity.fireTicks(ticks as int);
myItemEntity . fireTicks(myInt);
Parameters:
ticks: int
Type: int
- The number of ticks to set the remaining fire ticks to.
Gets the remaining fire ticks of the entity. Returns : The remaining fire ticks of the entity.
// ItemEntity.fireTicks() as int;
myItemEntity . fireTicks();
Return Type:
int
Gets the first passenger of the entity. // ItemEntity.firstPassenger as Entity myItemEntity . firstPassenger
Return Type:
Entity
Gets the first passenger of the entity. Returns : The first passenger of the entity.
// ItemEntity.firstPassenger() as Entity ; myItemEntity . firstPassenger();
Return Type:
Entity
Gets the fluid jump threshold of the entity. // ItemEntity.fluidJumpThreshold as double
myItemEntity . fluidJumpThreshold
Return Type:
double
Gets the fluid jump threshold of the entity. Returns : The fluid jump threshold of the entity.
// ItemEntity.fluidJumpThreshold() as double;
myItemEntity . fluidJumpThreshold();
Return Type:
double
Gets the forward vector of the entity. // ItemEntity.forward as Vec3
Return Type:
Vec3
Gets the forward vector of the entity. Returns : The forward vector of the entity.
// ItemEntity.forward() as Vec3 ;
Return Type:
Vec3
myItemEntity . getAttachmentData < T>(myAttachmentType);
Return Type:
T
// ItemEntity.getAttachmentData<T>(type as Supplier< AttachmentType <T>>) as T; myItemEntity . getAttachmentData < T>(mySupplier);
Return Type:
T
Gets the eye position of the entity. Returns : The eye position of the entity.
// ItemEntity.getEyePosition(partialTicks as float) as Vec3 ; myItemEntity . getEyePosition(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the eye position for.
Return Type:
Vec3
Gets the position of the entity. Returns : The position of the entity.
// ItemEntity.getPosition(partialTicks as float) as Vec3 ; myItemEntity . getPosition(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the position for.
Return Type:
Vec3
Gets the up vector of the entity. Returns : The up vector of the entity.
// ItemEntity.getUpVector(partialTicks as float) as Vec3 ; myItemEntity . getUpVector(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the up vector for.
Return Type:
Vec3
Gets the view vector of the entity. Returns : The view vector of the entity.
// ItemEntity.getViewVector(partialTicks as float) as Vec3 ; myItemEntity . getViewVector(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the view vector for.
Return Type:
Vec3
Gets the x coordinate of the entity with the given scale. Returns : The x coordinate of the entity.
// ItemEntity.getX(scale as double) as double;
myItemEntity . getX(myDouble);
Parameters:
scale: double
Type: double
- The scale to get the x coordinate of the entity.
Return Type:
double
Gets the y coordinate of the entity with the given scale. Returns : The y coordinate of the entity.
// ItemEntity.getY(scale as double) as double;
myItemEntity . getY(myDouble);
Parameters:
scale: double
Type: double
- The scale to get the y coordinate of the entity.
Return Type:
double
Gets the z coordinate of the entity with the given scale. Returns : The z coordinate of the entity.
// ItemEntity.getZ(scale as double) as double;
myItemEntity . getZ(myDouble);
Parameters:
scale: double
Type: double
- The scale to get the z coordinate of the entity.
Return Type:
double
// ItemEntity.hasAttachmentData<T>(type as AttachmentType <T>) as bool; myItemEntity . hasAttachmentData < T>(myAttachmentType);
Return Type:
bool
// ItemEntity.hasAttachmentData<T>(type as Supplier< AttachmentType <T>>) as bool; myItemEntity . hasAttachmentData < T>(mySupplier);
Return Type:
bool
Checks if the entity has a custom name. // ItemEntity.hasCustomName as bool
myItemEntity . hasCustomName
Return Type:
bool
// ItemEntity.hasCustomName as bool
myItemEntity . hasCustomName
Return Type:
bool
Checks if the entity has a custom name. Returns : true if the entity has a custom name.
// ItemEntity.hasCustomName() as bool;
myItemEntity . hasCustomName();
Return Type:
bool
// ItemEntity.hasCustomName() as bool;
myItemEntity . hasCustomName();
Return Type:
bool
Checks if the entity has exactly one player passenger. // ItemEntity.hasExactlyOnePlayerPassenger as bool
myItemEntity . hasExactlyOnePlayerPassenger
Return Type:
bool
Checks if the entity has exactly one player passenger. Returns : true if the entity has exactly one player passenger.
// ItemEntity.hasExactlyOnePlayerPassenger() as bool;
myItemEntity . hasExactlyOnePlayerPassenger();
Return Type:
bool
Checks if the entity is currently glowing. // ItemEntity.hasGlowingTag as bool
myItemEntity . hasGlowingTag
Return Type:
bool
Checks if the entity is currently glowing. Returns : true if the entity is currently glowing.
// ItemEntity.hasGlowingTag() as bool;
myItemEntity . hasGlowingTag();
Return Type:
bool
Checks if the entity has an indirect passenger. Returns : true if the entity has an indirect passenger.
// ItemEntity.hasIndirectPassenger(entity as Entity ) as bool; myItemEntity . hasIndirectPassenger(myEntity);
Return Type:
bool
Checks if the entity has a passenger. Returns : true if the entity has the given passenger.
// ItemEntity.hasPassenger(entity as Entity ) as bool; myItemEntity . hasPassenger(myEntity);
Return Type:
bool
Checks if the entity has a passenger that matches the given predicate. Returns : true if the entity has a passenger that matches the predicate.
// ItemEntity.hasPassenger(predicate as function(t as Entity ) as bool) as bool; myItemEntity . hasPassenger(myPredicate);
Parameters:
predicate: function(t as Entity ) as bool
Type: function(t as Entity ) as bool
- The predicate to check.
Return Type:
bool
Checks if this item entity has a pickup delay. // ItemEntity.hasPickupDelay as bool
myItemEntity . hasPickupDelay
Return Type:
bool
Checks if this item entity has a pickup delay. Returns : True if this item entity has a pickup delay, false otherwise.
// ItemEntity.hasPickupDelay() as bool;
myItemEntity . hasPickupDelay();
Return Type:
bool
Hurts the entity with the given DamageSource
and amount. Returns : true if the entity was hurt.
// ItemEntity.hurt(source as DamageSource , amount as float) as bool; myItemEntity . hurt(myDamageSource, myFloat);
Parameters:
amount: float
Type: float
- The amount of damage to deal.
Return Type:
bool
Gets the ID of the entity.
Return Type:
int
Gets the ID of the entity. Returns : The ID of the entity.
// ItemEntity.id() as int;
Return Type:
int
Gets the BlockState
that this entity is currently inside. myItemEntity . inBlockState
Return Type:
BlockState
Gets the BlockState
that this entity is currently inside. Returns : The block state that this entity is currently inside
myItemEntity . inBlockState();
Return Type:
BlockState
Checks if the entity is alive. // ItemEntity.isAlive as bool
Return Type:
bool
Checks if the entity is alive. Returns : true if the entity is alive.
// ItemEntity.isAlive() as bool;
Return Type:
bool
Checks if the entity is always ticking. // ItemEntity.isAlwaysTicking as bool
myItemEntity . isAlwaysTicking
Return Type:
bool
Checks if the entity is always ticking. Returns : true if the entity is always ticking.
// ItemEntity.isAlwaysTicking() as bool;
myItemEntity . isAlwaysTicking();
Return Type:
bool
Checks if the entity is attackable. // ItemEntity.isAttackable as bool
myItemEntity . isAttackable
Return Type:
bool
Checks if the entity is attackable. Returns : true if the entity is attackable.
// ItemEntity.isAttackable() as bool;
myItemEntity . isAttackable();
Return Type:
bool
Checks if this entity is colliding with the given BlockState
at the given BlockPos
. Returns : true if the entity is colliding with the block.
myItemEntity . isColliding(myBlockPos, myBlockState);
Return Type:
bool
Checks if the entity is crouching. // ItemEntity.isCrouching as bool
Return Type:
bool
Checks if the entity is crouching. Returns : true if the entity is crouching.
// ItemEntity.isCrouching() as bool;
myItemEntity . isCrouching();
Return Type:
bool
Checks if the entity is currently glowing. // ItemEntity.isCurrentlyGlowing as bool
myItemEntity . isCurrentlyGlowing
Return Type:
bool
Checks if the entity is currently glowing. Returns : true if the entity is currently glowing.
// ItemEntity.isCurrentlyGlowing() as bool;
myItemEntity . isCurrentlyGlowing();
Return Type:
bool
Checks if the custom name of the entity is visible. // ItemEntity.isCustomNameVisible as bool
myItemEntity . isCustomNameVisible
Return Type:
bool
Checks if the custom name of the entity is visible. Returns : true if the custom name is visible.
// ItemEntity.isCustomNameVisible() as bool;
myItemEntity . isCustomNameVisible();
Return Type:
bool
Checks if the entity is descending. // ItemEntity.isDescending as bool
myItemEntity . isDescending
Return Type:
bool
Checks if the entity is descending. Returns : true if the entity is descending.
// ItemEntity.isDescending() as bool;
myItemEntity . isDescending();
Return Type:
bool
Checks if the entity is being discrete. // ItemEntity.isDiscrete as bool
Return Type:
bool
Checks if the entity is being discrete. Returns : true if the entity is being discrete.
// ItemEntity.isDiscrete() as bool;
myItemEntity . isDiscrete();
Return Type:
bool
Checks if the offset position from the entity's current position has a collision with a block or a liquid. Returns : true if the entity is free to move in the given position.
// ItemEntity.isFree(x as double, y as double, z as double) as bool;
myItemEntity . isFree(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x position to check.
y: double
Type: double
- The y position to check.
z: double
Type: double
- The z position to check.
Return Type:
bool
Checks if the entity is fully frozen. // ItemEntity.isFullyFrozen as bool
myItemEntity . isFullyFrozen
Return Type:
bool
Checks if the entity is fully frozen. Returns : true if the entity is fully frozen.
// ItemEntity.isFullyFrozen() as bool;
myItemEntity . isFullyFrozen();
Return Type:
bool
Checks if the entity is in lava. // ItemEntity.isInLava as bool
Return Type:
bool
Checks if the entity is in lava. Returns : true if the entity is in lava.
// ItemEntity.isInLava() as bool;
Return Type:
bool
Checks if the entity is invisible. // ItemEntity.isInvisible as bool
Return Type:
bool
Checks if the entity is invisible. Returns : true if the entity is invisible.
// ItemEntity.isInvisible() as bool;
myItemEntity . isInvisible();
Return Type:
bool
Checks if the entity is invisible to the given Player
. Returns : true if the entity is invisible to the player.
// ItemEntity.isInvisibleTo(player as Player ) as bool; myItemEntity . isInvisibleTo(myPlayer);
Return Type:
bool
Checks if the entity is invulnerable. // ItemEntity.isInvulnerable as bool
myItemEntity . isInvulnerable
Return Type:
bool
Checks if the entity is invulnerable. Returns : true if the entity is invulnerable.
// ItemEntity.isInvulnerable() as bool;
myItemEntity . isInvulnerable();
Return Type:
bool
Checks if the entity is invulnerable to the given DamageSource
. Returns : true if the entity is invulnerable to the damage source.
// ItemEntity.isInvulnerableTo(source as DamageSource ) as bool; myItemEntity . isInvulnerableTo(myDamageSource);
Return Type:
bool
Checks if the entity is in a wall. // ItemEntity.isInWall as bool
Return Type:
bool
Checks if the entity is in a wall. Returns : true if the entity is in a wall.
// ItemEntity.isInWall() as bool;
Return Type:
bool
Checks if the entity is in water. // ItemEntity.isInWater as bool
Return Type:
bool
Checks if the entity is in water. Returns : true if the entity is in water.
// ItemEntity.isInWater() as bool;
myItemEntity . isInWater();
Return Type:
bool
Checks if the entity is in water or a bubble column. // ItemEntity.isInWaterOrBubble as bool
myItemEntity . isInWaterOrBubble
Return Type:
bool
Checks if the entity is in water or a bubble column. Returns : true if the entity is in water or a bubble column.
// ItemEntity.isInWaterOrBubble() as bool;
myItemEntity . isInWaterOrBubble();
Return Type:
bool
Checks if the entity is in water or rain. // ItemEntity.isInWaterOrRain as bool
myItemEntity . isInWaterOrRain
Return Type:
bool
Checks if the entity is in water or rain. Returns : true if the entity is in water or rain.
// ItemEntity.isInWaterOrRain() as bool;
myItemEntity . isInWaterOrRain();
Return Type:
bool
Checks if the entity is in water or rain or a bubble column. // ItemEntity.isInWaterRainOrBubble as bool
myItemEntity . isInWaterRainOrBubble
Return Type:
bool
Checks if the entity is in water or rain or a bubble column. Returns : true if the entity is in water or rain or a bubble column.
// ItemEntity.isInWaterRainOrBubble() as bool;
myItemEntity . isInWaterRainOrBubble();
Return Type:
bool
Checks if the entity has no gravity. // ItemEntity.isNoGravity as bool
Return Type:
bool
Checks if the entity has no gravity. Returns : true if the entity has no gravity.
// ItemEntity.isNoGravity() as bool;
myItemEntity . isNoGravity();
Return Type:
bool
Checks if the entity is on fire. // ItemEntity.isOnFire as bool
Return Type:
bool
Checks if the entity is on fire. Returns : true if the entity is on fire.
// ItemEntity.isOnFire() as bool;
Return Type:
bool
Checks if the entity is on portal cooldown. // ItemEntity.isOnPortalCooldown as bool
myItemEntity . isOnPortalCooldown
Return Type:
bool
Checks if the entity is on portal cooldown. Returns : true if the entity is on portal cooldown.
// ItemEntity.isOnPortalCooldown() as bool;
myItemEntity . isOnPortalCooldown();
Return Type:
bool
Checks if the entity is a passenger. // ItemEntity.isPassenger as bool
Return Type:
bool
Checks if the entity is a passenger. Returns : true if the entity is a passenger.
// ItemEntity.isPassenger() as bool;
myItemEntity . isPassenger();
Return Type:
bool
Checks if the entity is a passenger of the same vehicle. Returns : true if the entity is a passenger of the same vehicle.
// ItemEntity.isPassengerOfSameVehicle(entity as Entity ) as bool; myItemEntity . isPassengerOfSameVehicle(myEntity);
Return Type:
bool
Checks if the entity is pickable. // ItemEntity.isPickable as bool
Return Type:
bool
Checks if the entity is pickable. Returns : true if the entity is pickable.
// ItemEntity.isPickable() as bool;
myItemEntity . isPickable();
Return Type:
bool
Checks if the entity is pushable. // ItemEntity.isPushable as bool
Return Type:
bool
Checks if the entity is pushable. Returns : true if the entity is pushable.
// ItemEntity.isPushable() as bool;
myItemEntity . isPushable();
Return Type:
bool
Checks if the entity is pushed by fluid. // ItemEntity.isPushedByFluid as bool
myItemEntity . isPushedByFluid
Return Type:
bool
Checks if the entity is pushed by fluid. Returns : true if the entity is pushed by fluid.
// ItemEntity.isPushedByFluid() as bool;
myItemEntity . isPushedByFluid();
Return Type:
bool
Checks if the entity has been removed. // ItemEntity.isRemoved as bool
Return Type:
bool
Checks if the entity has been removed. Returns : Whether the entity has been removed.
// ItemEntity.isRemoved() as bool;
myItemEntity . isRemoved();
Return Type:
bool
Checks if the shift key is down. // ItemEntity.isShiftKeyDown as bool
myItemEntity . isShiftKeyDown
Return Type:
bool
Checks if the shift key is down. Returns : true if the shift key is down.
// ItemEntity.isShiftKeyDown() as bool;
myItemEntity . isShiftKeyDown();
Return Type:
bool
Checks if the entity is silent, meaning it won't play any sounds. // ItemEntity.isSilent as bool
Return Type:
bool
Checks if the entity is silent, meaning it won't play any sounds. Returns : true if the entity is silent.
// ItemEntity.isSilent() as bool;
Return Type:
bool
Checks if the entity is a spectator. // ItemEntity.isSpectator as bool
Return Type:
bool
Checks if the entity is a spectator. Returns : true if the entity is a spectator.
// ItemEntity.isSpectator() as bool;
myItemEntity . isSpectator();
Return Type:
bool
Checks if the entity is sprinting. // ItemEntity.isSprinting as bool
Return Type:
bool
Checks if the entity is sprinting. Returns : true if the entity is sprinting.
// ItemEntity.isSprinting() as bool;
myItemEntity . isSprinting();
Return Type:
bool
Checks if the entity is stepping carefully. // ItemEntity.isSteppingCarefully as bool
myItemEntity . isSteppingCarefully
Return Type:
bool
Checks if the entity is stepping carefully. Returns : true if the entity is stepping carefully.
// ItemEntity.isSteppingCarefully() as bool;
myItemEntity . isSteppingCarefully();
Return Type:
bool
Checks if the entity is suppressing bounce. // ItemEntity.isSuppressingBounce as bool
myItemEntity . isSuppressingBounce
Return Type:
bool
Checks if the entity is suppressing bounce. Returns : true if the entity is suppressing bounce.
// ItemEntity.isSuppressingBounce() as bool;
myItemEntity . isSuppressingBounce();
Return Type:
bool
Checks if the entity is swimming. // ItemEntity.isSwimming as bool
Return Type:
bool
Checks if the entity is swimming. Returns : true if the entity is swimming.
// ItemEntity.isSwimming() as bool;
myItemEntity . isSwimming();
Return Type:
bool
Checks if the entity is underwater. // ItemEntity.isUnderWater as bool
myItemEntity . isUnderWater
Return Type:
bool
Checks if the entity is underwater. Returns : true if the entity is underwater.
// ItemEntity.isUnderWater() as bool;
myItemEntity . isUnderWater();
Return Type:
bool
Checks if the entity is a vehicle. // ItemEntity.isVehicle as bool
Return Type:
bool
Checks if the entity is a vehicle. Returns : true if the entity is a vehicle.
// ItemEntity.isVehicle() as bool;
myItemEntity . isVehicle();
Return Type:
bool
Checks if the entity is visually crawling. // ItemEntity.isVisuallyCrawling as bool
myItemEntity . isVisuallyCrawling
Return Type:
bool
Checks if the entity is visually crawling. Returns : true if the entity is visually crawling.
// ItemEntity.isVisuallyCrawling() as bool;
myItemEntity . isVisuallyCrawling();
Return Type:
bool
Checks if the entity is visually swimming. // ItemEntity.isVisuallySwimming as bool
myItemEntity . isVisuallySwimming
Return Type:
bool
Checks if the entity is visually swimming. Returns : true if the entity is visually swimming.
// ItemEntity.isVisuallySwimming() as bool;
myItemEntity . isVisuallySwimming();
Return Type:
bool
Sets the IItemStack
inside this ItemEntity. myItemEntity . item = myIItemStack;
Sets the IItemStack
inside this ItemEntity. myItemEntity . item( < item : minecraft:diamond > );
Causes the entity to take damage from lava. // ItemEntity.lavaHurt();
Gets the Level
of the entity. // ItemEntity.level as Level
Return Type:
Level
Gets the look angle of the entity. // ItemEntity.lookAngle as Vec3
Return Type:
Vec3
Gets the look angle of the entity. Returns : The look angle of the entity.
// ItemEntity.lookAngle() as Vec3 ; myItemEntity . lookAngle();
Return Type:
Vec3
Gets the maximum air supply of the entity. // ItemEntity.maxAirSupply as int
myItemEntity . maxAirSupply
Return Type:
int
Gets the maximum air supply of the entity. Returns : The maximum air supply of the entity.
// ItemEntity.maxAirSupply() as int;
myItemEntity . maxAirSupply();
Return Type:
int
Gets the maximum fall distance of the entity. // ItemEntity.maxFallDistance as int
myItemEntity . maxFallDistance
Return Type:
int
Gets the maximum fall distance of the entity. Returns : The maximum fall distance of the entity.
// ItemEntity.maxFallDistance() as int;
myItemEntity . maxFallDistance();
Return Type:
int
Gets the motion direction of the entity. myItemEntity . motionDirection
Return Type:
Direction
Gets the motion direction of the entity. Returns : The motion direction of the entity.
// ItemEntity.motionDirection() as Direction ; myItemEntity . motionDirection();
Return Type:
Direction
Moves the entity relative to its current position. // ItemEntity.moveRelative(amount as float, relative as Vec3 ); myItemEntity . moveRelative(myFloat, myVec3);
Parameters:
amount: float
Type: float
- The amount to move the entity by.
relative: Vec3
Type: Vec3
- The relative position to move the entity by. Moves the entity to the given position. // ItemEntity.moveTo(vec as Vec3 ); myItemEntity . moveTo(myVec3);
Parameters:
vec: Vec3
Type: Vec3
- The position to move the entity to. Moves the entity to the given position. // ItemEntity.moveTo(x as double, y as double, z as double);
myItemEntity . moveTo(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x position to move the entity to.
y: double
Type: double
- The y position to move the entity to.
z: double
Type: double
- The z position to move the entity to.
Moves the entity to the given position. // ItemEntity.moveTo(pos as BlockPos , yaw as float, pitch as float); myItemEntity . moveTo(myBlockPos, myFloat, myFloat);
Parameters:
yaw: float
Type: float
- The yaw to move the entity to.
pitch: float
Type: float
- The pitch to move the entity to.
Moves the entity to the given position. // ItemEntity.moveTo(x as double, y as double, z as double, yaw as float, pitch as float);
myItemEntity . moveTo(myDouble, myDouble, myDouble, myFloat, myFloat);
Parameters:
x: double
Type: double
- The x position to move the entity to.
y: double
Type: double
- The y position to move the entity to.
z: double
Type: double
- The z position to move the entity to.
yaw: float
Type: float
- The yaw to move the entity to.
pitch: float
Type: float
- The pitch to move the entity to.
Gets the name of the entity.
Return Type:
Component
Gets the name of the entity. Returns : The name of the entity.
Return Type:
Component
Checks if the entity is on the ground. // ItemEntity.onGround as bool
Return Type:
bool
Gets the position of the entity on the ground.
Return Type:
BlockPos
Gets the position of the entity on the ground. Returns : The position of the entity on the ground.
Return Type:
BlockPos
Gets the passengers of the entity. // ItemEntity.passengers as List< Entity >
Return Type:
List <Entity >
Gets the passengers of the entity. Returns : The passengers of the entity.
// ItemEntity.passengers() as List< Entity >; myItemEntity . passengers();
Return Type:
List <Entity >
Gets the percent the entity is frozen. // ItemEntity.percentFrozen as float
myItemEntity . percentFrozen
Return Type:
float
Gets the percent the entity is frozen. Returns : The percent the entity is frozen.
// ItemEntity.percentFrozen() as float;
myItemEntity . percentFrozen();
Return Type:
float
Gets the piston push reaction of the entity. myItemEntity . pistonPushReaction
Return Type:
PushReaction
Gets the piston push reaction of the entity. Returns : The piston push reaction of the entity.
myItemEntity . pistonPushReaction();
Return Type:
PushReaction
Plays a sound at the entity's location. // ItemEntity.playSound(sound as SoundEvent , volume as float, pitch as float); myItemEntity . playSound(mySoundEvent, myFloat, myFloat);
Parameters:
volume: float
Type: float
- The volume of the sound.
pitch: float
Type: float
- The pitch of the sound.
Gets the position of the entity. // ItemEntity.position as Vec3
Return Type:
Vec3
Gets the position of the entity. Returns : The position of the entity.
// ItemEntity.position() as Vec3 ;
Return Type:
Vec3
Positions the rider of the entity. // ItemEntity.positionRider(entity as Entity ); myItemEntity . positionRider(myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity to position the rider of. Gets the registry name of the entity. myItemEntity . registryName
Return Type:
ResourceLocation
Gets the registry name of the entity. Returns : The registry name of the entity.
myItemEntity . registryName();
Return Type:
ResourceLocation
Removes a tag from the entity. Returns : true if the tag was removed.
// ItemEntity.removeTag(tagName as string) as bool;
myItemEntity . removeTag(myString);
Parameters:
tagName: string
Type: string
- The name of the tag to remove.
Return Type:
bool
Removes the vehicle of the entity. // ItemEntity.removeVehicle();
myItemEntity . removeVehicle();
Gets the root vehicle of the entity. // ItemEntity.rootVehicle as Entity
Return Type:
Entity
Gets the root vehicle of the entity. Returns : The root vehicle of the entity.
// ItemEntity.rootVehicle() as Entity ; myItemEntity . rootVehicle();
Return Type:
Entity
Sends a message to the command source. // ItemEntity.sendMessage(component as Component ); myItemEntity . sendMessage(myComponent);
Sets the air supply of the entity. // ItemEntity.setAirSupply(air as int);
myItemEntity . setAirSupply(myInt);
Parameters:
air: int
Type: int
- The new air supply of the entity.
// ItemEntity.setAttachmentData<T>(type as AttachmentType <T>, data as T) as T?; myItemEntity . setAttachmentData < T>(myAttachmentType, myT);
Return Type:
T ?
// ItemEntity.setAttachmentData<T>(type as Supplier< AttachmentType <T>>, data as T) as T?; myItemEntity . setAttachmentData < T>(mySupplier, myT);
Return Type:
T ?
Sets the custom name of the entity. // ItemEntity.setCustomName(name as Component ); myItemEntity . setCustomName(myComponent);
Sets the custom name visible state of the entity. // ItemEntity.setCustomNameVisible(visible as bool);
myItemEntity . setCustomNameVisible(myBool);
Parameters:
visible: bool
Type: bool
- true if the custom name should be visible.
Set this item entity to have the default pickup delay. // ItemEntity.setDefaultPickUpDelay();
myItemEntity . setDefaultPickUpDelay();
Sets the delta movement of the entity. // ItemEntity.setDeltaMovement(xDelta as double, yDelta as double, zDelta as double);
myItemEntity . setDeltaMovement(myDouble, myDouble, myDouble);
Parameters:
xDelta: double
Type: double
- The x delta movement to set.
yDelta: double
Type: double
- The y delta movement to set.
zDelta: double
Type: double
- The z delta movement to set.
Makes the entity glow. // ItemEntity.setGlowingTag(glowing as bool);
myItemEntity . setGlowingTag(myBool);
Parameters:
glowing: bool
Type: bool
- true if the entity should be glowing.
Sets the invisible state of the entity. // ItemEntity.setInvisible(invisible as bool);
myItemEntity . setInvisible(myBool);
Parameters:
invisible: bool
Type: bool
- true if the entity should be invisible.
Sets the invulnerable state of the entity. // ItemEntity.setInvulnerable(invulnerable as bool);
myItemEntity . setInvulnerable(myBool);
Parameters:
invulnerable: bool
Type: bool
- true if the entity should be invulnerable.
Sets whether the entity is in powder snow. // ItemEntity.setIsInPowderSnow(inPowderSnow as bool);
myItemEntity . setIsInPowderSnow(myBool);
Parameters:
inPowderSnow: bool
Type: bool
- Whether the entity is in powder snow.
Set this item entity to never be picked up. // ItemEntity.setNeverPickUp();
myItemEntity . setNeverPickUp();
Sets if the entity has no gravity. // ItemEntity.setNoGravity(noGravity as bool);
myItemEntity . setNoGravity(myBool);
Parameters:
noGravity: bool
Type: bool
- The no gravity state to set the entity to.
Set this item entity to not have a pickup delay. // ItemEntity.setNoPickUpDelay();
myItemEntity . setNoPickUpDelay();
Sets the old position and rotation of the entity. // ItemEntity.setOldPosAndRot();
myItemEntity . setOldPosAndRot();
Sets if the entity is on the ground. // ItemEntity.setOnGround(onGround as bool);
myItemEntity . setOnGround(myBool);
Parameters:
onGround: bool
Type: bool
- The on ground state to set the entity to.
Sets the pickup delay in ticks for this item entity. // ItemEntity.setPickUpDelay(ticks as int);
myItemEntity . setPickUpDelay(myInt);
Parameters:
ticks: int
Type: int
- The number of ticks to delay the pickup for.
Sets the portal cooldown of the entity. // ItemEntity.setPortalCooldown();
myItemEntity . setPortalCooldown();
Sets the position of the entity. // ItemEntity.setPos(position as Vec3 ); myItemEntity . setPos(myVec3);
Parameters:
position: Vec3
Type: Vec3
- The position to set the entity to. Sets the position of the entity. // ItemEntity.setPos(x as double, y as double, z as double);
myItemEntity . setPos(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x position to set the entity to.
y: double
Type: double
- The y position to set the entity to.
z: double
Type: double
- The z position to set the entity to.
Sets the position of the entity to the given coordinates. // ItemEntity.setPosRaw(x as double, y as double, z as double);
myItemEntity . setPosRaw(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x coordinate to set the position to.
y: double
Type: double
- The y coordinate to set the position to.
z: double
Type: double
- The z coordinate to set the position to.
Removes this entity with the given removal reason . myItemEntity . setRemoved(myRemovalReason);
Sets the shift key down state of the entity. // ItemEntity.setShiftKeyDown(keyDown as bool);
myItemEntity . setShiftKeyDown(myBool);
Parameters:
keyDown: bool
Type: bool
- true if the shift key is down.
Sets if the entity is silent. // ItemEntity.setSilent(silent as bool);
myItemEntity . setSilent(myBool);
Parameters:
silent: bool
Type: bool
- The silent state to set the entity to.
Sets the sprinting state of the entity. // ItemEntity.setSprinting(sprinting as bool);
myItemEntity . setSprinting(myBool);
Parameters:
sprinting: bool
Type: bool
- true if the entity should be sprinting.
Sets the swimming state of the entity. // ItemEntity.setSwimming(swimming as bool);
myItemEntity . setSwimming(myBool);
Parameters:
swimming: bool
Type: bool
- true if the entity should be swimming.
Sets the number of ticks the entity has been frozen. // ItemEntity.setTicksFrozen(ticks as int);
myItemEntity . setTicksFrozen(myInt);
Parameters:
ticks: int
Type: int
- The new number of ticks the entity has been frozen.
Checks if the entity should be saved. // ItemEntity.shouldBeSaved as bool
myItemEntity . shouldBeSaved
Return Type:
bool
Checks if the entity should be saved. Returns : true if the entity should be saved.
// ItemEntity.shouldBeSaved() as bool;
myItemEntity . shouldBeSaved();
Return Type:
bool
Checks if the commands from this source should inform admins. // ItemEntity.shouldInformAdmins as bool
myItemEntity . shouldInformAdmins
Return Type:
bool
Checks if the commands from this source should inform admins. Returns : True if the commands from this source should inform admins, false otherwise.
// ItemEntity.shouldInformAdmins() as bool;
myItemEntity . shouldInformAdmins();
Return Type:
bool
Checks if the entity should show its name. // ItemEntity.shouldShowName as bool
myItemEntity . shouldShowName
Return Type:
bool
Checks if the entity should show its name. Returns : true if the entity should show its name.
// ItemEntity.shouldShowName() as bool;
myItemEntity . shouldShowName();
Return Type:
bool
Checks if the entity should show vehicle health. // ItemEntity.showVehicleHealth as bool
myItemEntity . showVehicleHealth
Return Type:
bool
Checks if the entity should show vehicle health. Returns : true if the entity should show vehicle health.
// ItemEntity.showVehicleHealth() as bool;
myItemEntity . showVehicleHealth();
Return Type:
bool
Gets the SoundSource
of the entity. Returns : The sound source of the entity.
myItemEntity . soundSource();
Return Type:
SoundSource
Starts riding the given entity. Returns : true if the entity started riding.
// ItemEntity.startRiding(entity as Entity ) as bool; myItemEntity . startRiding(myEntity);
Return Type:
bool
Starts riding the given entity. Returns : true if the entity started riding.
// ItemEntity.startRiding(entity as Entity , force as bool) as bool; myItemEntity . startRiding(myEntity, myBool);
Parameters:
force: bool
Type: bool
- true if the entity should be forced to start riding.
Return Type:
bool
Stops riding the entity. // ItemEntity.stopRiding();
myItemEntity . stopRiding();
Gets the UUID of the entity as a string. // ItemEntity.stringUUID as string
Return Type:
string
Gets the UUID of the entity as a string. Returns : The UUID of the entity as a string.
// ItemEntity.stringUUID() as string;
myItemEntity . stringUUID();
Return Type:
string
Gets the tags of the entity. These tags are arbitrary strings that can be attached to an entity. A single entity is limited to 1024. // ItemEntity.tags as Set<string>
Return Type:
Set <string >
Gets the tags of the entity. These tags are arbitrary strings that can be attached to an entity. A single entity is limited to 1024. Returns : The tags of the entity.
// ItemEntity.tags() as Set<string>;
Return Type:
Set <string >
Gets the team color of the entity. // ItemEntity.teamColor as int
Return Type:
int
Gets the team color of the entity. Returns : The team color of the entity.
// ItemEntity.teamColor() as int;
myItemEntity . teamColor();
Return Type:
int
Teleports the entity to the given position. // ItemEntity.teleportTo(x as double, y as double, z as double);
myItemEntity . teleportTo(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x coordinate to teleport to.
y: double
Type: double
- The y coordinate to teleport to.
z: double
Type: double
- The z coordinate to teleport to.
Gets the number of ticks the entity has been frozen. // ItemEntity.ticksFrozen as int
Return Type:
int
Gets the number of ticks the entity has been frozen. Returns : The number of ticks the entity has been frozen.
// ItemEntity.ticksFrozen() as int;
myItemEntity . ticksFrozen();
Return Type:
int
Gets the number of ticks required to freeze the entity. // ItemEntity.ticksRequiredToFreeze as int
myItemEntity . ticksRequiredToFreeze
Return Type:
int
Gets the number of ticks required to freeze the entity. Returns : The number of ticks required to freeze the entity.
// ItemEntity.ticksRequiredToFreeze() as int;
myItemEntity . ticksRequiredToFreeze();
Return Type:
int
Turns the entity. // ItemEntity.turn(yaw as double, pitch as double);
myItemEntity . turn(myDouble, myDouble);
Parameters:
yaw: double
Type: double
- The yaw to turn the entity to.
pitch: double
Type: double
- The pitch to turn the entity to.
Removes any passengers and stops riding the current entity.
Updates the custom NBT data for this Entity. // ItemEntity.updateCustomData(data as MapData ); myItemEntity . updateCustomData({custom: "data" });
myItemEntity . updateCustomEntityTag(myLevel, myPlayer, myMapData);
Updates the NBT data of this Entity. // ItemEntity.updateData(data as MapData ); myItemEntity . updateData({key: "value" });
Gets the UUID of the entity. // ItemEntity.uuid as UUID
Return Type:
UUID
Gets the UUID of the entity. Returns : The UUID of the entity.
// ItemEntity.uuid() as UUID;
Return Type:
UUID
Gets the vehicle of the entity. // ItemEntity.vehicle as Entity
Return Type:
Entity
Gets the vehicle of the entity. Returns : The vehicle of the entity.
// ItemEntity.vehicle() as Entity ;
Return Type:
Entity
Gets the x coordinate of the entity. // ItemEntity.x as double
Return Type:
double
Gets the x coordinate of the entity. Returns : The x coordinate of the entity.
// ItemEntity.x() as double;
Return Type:
double
Gets the y coordinate of the entity. // ItemEntity.y as double
Return Type:
double
Gets the y coordinate of the entity. Returns : The y coordinate of the entity.
// ItemEntity.y() as double;
Return Type:
double
Gets the z coordinate of the entity. // ItemEntity.z as double
Return Type:
double
Gets the z coordinate of the entity. Returns : The z coordinate of the entity.
// ItemEntity.z() as double;
Return Type:
double