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.villager . AbstractVillager;
AbstractVillager extends AgeableMob
.
AbstractVillager
implements the following interfaces:
Merchant
,Targeting
,Nameable
,EntityAccess
,CommandSource
,IAttachmentHolder
Undocumented Interfaces InventoryCarrier
, Npc
, EquipmentUser
, Leashable
, Attackable
, ILivingEntityExtension
, SyncedDataHolder
, ScoreHolder
, IEntityExtension
, INBTSerializable <CompoundTag >
Gets the absorption amount for this entity. // AbstractVillager.absorptionAmount as float
myAbstractVillager . absorptionAmount
Return Type:
float
Gets the absorption amount for this entity. Returns : The absorption amount.
// AbstractVillager.absorptionAmount() as float;
myAbstractVillager . absorptionAmount();
Return Type:
float
Checks if the commands from this source should return failure messages // AbstractVillager.acceptsFailure as bool
myAbstractVillager . 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.
// AbstractVillager.acceptsFailure() as bool;
myAbstractVillager . acceptsFailure();
Return Type:
bool
Checks if the commands from this source should return successful messages // AbstractVillager.acceptsSuccess as bool
myAbstractVillager . 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.
// AbstractVillager.acceptsSuccess() as bool;
myAbstractVillager . acceptsSuccess();
Return Type:
bool
Gets a map of active effects. Returns : The active effects map.
myAbstractVillager . activeEffectsMap();
Return Type:
MobEffectInstance [MobEffect ]
Adds an effect to this entity. Returns : True if the effect was added, false otherwise.
myAbstractVillager . addEffect(myMobEffectInstance);
Return Type:
bool
Adds an effect to this entity. Returns : True if the effect was added, false otherwise.
myAbstractVillager . addEffect(myMobEffectInstance, myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity that is the source of the effect.
Return Type:
bool
Adds a tag to the entity, returning false if the entity has over 1024 Returns : true if the tag was added.
// AbstractVillager.addTag(tagName as string) as bool;
myAbstractVillager . addTag(myString);
Parameters:
tagName: string
Type: string
- The name of the tag to add.
Return Type:
bool
Checks if the mob is aggressive. // AbstractVillager.aggressive as bool
myAbstractVillager . aggressive
Return Type:
bool
Sets whether the mob should be aggressive. // AbstractVillager.aggressive = (value as bool);
myAbstractVillager . aggressive = myBool;
Parameters:
value: bool
Type: bool
- Whether the mob should be aggressive.
Gets the current air supply of the entity. // AbstractVillager.airSupply as int
myAbstractVillager . airSupply
Return Type:
int
Gets the current air supply of the entity. Returns : The current air supply of the entity.
// AbstractVillager.airSupply() as int;
myAbstractVillager . airSupply();
Return Type:
int
Gets all slots. // AbstractVillager.allSlots as Iterable< ItemStack > myAbstractVillager . allSlots
Return Type:
Iterable <ItemStack >
Gets all slots. Returns : An iterable of item stacks representing all slots.
// AbstractVillager.allSlots() as Iterable< ItemStack >; myAbstractVillager . allSlots();
Return Type:
Iterable <ItemStack >
Checks if the command source always accepts. // AbstractVillager.alwaysAccepts as bool
myAbstractVillager . alwaysAccepts
Return Type:
bool
Checks if the command source always accepts. Returns : True if the command source always accepts, false otherwise.
// AbstractVillager.alwaysAccepts() as bool;
myAbstractVillager . alwaysAccepts();
Return Type:
bool
Gets the interval of the ambient sound for this mob. // AbstractVillager.ambientSoundInterval as int
myAbstractVillager . ambientSoundInterval
Return Type:
int
Gets the armor cover percentage for this entity. This is a value from 0 to 1 that represents the percentage of the entity's body that is covered by armor. // AbstractVillager.armorCoverPercentage as float
myAbstractVillager . armorCoverPercentage
Return Type:
float
Gets the armor cover percentage for this entity. This is a value from 0 to 1 that represents the percentage of the entity's body that is covered by armor. Returns : The armor cover percentage.
// AbstractVillager.armorCoverPercentage() as float;
myAbstractVillager . armorCoverPercentage();
Return Type:
float
Gets this entity's armor items. // AbstractVillager.armorSlots as Iterable< ItemStack > myAbstractVillager . armorSlots
Return Type:
Iterable <ItemStack >
Gets this entity's armor items. Returns : An iterable of item stacks representing the armor items.
// AbstractVillager.armorSlots() as Iterable< ItemStack >; myAbstractVillager . armorSlots();
Return Type:
Iterable <ItemStack >
Gets the armor value for this entity. // AbstractVillager.armorValue as int
myAbstractVillager . armorValue
Return Type:
int
Gets the armor value for this entity. Returns : The armor value.
// AbstractVillager.armorValue() as int;
myAbstractVillager . armorValue();
Return Type:
int
Gets how many arrows are currently in this entity. // AbstractVillager.arrowCount as int
myAbstractVillager . arrowCount
Return Type:
int
Gets how many arrows are currently in this entity. Returns : The arrow count.
// AbstractVillager.arrowCount() as int;
myAbstractVillager . arrowCount();
Return Type:
int
Triggers the eat event for this mob. This is used by sheep when they eat grass to regrow their wool / grow up. // AbstractVillager.ate();
myAbstractVillager . ate();
Checks if the entity is attackable. // AbstractVillager.attackable as bool
myAbstractVillager . attackable
Return Type:
bool
Checks if the entity is attackable. Returns : True if the entity is attackable, false otherwise.
// AbstractVillager.attackable() as bool;
myAbstractVillager . attackable();
Return Type:
bool
Sets whether the mob should be a baby. // AbstractVillager.baby = (value as bool);
myAbstractVillager . baby = myBool;
Parameters:
value: bool
Type: bool
- Whether the mob should be a baby.
Gets the height of the bounding box of the entity. // AbstractVillager.bbHeight as float
myAbstractVillager . bbHeight
Return Type:
float
Gets the height of the bounding box of the entity. Returns : The height of the bounding box of the entity.
// AbstractVillager.bbHeight() as float;
myAbstractVillager . bbHeight();
Return Type:
float
Gets the width of the bounding box of the entity. // AbstractVillager.bbWidth as float
myAbstractVillager . bbWidth
Return Type:
float
Gets the width of the bounding box of the entity. Returns : The width of the bounding box of the entity.
// AbstractVillager.bbWidth() as float;
myAbstractVillager . bbWidth();
Return Type:
float
Gets the orientation of the bed that the entity is sleeping on. // AbstractVillager.bedOrientation as Direction myAbstractVillager . bedOrientation
Return Type:
Direction
Gets the orientation of the bed that the entity is sleeping on. Returns : The orientation of the bed that the entity is sleeping on.
// AbstractVillager.bedOrientation() as Direction ; myAbstractVillager . bedOrientation();
Return Type:
Direction
Gets the BlockPos
of the entity. // AbstractVillager.blockPosiion as BlockPos myAbstractVillager . blockPosiion
Return Type:
BlockPos
Gets the BlockPos
of the entity. Returns : The BlockPos
of the entity.
// AbstractVillager.blockPosiion() as BlockPos ; myAbstractVillager . blockPosiion();
Return Type:
BlockPos
Gets the position
of the entity. // AbstractVillager.blockPosition as BlockPos myAbstractVillager . blockPosition
Return Type:
BlockPos
Gets the position
of the entity. Returns : The block position of the entity.
// AbstractVillager.blockPosition() as BlockPos ; myAbstractVillager . blockPosition();
Return Type:
BlockPos
Gets the x coordinate of the entity. // AbstractVillager.blockX as int
myAbstractVillager . blockX
Return Type:
int
Gets the x coordinate of the entity. Returns : The x coordinate of the entity.
// AbstractVillager.blockX() as int;
myAbstractVillager . blockX();
Return Type:
int
Gets the y coordinate of the entity. // AbstractVillager.blockY as int
myAbstractVillager . blockY
Return Type:
int
Gets the y coordinate of the entity. Returns : The y coordinate of the entity.
// AbstractVillager.blockY() as int;
myAbstractVillager . blockY();
Return Type:
int
Gets the z coordinate of the entity. // AbstractVillager.blockZ as int
myAbstractVillager . blockZ
Return Type:
int
Gets the z coordinate of the entity. Returns : The z coordinate of the entity.
// AbstractVillager.blockZ() as int;
myAbstractVillager . blockZ();
Return Type:
int
Gets the bounding box of the entity. // AbstractVillager.boundingBox as AABB myAbstractVillager . boundingBox
Return Type:
AABB
Gets the bounding box of the entity. Returns : The bounding box of the entity.
// AbstractVillager.boundingBox() as AABB ; myAbstractVillager . boundingBox();
Return Type:
AABB
Gets the bounding box for culling of the entity. // AbstractVillager.boundingBoxForCulling as AABB myAbstractVillager . boundingBoxForCulling
Return Type:
AABB
Gets the bounding box for culling of the entity. Returns : The bounding box for culling of the entity.
// AbstractVillager.boundingBoxForCulling() as AABB ; myAbstractVillager . boundingBoxForCulling();
Return Type:
AABB
Checks if this entity can attack a target. Returns : True if this entity can attack the target, false otherwise.
// AbstractVillager.canAttack(target as LivingEntity ) as bool; myAbstractVillager . canAttack(myLivingEntity);
Return Type:
bool
Checks if this entity can be affected by a specific effect. Returns : True if this entity can be affected by the effect, false otherwise.
myAbstractVillager . canBeAffected(myMobEffectInstance);
Return Type:
bool
Checks if the entity can be collided with. // AbstractVillager.canBeCollidedWith as bool
myAbstractVillager . canBeCollidedWith
Return Type:
bool
Checks if the entity can be collided with. Returns : true if the entity can be collided with.
// AbstractVillager.canBeCollidedWith() as bool;
myAbstractVillager . canBeCollidedWith();
Return Type:
bool
Checks if the mob can be leashed. Returns : Whether the mob can be leashed.
// AbstractVillager.canBeLeashed() as bool;
myAbstractVillager . canBeLeashed();
Return Type:
bool
Checks if this entity can be seen as an enemy. Some things this checks are if this entity is a player and it is in creative mode, or if this entity is an axolotl if it is playing dead. // AbstractVillager.canBeSeenAsEnemy as bool
myAbstractVillager . canBeSeenAsEnemy
Return Type:
bool
Checks if this entity can be seen as an enemy. Some things this checks are if this entity is a player and it is in creative mode, or if this entity is an axolotl if it is playing dead. Returns : True if this entity can be seen as an enemy, false otherwise.
// AbstractVillager.canBeSeenAsEnemy() as bool;
myAbstractVillager . canBeSeenAsEnemy();
Return Type:
bool
Checks if this entity can be seen by anyone. // AbstractVillager.canBeSeenByAnyone as bool
myAbstractVillager . canBeSeenByAnyone
Return Type:
bool
Checks if this entity can be seen by anyone. Returns : True if this entity can be seen by anyone, false otherwise.
// AbstractVillager.canBeSeenByAnyone() as bool;
myAbstractVillager . canBeSeenByAnyone();
Return Type:
bool
Checks if this entity can breathe underwater. // AbstractVillager.canBreatheUnderwater as bool
myAbstractVillager . canBreatheUnderwater
Return Type:
bool
Checks if this entity can breathe underwater. Returns : True if the entity can breathe underwater, false otherwise.
// AbstractVillager.canBreatheUnderwater() as bool;
myAbstractVillager . canBreatheUnderwater();
Return Type:
bool
Checks if the entity can collide with the given entity. Returns : true if the entity can collide with the given entity.
// AbstractVillager.canCollideWith(other as Entity ) as bool; myAbstractVillager . canCollideWith(myEntity);
Parameters:
other: Entity
Type: Entity
- The entity to check if the entity can collide with.
Return Type:
bool
Checks if the mob can fire a projectile weapon. Returns : Whether the mob can fire the weapon.
myAbstractVillager . canFireProjectileWeapon(myProjectileWeaponItem);
Return Type:
bool
Checks if the entity can freeze. // AbstractVillager.canFreeze as bool
myAbstractVillager . canFreeze
Return Type:
bool
Checks if the entity can freeze. Returns : Whether the entity can freeze.
// AbstractVillager.canFreeze() as bool;
myAbstractVillager . canFreeze();
Return Type:
bool
Checks if the mob can hold the given item. Returns : Whether the mob can hold the item.
// AbstractVillager.canHoldItem(stack as ItemStack ) as bool; myAbstractVillager . canHoldItem(myItemStack);
Return Type:
bool
Checks if the mob can pick up loot. // AbstractVillager.canPickUpLoot as bool
myAbstractVillager . canPickUpLoot
Return Type:
bool
Sets whether the mob can pick up loot. // AbstractVillager.canPickUpLoot = (value as bool);
myAbstractVillager . canPickUpLoot = myBool;
Parameters:
value: bool
Type: bool
- Whether the mob can pick up loot.
Checks if the mob can replace an item with another item. Returns : Whether the mob can replace the item.
// AbstractVillager.canReplaceEqualItem(toReplace as ItemStack , with as ItemStack ) as bool; myAbstractVillager . canReplaceEqualItem(myItemStack, myItemStack);
Return Type:
bool
Checks if the merchant can restock. // AbstractVillager.canRestock as bool
myAbstractVillager . canRestock
Return Type:
bool
Checks if the merchant can restock. Returns : true if the merchant can restock.
// AbstractVillager.canRestock() as bool;
myAbstractVillager . canRestock();
Return Type:
bool
Checks if the entity can stand on a specific fluid. Returns : True if the entity can stand on the fluid, false otherwise.
// AbstractVillager.canStandOnFluid(fluid as Fluid ) as bool; myAbstractVillager . canStandOnFluid(myFluid);
Return Type:
bool
Checks if the item can be worn as armor. Returns : True if the item can be worn as armor, false otherwise.
// AbstractVillager.canTakeItem(stack as ItemStack ) as bool; myAbstractVillager . canTakeItem(myItemStack);
Return Type:
bool
Checks if the mob can spawn in the given level
. Returns : Whether the mob can spawn in the given level.
// AbstractVillager.checkSpawnObstruction(level as LevelReader ) as bool; myAbstractVillager . checkSpawnObstruction(myLevelReader);
Return Type:
bool
Checks if the mob can spawn in the given level
with the given MobSpawnType
. Returns : Whether the mob can spawn in the given level.
myAbstractVillager . checkSpawnRules(myLevelAccessor, myMobSpawnType);
Return Type:
bool
Clears the fire of the entity. // AbstractVillager.clearFire();
myAbstractVillager . clearFire();
Clears the restriction for the mob. // AbstractVillager.clearRestriction();
myAbstractVillager . clearRestriction();
Clears the position that the entity is sleeping at. // AbstractVillager.clearSleepingPos();
myAbstractVillager . clearSleepingPos();
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.
// AbstractVillager.closerThan(other as Entity , distance as double) as bool; myAbstractVillager . 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. // AbstractVillager.commandSenderWorld as Level myAbstractVillager . commandSenderWorld
Return Type:
Level
Gets the Level
used when sending commands as this entity. Returns : The Level
used when sending commands as this entity.
// AbstractVillager.commandSenderWorld() as Level ; myAbstractVillager . commandSenderWorld();
Return Type:
Level
Gets the controlling passenger of the entity. // AbstractVillager.controllingPassenger as Entity myAbstractVillager . controllingPassenger
Return Type:
Entity
Gets the controlling passenger of the entity. Returns : The controlling passenger of the entity.
// AbstractVillager.controllingPassenger() as Entity ; myAbstractVillager . controllingPassenger();
Return Type:
Entity
Gets the custom NBT data for this Entity. // AbstractVillager.customData as MapData myAbstractVillager . customData
Return Type:
MapData
Gets the custom NBT data for this Entity. Returns : The custom data for this Entity.
// AbstractVillager.customData() as MapData ; myAbstractVillager . customData();
Return Type:
MapData
Gets the custom name of the entity. myAbstractVillager . customName
Return Type:
Component
myAbstractVillager . customName
Return Type:
Component
Gets the custom name of the entity. Returns : The custom name of the entity.
// AbstractVillager.customName() as Component ; myAbstractVillager . customName();
Return Type:
Component
// AbstractVillager.customName() as Component ; myAbstractVillager . 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. // AbstractVillager.dampensVibrations as bool
myAbstractVillager . 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.
// AbstractVillager.dampensVibrations() as bool;
myAbstractVillager . dampensVibrations();
Return Type:
bool
Gets the NBT data of this Entity. // AbstractVillager.data as MapData
Return Type:
MapData
Gets the NBT data of this Entity. Returns : The NBT data of this Entity.
// AbstractVillager.data() as MapData ; myAbstractVillager . data();
Return Type:
MapData
Gets the delta movement of the entity. // AbstractVillager.deltaMovement as Vec3 myAbstractVillager . deltaMovement
Return Type:
Vec3
Sets the delta movement of the entity. // AbstractVillager.deltaMovement = (deltaMovement as Vec3 ); myAbstractVillager . 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.
// AbstractVillager.deltaMovement() as Vec3 ; myAbstractVillager . deltaMovement();
Return Type:
Vec3
Sets the delta movement of the entity. // AbstractVillager.deltaMovement(deltaMovement as Vec3 ); myAbstractVillager . deltaMovement(myVec3);
Parameters:
deltaMovement: Vec3
Type: Vec3
- The delta movement to set. Kills this entity. myAbstractVillager . die(myDamageSource);
Gets the dimension changing delay of the entity. // AbstractVillager.dimensionChangingDelay as int
myAbstractVillager . dimensionChangingDelay
Return Type:
int
Gets the dimension changing delay of the entity. Returns : The dimension changing delay of the entity.
// AbstractVillager.dimensionChangingDelay() as int;
myAbstractVillager . dimensionChangingDelay();
Return Type:
int
Gets the direction of the entity. myAbstractVillager . direction
Return Type:
Direction
Gets the direction of the entity. Returns : The direction of the entity.
// AbstractVillager.direction() as Direction ; myAbstractVillager . direction();
Return Type:
Direction
Discards the entity. // AbstractVillager.discard();
myAbstractVillager . discard();
Checks if the entity dismounts underwater. // AbstractVillager.dismountsUnderwater as bool
myAbstractVillager . dismountsUnderwater
Return Type:
bool
Checks if the entity dismounts underwater. Returns : true if the entity dismounts underwater.
// AbstractVillager.dismountsUnderwater() as bool;
myAbstractVillager . dismountsUnderwater();
Return Type:
bool
Gets the display name of the entity. myAbstractVillager . displayName
Return Type:
Component
myAbstractVillager . displayName
Return Type:
Component
Gets the display name of the entity. Returns : The display name of the entity.
// AbstractVillager.displayName() as Component ; myAbstractVillager . displayName();
Return Type:
Component
// AbstractVillager.displayName() as Component ; myAbstractVillager . displayName();
Return Type:
Component
Gets the distance to the given entity. Returns : The distance to the given entity.
// AbstractVillager.distanceTo(entity as Entity ) as float; myAbstractVillager . 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.
// AbstractVillager.distanceToSqr(x as double, y as double, z as double) as double;
myAbstractVillager . 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.
// AbstractVillager.distanceToSqr(entity as Entity ) as double; myAbstractVillager . 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.
// AbstractVillager.distanceToSqr(vec as Vec3 ) as double; myAbstractVillager . distanceToSqr(myVec3);
Parameters:
vec: Vec3
Type: Vec3
- The vector to get the squared distance to.
Return Type:
double
// AbstractVillager.doHurtTarget(entity as Entity ) as bool; myAbstractVillager . doHurtTarget(myEntity);
Return Type:
bool
Drops the leash for the mob. // AbstractVillager.dropLeash(broadcastPacket as bool, dropLeash as bool);
myAbstractVillager . dropLeash(myBool, myBool);
Parameters:
broadcastPacket: bool
Type: bool
- Whether to broadcast a packet to the client.
dropLeash: bool
Type: bool
- Whether to drop the leash item.
Eats an item. Returns : The item that the entity ate.
myAbstractVillager . eat(myLevel, myItemStack);
Parameters:
level: Level
Type: Level
- The level that the entity is in.
Return Type:
ItemStack
Ejects the passengers of the entity. // AbstractVillager.ejectPassengers();
myAbstractVillager . ejectPassengers();
Equips the mob with the given item if possible. Returns : The item that was equipped.
myAbstractVillager . equipItemIfPossible(myItemStack);
Return Type:
ItemStack
Gets the eye height of the entity. // AbstractVillager.eyeHeight as float
myAbstractVillager . eyeHeight
Return Type:
float
Gets the eye height of the entity. Returns : The eye height of the entity.
// AbstractVillager.eyeHeight() as float;
myAbstractVillager . eyeHeight();
Return Type:
float
Gets the eye position of the entity. // AbstractVillager.eyePosition as Vec3 myAbstractVillager . eyePosition
Return Type:
Vec3
Gets the eye position of the entity. Returns : The eye position of the entity.
// AbstractVillager.eyePosition() as Vec3 ; myAbstractVillager . eyePosition();
Return Type:
Vec3
Gets the y coordinate of the entity's eyes. // AbstractVillager.eyeY as double
Return Type:
double
Gets the y coordinate of the entity's eyes. Returns : The y coordinate of the entity's eyes.
// AbstractVillager.eyeY() as double;
myAbstractVillager . eyeY();
Return Type:
double
Gets the ticks that the entity has been flying with an elytra. // AbstractVillager.fallFlyingTicks as int
myAbstractVillager . fallFlyingTicks
Return Type:
int
Gets the ticks that the entity has been flying with an elytra. Returns : The ticks that the entity has been flying with an elytra.
// AbstractVillager.fallFlyingTicks() as int;
myAbstractVillager . fallFlyingTicks();
Return Type:
int
Checks if the entity is fire immune. // AbstractVillager.fireImmune as bool
myAbstractVillager . fireImmune
Return Type:
bool
Checks if the entity is fire immune. Returns : true if the entity is fire immune.
// AbstractVillager.fireImmune() as bool;
myAbstractVillager . fireImmune();
Return Type:
bool
Gets the remaining fire ticks of the entity. // AbstractVillager.fireTicks as int
myAbstractVillager . fireTicks
Return Type:
int
Sets the remaining fire ticks of the entity. // AbstractVillager.fireTicks = (ticks as int);
myAbstractVillager . 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. // AbstractVillager.fireTicks(ticks as int);
myAbstractVillager . 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.
// AbstractVillager.fireTicks() as int;
myAbstractVillager . fireTicks();
Return Type:
int
Gets the first passenger of the entity. // AbstractVillager.firstPassenger as Entity myAbstractVillager . firstPassenger
Return Type:
Entity
Gets the first passenger of the entity. Returns : The first passenger of the entity.
// AbstractVillager.firstPassenger() as Entity ; myAbstractVillager . firstPassenger();
Return Type:
Entity
Gets the fluid jump threshold of the entity. // AbstractVillager.fluidJumpThreshold as double
myAbstractVillager . fluidJumpThreshold
Return Type:
double
Gets the fluid jump threshold of the entity. Returns : The fluid jump threshold of the entity.
// AbstractVillager.fluidJumpThreshold() as double;
myAbstractVillager . fluidJumpThreshold();
Return Type:
double
Forces this entity to have a specific effect, this does not force effects that can't affect this entity. myAbstractVillager . forceAddEffect(myMobEffectInstance, myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity that is the source of the effect. Gets the forward vector of the entity. // AbstractVillager.forward as Vec3 myAbstractVillager . forward
Return Type:
Vec3
Gets the forward vector of the entity. Returns : The forward vector of the entity.
// AbstractVillager.forward() as Vec3 ; myAbstractVillager . forward();
Return Type:
Vec3
// AbstractVillager.getAttachmentData<T>(type as AttachmentType <T>) as T; myAbstractVillager . getAttachmentData < T>(myAttachmentType);
Return Type:
T
// AbstractVillager.getAttachmentData<T>(type as Supplier< AttachmentType <T>>) as T; myAbstractVillager . getAttachmentData < T>(mySupplier);
Return Type:
T
Gets the attribute for this entity. Returns : The attribute.
myAbstractVillager . getAttribute(myAttribute);
Return Type:
AttributeInstance
Gets the base attribute value for this entity. Returns : The base attribute value.
// AbstractVillager.getAttributeBaseValue(attribute as Attribute ) as double; myAbstractVillager . getAttributeBaseValue(myAttribute);
Return Type:
double
Gets the attribute value for this entity. Returns : The attribute value.
// AbstractVillager.getAttributeValue(attribute as Attribute ) as double; myAbstractVillager . getAttributeValue(myAttribute);
Return Type:
double
Gets the eye position of the entity. Returns : The eye position of the entity.
// AbstractVillager.getEyePosition(partialTicks as float) as Vec3 ; myAbstractVillager . getEyePosition(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the eye position for.
Return Type:
Vec3
Gets the item in a specific slot. Returns : The item in the slot.
myAbstractVillager . getItemBySlot(myEquipmentSlot);
Return Type:
ItemStack
Gets the item in the entity's hand. Returns : The item in the hand.
myAbstractVillager . getItemInHand(myInteractionHand);
Return Type:
ItemStack
Gets the position of the entity. Returns : The position of the entity.
// AbstractVillager.getPosition(partialTicks as float) as Vec3 ; myAbstractVillager . getPosition(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the position for.
Return Type:
Vec3
Gets the position that the mob is restricted to. // AbstractVillager.getRestrictCenter as BlockPos myAbstractVillager . getRestrictCenter
Return Type:
BlockPos
Gets the entity that the mob is leashed to. // AbstractVillager.getRestrictCenter as Entity myAbstractVillager . getRestrictCenter
Return Type:
Entity
Gets the radius that the mob is restricted to. // AbstractVillager.getRestrictRadius as float
myAbstractVillager . getRestrictRadius
Return Type:
float
Gets the swim amount. Returns : The swim amount.
// AbstractVillager.getSwimAmount(partialTicks as float) as float;
myAbstractVillager . getSwimAmount(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the swim amount for.
Return Type:
float
Gets the up vector of the entity. Returns : The up vector of the entity.
// AbstractVillager.getUpVector(partialTicks as float) as Vec3 ; myAbstractVillager . 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.
// AbstractVillager.getViewVector(partialTicks as float) as Vec3 ; myAbstractVillager . getViewVector(myFloat);
Parameters:
partialTicks: float
Type: float
- The partial ticks to get the view vector for.
Return Type:
Vec3
Gets the visibility percent for this entity. Returns : The visibility percent.
// AbstractVillager.getVisibilityPercent(lookingEntity as Entity ) as double; myAbstractVillager . getVisibilityPercent(myEntity);
Parameters:
lookingEntity: Entity
Type: Entity
- The entity that is looking at this entity.
Return Type:
double
Gets the x coordinate of the entity with the given scale. Returns : The x coordinate of the entity.
// AbstractVillager.getX(scale as double) as double;
myAbstractVillager . 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.
// AbstractVillager.getY(scale as double) as double;
myAbstractVillager . 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.
// AbstractVillager.getZ(scale as double) as double;
myAbstractVillager . getZ(myDouble);
Parameters:
scale: double
Type: double
- The scale to get the z coordinate of the entity.
Return Type:
double
Gets this entity's held items. // AbstractVillager.handSlots as Iterable< ItemStack > myAbstractVillager . handSlots
Return Type:
Iterable <ItemStack >
Gets this entity's held items. Returns : An iterable of item stacks representing the held items.
// AbstractVillager.handSlots() as Iterable< ItemStack >; myAbstractVillager . handSlots();
Return Type:
Iterable <ItemStack >
// AbstractVillager.hasAttachmentData<T>(type as AttachmentType <T>) as bool; myAbstractVillager . hasAttachmentData < T>(myAttachmentType);
Return Type:
bool
// AbstractVillager.hasAttachmentData<T>(type as Supplier< AttachmentType <T>>) as bool; myAbstractVillager . hasAttachmentData < T>(mySupplier);
Return Type:
bool
Checks if the entity has a custom name. // AbstractVillager.hasCustomName as bool
myAbstractVillager . hasCustomName
Return Type:
bool
// AbstractVillager.hasCustomName as bool
myAbstractVillager . hasCustomName
Return Type:
bool
Checks if the entity has a custom name. Returns : true if the entity has a custom name.
// AbstractVillager.hasCustomName() as bool;
myAbstractVillager . hasCustomName();
Return Type:
bool
// AbstractVillager.hasCustomName() as bool;
myAbstractVillager . hasCustomName();
Return Type:
bool
Checks if this entity has a specific effect. Returns : True if this entity has the effect, false otherwise.
// AbstractVillager.hasEffect(effect as MobEffect ) as bool; myAbstractVillager . hasEffect(myMobEffect);
Return Type:
bool
Checks if the entity has exactly one player passenger. // AbstractVillager.hasExactlyOnePlayerPassenger as bool
myAbstractVillager . hasExactlyOnePlayerPassenger
Return Type:
bool
Checks if the entity has exactly one player passenger. Returns : true if the entity has exactly one player passenger.
// AbstractVillager.hasExactlyOnePlayerPassenger() as bool;
myAbstractVillager . hasExactlyOnePlayerPassenger();
Return Type:
bool
Checks if the entity is currently glowing. // AbstractVillager.hasGlowingTag as bool
myAbstractVillager . hasGlowingTag
Return Type:
bool
Checks if the entity is currently glowing. Returns : true if the entity is currently glowing.
// AbstractVillager.hasGlowingTag() as bool;
myAbstractVillager . hasGlowingTag();
Return Type:
bool
Checks if the entity has an indirect passenger. Returns : true if the entity has an indirect passenger.
// AbstractVillager.hasIndirectPassenger(entity as Entity ) as bool; myAbstractVillager . hasIndirectPassenger(myEntity);
Return Type:
bool
Checks if the entity has an item in a specific slot. Returns : True if the entity has an item in the slot, false otherwise.
// AbstractVillager.hasItemInSlot(slot as EquipmentSlot ) as bool; myAbstractVillager . hasItemInSlot(myEquipmentSlot);
Return Type:
bool
Checks if this entity has a line of sight to a specific entity. Returns : True if the entity has a line of sight to the entity, false otherwise.
// AbstractVillager.hasLineOfSight(entity as Entity ) as bool; myAbstractVillager . hasLineOfSight(myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity to check the line of sight to.
Return Type:
bool
Checks if the entity has a passenger. Returns : true if the entity has the given passenger.
// AbstractVillager.hasPassenger(entity as Entity ) as bool; myAbstractVillager . 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.
// AbstractVillager.hasPassenger(predicate as function(t as Entity ) as bool) as bool; myAbstractVillager . 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 the mob has a restriction. // AbstractVillager.hasRestriction as bool
myAbstractVillager . hasRestriction
Return Type:
bool
Heals this entity. // AbstractVillager.heal(amount as float);
myAbstractVillager . heal(myFloat);
Parameters:
amount: float
Type: float
- The amount to heal.
Gets the health of this entity. // AbstractVillager.health as float
myAbstractVillager . health
Return Type:
float
Gets the health of this entity. Returns : The health of this entity.
// AbstractVillager.health() as float;
myAbstractVillager . health();
Return Type:
float
Hurts the entity with the given DamageSource
and amount. Returns : true if the entity was hurt.
// AbstractVillager.hurt(source as DamageSource , amount as float) as bool; myAbstractVillager . hurt(myDamageSource, myFloat);
Parameters:
amount: float
Type: float
- The amount of damage to deal.
Return Type:
bool
Gets the ID of the entity. // AbstractVillager.id as int
Return Type:
int
Gets the ID of the entity. Returns : The ID of the entity.
// AbstractVillager.id() as int;
Return Type:
int
Gets the BlockState
that this entity is currently inside. myAbstractVillager . inBlockState
Return Type:
BlockState
Gets the BlockState
that this entity is currently inside. Returns : The block state that this entity is currently inside
myAbstractVillager . inBlockState();
Return Type:
BlockState
Checks if the entity is affected by potions, entities such as armor stands are not affected by potions. // AbstractVillager.isAffectedByPotions as bool
myAbstractVillager . isAffectedByPotions
Return Type:
bool
Checks if the entity is affected by potions, entities such as armor stands are not affected by potions. Returns : True if the entity is affected by potions, false otherwise.
// AbstractVillager.isAffectedByPotions() as bool;
myAbstractVillager . isAffectedByPotions();
Return Type:
bool
Checks if the entity is alive. // AbstractVillager.isAlive as bool
myAbstractVillager . isAlive
Return Type:
bool
Checks if the entity is alive. Returns : true if the entity is alive.
// AbstractVillager.isAlive() as bool;
myAbstractVillager . isAlive();
Return Type:
bool
Checks if the entity is always ticking. // AbstractVillager.isAlwaysTicking as bool
myAbstractVillager . isAlwaysTicking
Return Type:
bool
Checks if the entity is always ticking. Returns : true if the entity is always ticking.
// AbstractVillager.isAlwaysTicking() as bool;
myAbstractVillager . isAlwaysTicking();
Return Type:
bool
Checks if the entity is attackable. // AbstractVillager.isAttackable as bool
myAbstractVillager . isAttackable
Return Type:
bool
Checks if the entity is attackable. Returns : true if the entity is attackable.
// AbstractVillager.isAttackable() as bool;
myAbstractVillager . isAttackable();
Return Type:
bool
Checks if this entity is performing an auto spin attack. // AbstractVillager.isAutoSpinAttack as bool
myAbstractVillager . isAutoSpinAttack
Return Type:
bool
Checks if this entity is performing an auto spin attack. Returns : True if the entity is performing an auto spin attack, false otherwise.
// AbstractVillager.isAutoSpinAttack() as bool;
myAbstractVillager . isAutoSpinAttack();
Return Type:
bool
Checks if this entity is a baby. // AbstractVillager.isBaby as bool
myAbstractVillager . isBaby
Return Type:
bool
Checks if this entity is a baby. Returns : True if the entity is a baby, false otherwise.
// AbstractVillager.isBaby() as bool;
myAbstractVillager . isBaby();
Return Type:
bool
Checks if the entity is blocking. // AbstractVillager.isBlocking as bool
myAbstractVillager . isBlocking
Return Type:
bool
Checks if the entity is blocking. Returns : True if the entity is blocking, false otherwise.
// AbstractVillager.isBlocking() as bool;
myAbstractVillager . isBlocking();
Return Type:
bool
Checks if the merchant is on the client side. // AbstractVillager.isClientSide as bool
myAbstractVillager . isClientSide
Return Type:
bool
Checks if the merchant is on the client side. Returns : true if the merchant is on the client side.
// AbstractVillager.isClientSide() as bool;
myAbstractVillager . isClientSide();
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.
myAbstractVillager . isColliding(myBlockPos, myBlockState);
Return Type:
bool
Checks if the entity is crouching. // AbstractVillager.isCrouching as bool
myAbstractVillager . isCrouching
Return Type:
bool
Checks if the entity is crouching. Returns : true if the entity is crouching.
// AbstractVillager.isCrouching() as bool;
myAbstractVillager . isCrouching();
Return Type:
bool
Checks if the entity is currently glowing. // AbstractVillager.isCurrentlyGlowing as bool
myAbstractVillager . isCurrentlyGlowing
Return Type:
bool
Checks if the entity is currently glowing. // AbstractVillager.isCurrentlyGlowing as bool
myAbstractVillager . isCurrentlyGlowing
Return Type:
bool
Checks if the entity is currently glowing. Returns : True if the entity is currently glowing, false otherwise.
// AbstractVillager.isCurrentlyGlowing() as bool;
myAbstractVillager . isCurrentlyGlowing();
Return Type:
bool
Checks if the entity is currently glowing. Returns : true if the entity is currently glowing.
// AbstractVillager.isCurrentlyGlowing() as bool;
myAbstractVillager . isCurrentlyGlowing();
Return Type:
bool
Checks if the custom name of the entity is visible. // AbstractVillager.isCustomNameVisible as bool
myAbstractVillager . isCustomNameVisible
Return Type:
bool
Checks if the custom name of the entity is visible. Returns : true if the custom name is visible.
// AbstractVillager.isCustomNameVisible() as bool;
myAbstractVillager . isCustomNameVisible();
Return Type:
bool
Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking. Returns : True if the entity can block the damage source, false otherwise.
// AbstractVillager.isDamageSourceBlocked(source as DamageSource ) as bool; myAbstractVillager . isDamageSourceBlocked(myDamageSource);
Return Type:
bool
Checks if this entity is dead or dying. // AbstractVillager.isDeadOrDying as bool
myAbstractVillager . isDeadOrDying
Return Type:
bool
Checks if this entity is dead or dying. Returns : True if this entity is dead or dying, false otherwise.
// AbstractVillager.isDeadOrDying() as bool;
myAbstractVillager . isDeadOrDying();
Return Type:
bool
Checks if the entity is descending. // AbstractVillager.isDescending as bool
myAbstractVillager . isDescending
Return Type:
bool
Checks if the entity is descending. Returns : true if the entity is descending.
// AbstractVillager.isDescending() as bool;
myAbstractVillager . isDescending();
Return Type:
bool
Checks if the entity is being discrete. // AbstractVillager.isDiscrete as bool
myAbstractVillager . isDiscrete
Return Type:
bool
Checks if the entity is being discrete. Returns : true if the entity is being discrete.
// AbstractVillager.isDiscrete() as bool;
myAbstractVillager . isDiscrete();
Return Type:
bool
Checks if the entity is flying with an elytra. // AbstractVillager.isFallFlying as bool
myAbstractVillager . isFallFlying
Return Type:
bool
Checks if the entity is flying with an elytra. Returns : True if the entity is flying with an elytra, false otherwise.
// AbstractVillager.isFallFlying() as bool;
myAbstractVillager . isFallFlying();
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.
// AbstractVillager.isFree(x as double, y as double, z as double) as bool;
myAbstractVillager . 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. // AbstractVillager.isFullyFrozen as bool
myAbstractVillager . isFullyFrozen
Return Type:
bool
Checks if the entity is fully frozen. Returns : true if the entity is fully frozen.
// AbstractVillager.isFullyFrozen() as bool;
myAbstractVillager . isFullyFrozen();
Return Type:
bool
Checks if the entity is holding an item in their hand. Returns : True if the entity is holding the item, false otherwise.
myAbstractVillager . isHolding(myItem);
Return Type:
bool
Checks if the entity is holding an item in their hand. Returns : True if the entity is holding the item, false otherwise.
// AbstractVillager.isHolding(predicate as function(t as ItemStack ) as bool) as bool; myAbstractVillager . isHolding(myPredicate);
Parameters:
predicate: function(t as ItemStack ) as bool
Type: function(t as ItemStack ) as bool
- The predicate to check.
Return Type:
bool
Checks if the entity is in lava. // AbstractVillager.isInLava as bool
myAbstractVillager . isInLava
Return Type:
bool
Checks if the entity is in lava. Returns : true if the entity is in lava.
// AbstractVillager.isInLava() as bool;
myAbstractVillager . isInLava();
Return Type:
bool
Checks if this entity is inverted for heal and harm. This usually happens for undead mobs where potions of healing with harm them. // AbstractVillager.isInvertedHealAndHarm as bool
myAbstractVillager . isInvertedHealAndHarm
Return Type:
bool
Checks if this entity is inverted for heal and harm. This usually happens for undead mobs where potions of healing with harm them. Returns : True if this entity is inverted for heal and harm, false otherwise.
// AbstractVillager.isInvertedHealAndHarm() as bool;
myAbstractVillager . isInvertedHealAndHarm();
Return Type:
bool
Checks if the entity is invisible. // AbstractVillager.isInvisible as bool
myAbstractVillager . isInvisible
Return Type:
bool
Checks if the entity is invisible. Returns : true if the entity is invisible.
// AbstractVillager.isInvisible() as bool;
myAbstractVillager . isInvisible();
Return Type:
bool
Checks if the entity is invisible to the given Player
. Returns : true if the entity is invisible to the player.
// AbstractVillager.isInvisibleTo(player as Player ) as bool; myAbstractVillager . isInvisibleTo(myPlayer);
Return Type:
bool
Checks if the entity is invulnerable. // AbstractVillager.isInvulnerable as bool
myAbstractVillager . isInvulnerable
Return Type:
bool
Checks if the entity is invulnerable. Returns : true if the entity is invulnerable.
// AbstractVillager.isInvulnerable() as bool;
myAbstractVillager . 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.
// AbstractVillager.isInvulnerableTo(source as DamageSource ) as bool; myAbstractVillager . isInvulnerableTo(myDamageSource);
Return Type:
bool
Checks if the entity is in a wall. // AbstractVillager.isInWall as bool
myAbstractVillager . isInWall
Return Type:
bool
Checks if the entity is in a wall. Returns : true if the entity is in a wall.
// AbstractVillager.isInWall() as bool;
myAbstractVillager . isInWall();
Return Type:
bool
Checks if the entity is in water. // AbstractVillager.isInWater as bool
myAbstractVillager . isInWater
Return Type:
bool
Checks if the entity is in water. Returns : true if the entity is in water.
// AbstractVillager.isInWater() as bool;
myAbstractVillager . isInWater();
Return Type:
bool
Checks if the entity is in water or a bubble column. // AbstractVillager.isInWaterOrBubble as bool
myAbstractVillager . 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.
// AbstractVillager.isInWaterOrBubble() as bool;
myAbstractVillager . isInWaterOrBubble();
Return Type:
bool
Checks if the entity is in water or rain. // AbstractVillager.isInWaterOrRain as bool
myAbstractVillager . isInWaterOrRain
Return Type:
bool
Checks if the entity is in water or rain. Returns : true if the entity is in water or rain.
// AbstractVillager.isInWaterOrRain() as bool;
myAbstractVillager . isInWaterOrRain();
Return Type:
bool
Checks if the entity is in water or rain or a bubble column. // AbstractVillager.isInWaterRainOrBubble as bool
myAbstractVillager . 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.
// AbstractVillager.isInWaterRainOrBubble() as bool;
myAbstractVillager . isInWaterRainOrBubble();
Return Type:
bool
Checks if the mob's maximum group size is reached. This is mainly used by fish when they are spawned naturally. Returns : Whether the mob's maximum group size is reached.
// AbstractVillager.isMaxGroupSizeReached(size as int) as bool;
myAbstractVillager . isMaxGroupSizeReached(myInt);
Parameters:
size: int
Type: int
- The size to check.
Return Type:
bool
Checks if the entity has no gravity. // AbstractVillager.isNoGravity as bool
myAbstractVillager . isNoGravity
Return Type:
bool
Checks if the entity has no gravity. Returns : true if the entity has no gravity.
// AbstractVillager.isNoGravity() as bool;
myAbstractVillager . isNoGravity();
Return Type:
bool
Checks if the entity is on fire. // AbstractVillager.isOnFire as bool
myAbstractVillager . isOnFire
Return Type:
bool
Checks if the entity is on fire. Returns : true if the entity is on fire.
// AbstractVillager.isOnFire() as bool;
myAbstractVillager . isOnFire();
Return Type:
bool
Checks if the entity is on portal cooldown. // AbstractVillager.isOnPortalCooldown as bool
myAbstractVillager . isOnPortalCooldown
Return Type:
bool
Checks if the entity is on portal cooldown. Returns : true if the entity is on portal cooldown.
// AbstractVillager.isOnPortalCooldown() as bool;
myAbstractVillager . isOnPortalCooldown();
Return Type:
bool
Checks if the entity is a passenger. // AbstractVillager.isPassenger as bool
myAbstractVillager . isPassenger
Return Type:
bool
Checks if the entity is a passenger. Returns : true if the entity is a passenger.
// AbstractVillager.isPassenger() as bool;
myAbstractVillager . 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.
// AbstractVillager.isPassengerOfSameVehicle(entity as Entity ) as bool; myAbstractVillager . isPassengerOfSameVehicle(myEntity);
Return Type:
bool
Checks if the mob should persist in the world. // AbstractVillager.isPersistenceRequired as bool
myAbstractVillager . isPersistenceRequired
Return Type:
bool
Checks if the entity is pickable. // AbstractVillager.isPickable as bool
myAbstractVillager . isPickable
Return Type:
bool
Checks if the entity is pickable. Returns : true if the entity is pickable.
// AbstractVillager.isPickable() as bool;
myAbstractVillager . isPickable();
Return Type:
bool
Checks if the entity is pushable. // AbstractVillager.isPushable as bool
myAbstractVillager . isPushable
Return Type:
bool
Checks if the entity is pushable. Returns : true if the entity is pushable.
// AbstractVillager.isPushable() as bool;
myAbstractVillager . isPushable();
Return Type:
bool
Checks if the entity is pushed by fluid. // AbstractVillager.isPushedByFluid as bool
myAbstractVillager . isPushedByFluid
Return Type:
bool
Checks if the entity is pushed by fluid. Returns : true if the entity is pushed by fluid.
// AbstractVillager.isPushedByFluid() as bool;
myAbstractVillager . isPushedByFluid();
Return Type:
bool
Checks if the entity has been removed. // AbstractVillager.isRemoved as bool
myAbstractVillager . isRemoved
Return Type:
bool
Checks if the entity has been removed. Returns : Whether the entity has been removed.
// AbstractVillager.isRemoved() as bool;
myAbstractVillager . isRemoved();
Return Type:
bool
Checks if this entity is sensitive to water, meaning that it will take damage from being in water. // AbstractVillager.isSensitiveToWater as bool
myAbstractVillager . isSensitiveToWater
Return Type:
bool
Checks if this entity is sensitive to water, meaning that it will take damage from being in water. Returns : True if the entity is sensitive to water, false otherwise.
// AbstractVillager.isSensitiveToWater() as bool;
myAbstractVillager . isSensitiveToWater();
Return Type:
bool
Checks if the shift key is down. // AbstractVillager.isShiftKeyDown as bool
myAbstractVillager . isShiftKeyDown
Return Type:
bool
Checks if the shift key is down. Returns : true if the shift key is down.
// AbstractVillager.isShiftKeyDown() as bool;
myAbstractVillager . isShiftKeyDown();
Return Type:
bool
Checks if the entity is silent, meaning it won't play any sounds. // AbstractVillager.isSilent as bool
myAbstractVillager . isSilent
Return Type:
bool
Checks if the entity is silent, meaning it won't play any sounds. Returns : true if the entity is silent.
// AbstractVillager.isSilent() as bool;
myAbstractVillager . isSilent();
Return Type:
bool
Checks if the entity is sleeping. // AbstractVillager.isSleeping as bool
myAbstractVillager . isSleeping
Return Type:
bool
Checks if the entity is sleeping. Returns : True if the entity is sleeping, false otherwise.
// AbstractVillager.isSleeping() as bool;
myAbstractVillager . isSleeping();
Return Type:
bool
Checks if the entity is a spectator. // AbstractVillager.isSpectator as bool
myAbstractVillager . isSpectator
Return Type:
bool
Checks if the entity is a spectator. Returns : true if the entity is a spectator.
// AbstractVillager.isSpectator() as bool;
myAbstractVillager . isSpectator();
Return Type:
bool
Checks if the entity is sprinting. // AbstractVillager.isSprinting as bool
myAbstractVillager . isSprinting
Return Type:
bool
Checks if the entity is sprinting. Returns : true if the entity is sprinting.
// AbstractVillager.isSprinting() as bool;
myAbstractVillager . isSprinting();
Return Type:
bool
Checks if the entity is stepping carefully. // AbstractVillager.isSteppingCarefully as bool
myAbstractVillager . isSteppingCarefully
Return Type:
bool
Checks if the entity is stepping carefully. Returns : true if the entity is stepping carefully.
// AbstractVillager.isSteppingCarefully() as bool;
myAbstractVillager . isSteppingCarefully();
Return Type:
bool
Checks if the entity is suppressing bounce. // AbstractVillager.isSuppressingBounce as bool
myAbstractVillager . isSuppressingBounce
Return Type:
bool
Checks if the entity is suppressing bounce. Returns : true if the entity is suppressing bounce.
// AbstractVillager.isSuppressingBounce() as bool;
myAbstractVillager . isSuppressingBounce();
Return Type:
bool
Checks if the entity is suppressing sliding down a ladder, such as sneaking while on a ladder. // AbstractVillager.isSuppressingSlidingDownLadder as bool
myAbstractVillager . isSuppressingSlidingDownLadder
Return Type:
bool
Checks if the entity is suppressing sliding down a ladder, such as sneaking while on a ladder. Returns : True if the entity is suppressing sliding down a ladder, false otherwise.
// AbstractVillager.isSuppressingSlidingDownLadder() as bool;
myAbstractVillager . isSuppressingSlidingDownLadder();
Return Type:
bool
Checks if the entity is swimming. // AbstractVillager.isSwimming as bool
myAbstractVillager . isSwimming
Return Type:
bool
Checks if the entity is swimming. Returns : true if the entity is swimming.
// AbstractVillager.isSwimming() as bool;
myAbstractVillager . isSwimming();
Return Type:
bool
Checks if the villager is trading. // AbstractVillager.isTrading as bool
myAbstractVillager . isTrading
Return Type:
bool
Checks if the villager is trading. Returns : if the villager is trading
// AbstractVillager.isTrading() as bool;
myAbstractVillager . isTrading();
Return Type:
bool
Checks if the entity is underwater. // AbstractVillager.isUnderWater as bool
myAbstractVillager . isUnderWater
Return Type:
bool
Checks if the entity is underwater. Returns : true if the entity is underwater.
// AbstractVillager.isUnderWater() as bool;
myAbstractVillager . isUnderWater();
Return Type:
bool
Checks if this entity is using an item. // AbstractVillager.isUsingItem as bool
myAbstractVillager . isUsingItem
Return Type:
bool
Checks if this entity is using an item. Returns : True if the entity is using an item, false otherwise.
// AbstractVillager.isUsingItem() as bool;
myAbstractVillager . isUsingItem();
Return Type:
bool
Checks if the entity is a vehicle. // AbstractVillager.isVehicle as bool
myAbstractVillager . isVehicle
Return Type:
bool
Checks if the entity is a vehicle. Returns : true if the entity is a vehicle.
// AbstractVillager.isVehicle() as bool;
myAbstractVillager . isVehicle();
Return Type:
bool
Checks if the entity is visually crawling. // AbstractVillager.isVisuallyCrawling as bool
myAbstractVillager . isVisuallyCrawling
Return Type:
bool
Checks if the entity is visually crawling. Returns : true if the entity is visually crawling.
// AbstractVillager.isVisuallyCrawling() as bool;
myAbstractVillager . isVisuallyCrawling();
Return Type:
bool
Checks if the entity is visually swimming. // AbstractVillager.isVisuallySwimming as bool
myAbstractVillager . isVisuallySwimming
Return Type:
bool
Checks if the entity is visually swimming. // AbstractVillager.isVisuallySwimming as bool
myAbstractVillager . isVisuallySwimming
Return Type:
bool
Checks if the entity is visually swimming. Returns : True if the entity is visually swimming, false otherwise.
// AbstractVillager.isVisuallySwimming() as bool;
myAbstractVillager . isVisuallySwimming();
Return Type:
bool
Checks if the entity is visually swimming. Returns : true if the entity is visually swimming.
// AbstractVillager.isVisuallySwimming() as bool;
myAbstractVillager . isVisuallySwimming();
Return Type:
bool
Checks if the mob is within melee attack range of the given LivingEntity
. Returns : Whether the mob is within melee attack range of the given entity.
// AbstractVillager.isWithinMeleeAttackRange(entity as LivingEntity ) as bool; myAbstractVillager . isWithinMeleeAttackRange(myLivingEntity);
Return Type:
bool
Checks if the mob is within a restriction. // AbstractVillager.isWithinRestriction as bool
myAbstractVillager . isWithinRestriction
Return Type:
bool
Checks if the mob is within a restriction. Returns : Whether the mob is within a restriction.
// AbstractVillager.isWithinRestriction(position as BlockPos ) as bool; myAbstractVillager . isWithinRestriction(myBlockPos);
Return Type:
bool
Gets the jump boost power for this entity. // AbstractVillager.jumpBoostPower as double
myAbstractVillager . jumpBoostPower
Return Type:
double
Gets the jump boost power for this entity. Returns : The jump boost power.
// AbstractVillager.jumpBoostPower() as double;
myAbstractVillager . jumpBoostPower();
Return Type:
double
Kills the entity. // AbstractVillager.kill();
myAbstractVillager . kill();
Gets the kill credit for this entity. If this entity was last hit by a player, then it will be that player, otherwise it will be the last mob that hit this entity. myAbstractVillager . killCredit
Return Type:
LivingEntity
Gets the kill credit for this entity. If this entity was last hit by a player, then it will be that player, otherwise it will be the last mob that hit this entity. Returns : The kill credit.
myAbstractVillager . killCredit();
Return Type:
LivingEntity
Knocks back this entity. // AbstractVillager.knockback(x as double, y as double, z as double);
myAbstractVillager . knockback(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
- The x coordinate to knock back to.
y: double
Type: double
- The y coordinate to knock back to.
z: double
Type: double
- The z coordinate to knock back to.
Gets the last climbable position for this entity. // AbstractVillager.lastClimbablePos as BlockPos myAbstractVillager . lastClimbablePos
Return Type:
BlockPos
Gets the last climbable position for this entity. Returns : The last climbable position.
// AbstractVillager.lastClimbablePos() as BlockPos ; myAbstractVillager . lastClimbablePos();
Return Type:
BlockPos
Gets the last damage source for this entity. myAbstractVillager . lastDamageSource
Return Type:
DamageSource
Gets the last damage source for this entity. Returns : The last damage source.
myAbstractVillager . lastDamageSource();
Return Type:
DamageSource
Gets the last entity that hurt this entity. myAbstractVillager . lastHurtByMob
Return Type:
LivingEntity
Gets the last entity that hurt this entity. Returns : The last entity that hurt this entity.
myAbstractVillager . lastHurtByMob();
Return Type:
LivingEntity
Gets the timestamp when this entity was last hurt by a mob. // AbstractVillager.lastHurtByMobTimestamp as int
myAbstractVillager . lastHurtByMobTimestamp
Return Type:
int
Gets the timestamp when this entity was last hurt by a mob. Returns : The timestamp when this entity was last hurt by a mob.
// AbstractVillager.lastHurtByMobTimestamp() as int;
myAbstractVillager . lastHurtByMobTimestamp();
Return Type:
int
Gets the last entity that this entity hurt. myAbstractVillager . lastHurtMob
Return Type:
LivingEntity
Gets the last entity that this entity hurt. Returns : The last entity that this entity hurt.
myAbstractVillager . lastHurtMob();
Return Type:
LivingEntity
Gets the timestamp when this entity last hurt a mob. // AbstractVillager.lastHurtMobTimestamp as int
myAbstractVillager . lastHurtMobTimestamp
Return Type:
int
Gets the timestamp when this entity last hurt a mob. Returns : The timestamp when this entity last hurt a mob.
// AbstractVillager.lastHurtMobTimestamp() as int;
myAbstractVillager . lastHurtMobTimestamp();
Return Type:
int
Causes the entity to take damage from lava. // AbstractVillager.lavaHurt();
myAbstractVillager . lavaHurt();
Checks if the mob is leashed. // AbstractVillager.leashed as bool
myAbstractVillager . leashed
Return Type:
bool
Checks if the mob is left-handed. // AbstractVillager.leftHanded as bool
myAbstractVillager . leftHanded
Return Type:
bool
Sets whether the mob should be left-handed. // AbstractVillager.leftHanded = (value as bool);
myAbstractVillager . leftHanded = myBool;
Parameters:
value: bool
Type: bool
- Whether the mob should be left-handed.
Gets the Level
of the entity. // AbstractVillager.level as Level
Return Type:
Level
Gets the look angle of the entity. // AbstractVillager.lookAngle as Vec3 myAbstractVillager . lookAngle
Return Type:
Vec3
Gets the look angle of the entity. Returns : The look angle of the entity.
// AbstractVillager.lookAngle() as Vec3 ; myAbstractVillager . lookAngle();
Return Type:
Vec3
Makes the mob look at the given entity. // AbstractVillager.lookAt(entity as Entity , maxXRotIncrease as float, maxYRotIncrease as float); myAbstractVillager . lookAt(myEntity, myFloat, myFloat);
Parameters:
maxXRotIncrease: float
Type: float
- The maximum rotation in the X direction.
maxYRotIncrease: float
Type: float
- The maximum rotation in the Y direction.
Gets the loot table for this entity. myAbstractVillager . lootTable
Return Type:
ResourceLocation
Gets the loot table for this entity. Returns : The loot table.
myAbstractVillager . lootTable();
Return Type:
ResourceLocation
Gets the seed used when generating loot from this entity. // AbstractVillager.lootTableSeed as long
myAbstractVillager . lootTableSeed
Return Type:
long
Gets the main arm for this entity. myAbstractVillager . mainArm
Return Type:
HumanoidArm
Gets the main arm for this entity. Returns : The main arm.
myAbstractVillager . mainArm();
Return Type:
HumanoidArm
Gets the main hand item for this entity. // AbstractVillager.mainHandItem as ItemStack myAbstractVillager . mainHandItem
Return Type:
ItemStack
Gets the main hand item for this entity. Returns : The main hand item.
// AbstractVillager.mainHandItem() as ItemStack ; myAbstractVillager . mainHandItem();
Return Type:
ItemStack
Gets the maximum air supply of the entity. // AbstractVillager.maxAirSupply as int
myAbstractVillager . maxAirSupply
Return Type:
int
Gets the maximum air supply of the entity. Returns : The maximum air supply of the entity.
// AbstractVillager.maxAirSupply() as int;
myAbstractVillager . maxAirSupply();
Return Type:
int
Gets the maximum fall distance of the entity. // AbstractVillager.maxFallDistance as int
myAbstractVillager . maxFallDistance
Return Type:
int
Gets the maximum fall distance of the entity. Returns : The maximum fall distance of the entity.
// AbstractVillager.maxFallDistance() as int;
myAbstractVillager . maxFallDistance();
Return Type:
int
Gets the maximum head rotation speed. // AbstractVillager.maxHeadRotSpeed as int
myAbstractVillager . maxHeadRotSpeed
Return Type:
int
Gets the maximum head rotation in the X direction. // AbstractVillager.maxHeadXRot as int
myAbstractVillager . maxHeadXRot
Return Type:
int
Gets the maximum head rotation in the Y direction. // AbstractVillager.maxHeadYRot as int
myAbstractVillager . maxHeadYRot
Return Type:
int
Gets the maximum health for this entity. // AbstractVillager.maxHealth as float
myAbstractVillager . maxHealth
Return Type:
float
Gets the maximum health for this entity. Returns : The maximum health.
// AbstractVillager.maxHealth() as float;
myAbstractVillager . maxHealth();
Return Type:
float
Gets the maximum spawn cluster size. // AbstractVillager.maxSpawnClusterSize as int
myAbstractVillager . maxSpawnClusterSize
Return Type:
int
Gets the motion direction of the entity. // AbstractVillager.motionDirection as Direction myAbstractVillager . motionDirection
Return Type:
Direction
Gets the motion direction of the entity. Returns : The motion direction of the entity.
// AbstractVillager.motionDirection() as Direction ; myAbstractVillager . motionDirection();
Return Type:
Direction
Moves the entity relative to its current position. // AbstractVillager.moveRelative(amount as float, relative as Vec3 ); myAbstractVillager . 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. // AbstractVillager.moveTo(vec as Vec3 ); myAbstractVillager . moveTo(myVec3);
Parameters:
vec: Vec3
Type: Vec3
- The position to move the entity to. Moves the entity to the given position. // AbstractVillager.moveTo(x as double, y as double, z as double);
myAbstractVillager . 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. // AbstractVillager.moveTo(pos as BlockPos , yaw as float, pitch as float); myAbstractVillager . 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. // AbstractVillager.moveTo(x as double, y as double, z as double, yaw as float, pitch as float);
myAbstractVillager . 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.
myAbstractVillager . name();
Return Type:
Component
myAbstractVillager . name();
Return Type:
Component
Gets the time since this entity last performed an action. // AbstractVillager.noActionTime as int
myAbstractVillager . noActionTime
Return Type:
int
Gets the time since this entity last performed an action. Returns : The time since this entity last performed an action.
// AbstractVillager.noActionTime() as int;
myAbstractVillager . noActionTime();
Return Type:
int
Checks if the mob has AI disabled. // AbstractVillager.noAi as bool
Return Type:
bool
Sets whether the mob should have AI disabled. // AbstractVillager.noAi = (value as bool);
myAbstractVillager . noAi = myBool;
Parameters:
value: bool
Type: bool
- Whether the mob should have AI disabled.
Notifies the merchant that a trade has occurred. myAbstractVillager . notifyTrade(myMerchantOffer);
Gets the notify trade sound of the merchant. // AbstractVillager.notifyTradeSound as SoundEvent myAbstractVillager . notifyTradeSound
Return Type:
SoundEvent
Gets the notify trade sound of the merchant. Returns : The notify trade sound of the merchant.
// AbstractVillager.notifyTradeSound() as SoundEvent ; myAbstractVillager . notifyTradeSound();
Return Type:
SoundEvent
Notifies the merchant that the trade has been updated. // AbstractVillager.notifyTradeUpdated(stack as ItemStack ); myAbstractVillager . notifyTradeUpdated(myItemStack);
Gets the offhand item for this entity. myAbstractVillager . offHandItem
Return Type:
ItemStack
Gets the offhand item for this entity. Returns : The offhand item.
// AbstractVillager.offHandItem() as ItemStack ; myAbstractVillager . offHandItem();
Return Type:
ItemStack
Checks if the entity is on the ground. // AbstractVillager.onGround as bool
myAbstractVillager . onGround
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.
// AbstractVillager.onPos() as BlockPos ; myAbstractVillager . onPos();
Return Type:
BlockPos
Opens the trading screen for the merchant. // AbstractVillager.openTradingScreen(player as Player , displayName as Component , level as int); myAbstractVillager . openTradingScreen(myPlayer, myComponent, myInt);
Parameters:
player: Player
Type: Player
- The player to open the trading screen for. level: int
Type: int
- The level of the merchant.
Gets the passengers of the entity. // AbstractVillager.passengers as List< Entity > myAbstractVillager . passengers
Return Type:
List <Entity >
Gets the passengers of the entity. Returns : The passengers of the entity.
// AbstractVillager.passengers() as List< Entity >; myAbstractVillager . passengers();
Return Type:
List <Entity >
Gets the percent the entity is frozen. // AbstractVillager.percentFrozen as float
myAbstractVillager . percentFrozen
Return Type:
float
Gets the percent the entity is frozen. Returns : The percent the entity is frozen.
// AbstractVillager.percentFrozen() as float;
myAbstractVillager . percentFrozen();
Return Type:
float
Gets the piston push reaction of the entity. myAbstractVillager . pistonPushReaction
Return Type:
PushReaction
Gets the piston push reaction of the entity. Returns : The piston push reaction of the entity.
myAbstractVillager . pistonPushReaction();
Return Type:
PushReaction
Plays the ambient sound for this mob. // AbstractVillager.playAmbientSound();
myAbstractVillager . playAmbientSound();
Plays the celebrate sound for the villager. // AbstractVillager.playCelebrateSound();
myAbstractVillager . playCelebrateSound();
Plays a sound at the entity's location. // AbstractVillager.playSound(sound as SoundEvent , volume as float, pitch as float); myAbstractVillager . 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. // AbstractVillager.position as Vec3 myAbstractVillager . position
Return Type:
Vec3
Gets the position of the entity. Returns : The position of the entity.
// AbstractVillager.position() as Vec3 ; myAbstractVillager . position();
Return Type:
Vec3
Positions the rider of the entity. // AbstractVillager.positionRider(entity as Entity ); myAbstractVillager . positionRider(myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity to position the rider of. Gets this entity's random source. myAbstractVillager . random
Return Type:
RandomSource
Gets this entity's random source. Returns : The random source for the entity.
myAbstractVillager . random();
Return Type:
RandomSource
Gets the registry name of the entity. myAbstractVillager . registryName
Return Type:
ResourceLocation
Gets the registry name of the entity. Returns : The registry name of the entity.
myAbstractVillager . registryName();
Return Type:
ResourceLocation
Releases the item that the entity is using. // AbstractVillager.releaseUsingItem();
myAbstractVillager . releaseUsingItem();
Removes all effects from this entity. Returns : True if all effects were removed, false otherwise.
// AbstractVillager.removeAllEffects() as bool;
myAbstractVillager . removeAllEffects();
Return Type:
bool
Removes an effect from this entity. Returns : True if the effect was removed, false otherwise.
// AbstractVillager.removeEffect(effect as MobEffect ) as bool; myAbstractVillager . removeEffect(myMobEffect);
Return Type:
bool
Removes an effect from this entity without causing an update. Returns : The removed effect.
myAbstractVillager . removeEffectNoUpdate(myMobEffect);
Return Type:
MobEffectInstance
Removes a tag from the entity. Returns : true if the tag was removed.
// AbstractVillager.removeTag(tagName as string) as bool;
myAbstractVillager . removeTag(myString);
Parameters:
tagName: string
Type: string
- The name of the tag to remove.
Return Type:
bool
Removes the vehicle of the entity. // AbstractVillager.removeVehicle();
myAbstractVillager . removeVehicle();
Restricts the mob to the given position and radius. // AbstractVillager.restrictTo(restrictCenter as BlockPos , restrictRadius as int); myAbstractVillager . restrictTo(myBlockPos, myInt);
Parameters:
restrictRadius: int
Type: int
- The radius to restrict the mob to.
Gets the root vehicle of the entity. // AbstractVillager.rootVehicle as Entity myAbstractVillager . rootVehicle
Return Type:
Entity
Gets the root vehicle of the entity. Returns : The root vehicle of the entity.
// AbstractVillager.rootVehicle() as Entity ; myAbstractVillager . rootVehicle();
Return Type:
Entity
Gets this entity's scale. // AbstractVillager.scale as float
Return Type:
float
Gets this entity's scale. Returns : The scale of the entity.
// AbstractVillager.scale() as float;
myAbstractVillager . scale();
Return Type:
float
Sends a message to the command source. // AbstractVillager.sendMessage(component as Component ); myAbstractVillager . sendMessage(myComponent);
Sets the absorption amount for this entity. // AbstractVillager.setAbsorptionAmount(absorption as float);
myAbstractVillager . setAbsorptionAmount(myFloat);
Parameters:
absorption: float
Type: float
- The absorption amount to set.
Sets the air supply of the entity. // AbstractVillager.setAirSupply(air as int);
myAbstractVillager . setAirSupply(myInt);
Parameters:
air: int
Type: int
- The new air supply of the entity.
Sets how many arrows are currently in this entity. // AbstractVillager.setArrowCount(count as int);
myAbstractVillager . setArrowCount(myInt);
Parameters:
count: int
Type: int
- The number of arrows to set.
// AbstractVillager.setAttachmentData<T>(type as AttachmentType <T>, data as T) as T?; myAbstractVillager . setAttachmentData < T>(myAttachmentType, myT);
Return Type:
T ?
// AbstractVillager.setAttachmentData<T>(type as Supplier< AttachmentType <T>>, data as T) as T?; myAbstractVillager . setAttachmentData < T>(mySupplier, myT);
Return Type:
T ?
Sets the custom name of the entity. // AbstractVillager.setCustomName(name as Component ); myAbstractVillager . setCustomName(myComponent);
Sets the custom name visible state of the entity. // AbstractVillager.setCustomNameVisible(visible as bool);
myAbstractVillager . setCustomNameVisible(myBool);
Parameters:
visible: bool
Type: bool
- true if the custom name should be visible.
Sets the delta movement of the entity. // AbstractVillager.setDeltaMovement(xDelta as double, yDelta as double, zDelta as double);
myAbstractVillager . 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.
Sets if this entity should discard friction. // AbstractVillager.setDiscardFriction(discardFriction as bool);
myAbstractVillager . setDiscardFriction(myBool);
Parameters:
discardFriction: bool
Type: bool
- True if this entity should discard friction, false otherwise.
Sets the drop chance for the given EquipmentSlot
. // AbstractVillager.setDropChance(slot as EquipmentSlot , chance as float); myAbstractVillager . setDropChance(myEquipmentSlot, myFloat);
Parameters:
chance: float
Type: float
- The chance to drop the item.
Makes the entity glow. // AbstractVillager.setGlowingTag(glowing as bool);
myAbstractVillager . setGlowingTag(myBool);
Parameters:
glowing: bool
Type: bool
- true if the entity should be glowing.
Sets that the item in the given EquipmentSlot
should always drop when it is killed. myAbstractVillager . setGuaranteedDrop(myEquipmentSlot);
Sets the health of this entity. // AbstractVillager.setHealth(health as float);
myAbstractVillager . setHealth(myFloat);
Parameters:
health: float
Type: float
- The health to set.
Sets the invisible state of the entity. // AbstractVillager.setInvisible(invisible as bool);
myAbstractVillager . setInvisible(myBool);
Parameters:
invisible: bool
Type: bool
- true if the entity should be invisible.
Sets the invulnerable state of the entity. // AbstractVillager.setInvulnerable(invulnerable as bool);
myAbstractVillager . setInvulnerable(myBool);
Parameters:
invulnerable: bool
Type: bool
- true if the entity should be invulnerable.
Sets whether the entity is in powder snow. // AbstractVillager.setIsInPowderSnow(inPowderSnow as bool);
myAbstractVillager . setIsInPowderSnow(myBool);
Parameters:
inPowderSnow: bool
Type: bool
- Whether the entity is in powder snow.
Sets the item in the entity's hand. myAbstractVillager . setItemInHand(myInteractionHand, myItemStack);
Sets the item in a specific equipment slot. myAbstractVillager . setItemSlot(myEquipmentSlot, myItemStack);
Sets whether this entity is jumping. // AbstractVillager.setJumping(jumping as bool);
myAbstractVillager . setJumping(myBool);
Parameters:
jumping: bool
Type: bool
- True if the entity should jump, false otherwise.
Sets the last entity that hurt this entity. // AbstractVillager.setLastHurtByMob(entity as LivingEntity ); myAbstractVillager . setLastHurtByMob(myLivingEntity);
Sets the last entity that hurt this entity. // AbstractVillager.setLastHurtByPlayer(player as Player ); myAbstractVillager . setLastHurtByPlayer(myPlayer);
Parameters:
player: Player
Type: Player
- The player that hurt this entity. Sets the last entity that this entity hurt. // AbstractVillager.setLastHurtMob(entity as Entity ); myAbstractVillager . setLastHurtMob(myEntity);
Parameters:
entity: Entity
Type: Entity
- The entity that this entity hurt. Sets the entity that the mob is leashed to. // AbstractVillager.setLeashedTo(leashHolder as Entity , broadcastPacket as bool); myAbstractVillager . setLeashedTo(myEntity, myBool);
Parameters:
leashHolder: Entity
Type: Entity
- The entity that the mob is leashed to. broadcastPacket: bool
Type: bool
- Whether to broadcast a packet to the client.
Sets the time since this entity last performed an action. // AbstractVillager.setNoActionTime(idleTime as int);
myAbstractVillager . setNoActionTime(myInt);
Parameters:
idleTime: int
Type: int
- The time since this entity last performed an action.
Sets if the entity has no gravity. // AbstractVillager.setNoGravity(noGravity as bool);
myAbstractVillager . setNoGravity(myBool);
Parameters:
noGravity: bool
Type: bool
- The no gravity state to set the entity to.
Sets the old position and rotation of the entity. // AbstractVillager.setOldPosAndRot();
myAbstractVillager . setOldPosAndRot();
Sets if the entity is on the ground. // AbstractVillager.setOnGround(onGround as bool);
myAbstractVillager . setOnGround(myBool);
Parameters:
onGround: bool
Type: bool
- The on ground state to set the entity to.
Sets that this mob should persist in the world. // AbstractVillager.setPersistenceRequired();
myAbstractVillager . setPersistenceRequired();
Sets the portal cooldown of the entity. // AbstractVillager.setPortalCooldown();
myAbstractVillager . setPortalCooldown();
Sets the position of the entity. // AbstractVillager.setPos(position as Vec3 ); myAbstractVillager . setPos(myVec3);
Parameters:
position: Vec3
Type: Vec3
- The position to set the entity to. Sets the position of the entity. // AbstractVillager.setPos(x as double, y as double, z as double);
myAbstractVillager . 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. // AbstractVillager.setPosRaw(x as double, y as double, z as double);
myAbstractVillager . 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 . myAbstractVillager . setRemoved(myRemovalReason);
Sets the shift key down state of the entity. // AbstractVillager.setShiftKeyDown(keyDown as bool);
myAbstractVillager . setShiftKeyDown(myBool);
Parameters:
keyDown: bool
Type: bool
- true if the shift key is down.
Sets if the entity is silent. // AbstractVillager.setSilent(silent as bool);
myAbstractVillager . setSilent(myBool);
Parameters:
silent: bool
Type: bool
- The silent state to set the entity to.
Sets the position that the entity is sleeping at. // AbstractVillager.setSleepingPos(pos as BlockPos ); myAbstractVillager . setSleepingPos(myBlockPos);
Sets the movement speed of this entity. // AbstractVillager.setSpeed(speed as float);
myAbstractVillager . setSpeed(myFloat);
Parameters:
speed: float
Type: float
- The movement speed to set.
Sets the sprinting state of the entity. // AbstractVillager.setSprinting(sprinting as bool);
myAbstractVillager . setSprinting(myBool);
Parameters:
sprinting: bool
Type: bool
- true if the entity should be sprinting.
Sets how many stingers are currently in this entity. // AbstractVillager.setStingerCount(count as int);
myAbstractVillager . setStingerCount(myInt);
Parameters:
count: int
Type: int
- The number of stingers to set.
Sets the swimming state of the entity. // AbstractVillager.setSwimming(swimming as bool);
myAbstractVillager . setSwimming(myBool);
Parameters:
swimming: bool
Type: bool
- true if the entity should be swimming.
Sets the number of ticks the entity has been frozen. // AbstractVillager.setTicksFrozen(ticks as int);
myAbstractVillager . setTicksFrozen(myInt);
Parameters:
ticks: int
Type: int
- The new number of ticks the entity has been frozen.
Checks if the entity should be saved. // AbstractVillager.shouldBeSaved as bool
myAbstractVillager . shouldBeSaved
Return Type:
bool
Checks if the entity should be saved. Returns : true if the entity should be saved.
// AbstractVillager.shouldBeSaved() as bool;
myAbstractVillager . shouldBeSaved();
Return Type:
bool
Checks if this entity should discard friction. // AbstractVillager.shouldDiscardFriction as bool
myAbstractVillager . shouldDiscardFriction
Return Type:
bool
Checks if this entity should discard friction. Returns : True if this entity should discard friction, false otherwise.
// AbstractVillager.shouldDiscardFriction() as bool;
myAbstractVillager . shouldDiscardFriction();
Return Type:
bool
Checks if the commands from this source should inform admins. // AbstractVillager.shouldInformAdmins as bool
myAbstractVillager . 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.
// AbstractVillager.shouldInformAdmins() as bool;
myAbstractVillager . shouldInformAdmins();
Return Type:
bool
Checks if the entity should show its name. // AbstractVillager.shouldShowName as bool
myAbstractVillager . shouldShowName
Return Type:
bool
Checks if the entity should show its name. Returns : true if the entity should show its name.
// AbstractVillager.shouldShowName() as bool;
myAbstractVillager . shouldShowName();
Return Type:
bool
Gets if the merchant should show the progress bar. // AbstractVillager.showProgressBar as bool
myAbstractVillager . showProgressBar
Return Type:
bool
Gets if the merchant should show the progress bar. Returns : If the merchant should show the progress bar.
// AbstractVillager.showProgressBar() as bool;
myAbstractVillager . showProgressBar();
Return Type:
bool
Checks if the entity should show vehicle health. // AbstractVillager.showVehicleHealth as bool
myAbstractVillager . showVehicleHealth
Return Type:
bool
Checks if the entity should show vehicle health. Returns : true if the entity should show vehicle health.
// AbstractVillager.showVehicleHealth() as bool;
myAbstractVillager . showVehicleHealth();
Return Type:
bool
Gets the position that the entity is sleeping at. // AbstractVillager.sleepingPos as BlockPos myAbstractVillager . sleepingPos
Return Type:
BlockPos
Gets the position that the entity is sleeping at. Returns : The position that the entity is sleeping at.
// AbstractVillager.sleepingPos() as BlockPos ; myAbstractVillager . sleepingPos();
Return Type:
BlockPos
Gets the SoundSource
of the entity. Returns : The sound source of the entity.
myAbstractVillager . soundSource();
Return Type:
SoundSource
Gets the movement speed of this entity. // AbstractVillager.speed as float
Return Type:
float
Gets the movement speed of this entity. Returns : The movement speed of the entity.
// AbstractVillager.speed() as float;
myAbstractVillager . speed();
Return Type:
float
Starts riding the given entity. Returns : true if the entity started riding.
// AbstractVillager.startRiding(entity as Entity ) as bool; myAbstractVillager . startRiding(myEntity);
Return Type:
bool
Starts riding the given entity. Returns : true if the entity started riding.
// AbstractVillager.startRiding(entity as Entity , force as bool) as bool; myAbstractVillager . startRiding(myEntity, myBool);
Parameters:
force: bool
Type: bool
- true if the entity should be forced to start riding.
Return Type:
bool
Starts the entity to sleep at a specific position. // AbstractVillager.startSleeping(pos as BlockPos ); myAbstractVillager . startSleeping(myBlockPos);
Starts using an item. myAbstractVillager . startUsingItem(myInteractionHand);
Gets how many stingers are currently in this entity. // AbstractVillager.stingerCount as int
myAbstractVillager . stingerCount
Return Type:
int
Gets how many stingers are currently in this entity. Returns : The stinger count.
// AbstractVillager.stingerCount() as int;
myAbstractVillager . stingerCount();
Return Type:
int
Stops riding the entity. // AbstractVillager.stopRiding();
myAbstractVillager . stopRiding();
Stops the entity from sleeping. // AbstractVillager.stopSleeping();
myAbstractVillager . stopSleeping();
Stops using an item. // AbstractVillager.stopUsingItem();
myAbstractVillager . stopUsingItem();
Gets the UUID of the entity as a string. // AbstractVillager.stringUUID as string
myAbstractVillager . stringUUID
Return Type:
string
Gets the UUID of the entity as a string. Returns : The UUID of the entity as a string.
// AbstractVillager.stringUUID() as string;
myAbstractVillager . stringUUID();
Return Type:
string
Swings the entity's main hand. myAbstractVillager . swing(myInteractionHand);
Swings the entity's main hand. myAbstractVillager . swing(myInteractionHand, myBool);
Parameters:
updateSelf: bool
Type: bool
- Whether to update the entity's self.
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. // AbstractVillager.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.
// AbstractVillager.tags() as Set<string>;
myAbstractVillager . tags();
Return Type:
Set <string >
Gets the current target, or null if not targeting anything. myAbstractVillager . target
Return Type:
LivingEntity
Sets the target of the mob. myAbstractVillager . target = myLivingEntity;
Gets the team color of the entity. // AbstractVillager.teamColor as int
myAbstractVillager . teamColor
Return Type:
int
Gets the team color of the entity. Returns : The team color of the entity.
// AbstractVillager.teamColor() as int;
myAbstractVillager . teamColor();
Return Type:
int
Teleports the entity to the given position. // AbstractVillager.teleportTo(x as double, y as double, z as double);
myAbstractVillager . 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. // AbstractVillager.ticksFrozen as int
myAbstractVillager . ticksFrozen
Return Type:
int
Gets the number of ticks the entity has been frozen. Returns : The number of ticks the entity has been frozen.
// AbstractVillager.ticksFrozen() as int;
myAbstractVillager . ticksFrozen();
Return Type:
int
Gets the number of ticks required to freeze the entity. // AbstractVillager.ticksRequiredToFreeze as int
myAbstractVillager . ticksRequiredToFreeze
Return Type:
int
Gets the number of ticks required to freeze the entity. Returns : The number of ticks required to freeze the entity.
// AbstractVillager.ticksRequiredToFreeze() as int;
myAbstractVillager . ticksRequiredToFreeze();
Return Type:
int
Gets how long the entity has been using an item. // AbstractVillager.ticksUsingItem as int
myAbstractVillager . ticksUsingItem
Return Type:
int
Gets how long the entity has been using an item. Returns : The ticks that the entity has been using an item.
// AbstractVillager.ticksUsingItem() as int;
myAbstractVillager . ticksUsingItem();
Return Type:
int
Gets the trading player of the merchant. // AbstractVillager.tradingPlayer as Player myAbstractVillager . tradingPlayer
Return Type:
Player
Sets the trading player of the merchant. // AbstractVillager.tradingPlayer = (player as Player ); myAbstractVillager . tradingPlayer = myPlayer;
Parameters:
player: Player
Type: Player
- The player to set as the trading player. Sets the trading player of the merchant. // AbstractVillager.tradingPlayer(player as Player ); myAbstractVillager . tradingPlayer(myPlayer);
Parameters:
player: Player
Type: Player
- The player to set as the trading player. Gets the trading player of the merchant. Returns : The trading player of the merchant.
// AbstractVillager.tradingPlayer() as Player ; myAbstractVillager . tradingPlayer();
Return Type:
Player
Moves this entity towards the given location. // AbstractVillager.travel(vec as Vec3 ); myAbstractVillager . travel(myVec3);
Parameters:
vec: Vec3
Type: Vec3
- The direction to move in. Turns the entity. // AbstractVillager.turn(yaw as double, pitch as double);
myAbstractVillager . 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.
Gets how unhappy the villager is. // AbstractVillager.unhappyCounter as int
myAbstractVillager . unhappyCounter
Return Type:
int
Sets how unhappy the villager is. // AbstractVillager.unhappyCounter = (unhappyCounter as int);
myAbstractVillager . unhappyCounter = myInt;
Parameters:
unhappyCounter: int
Type: int
- The new unhappy counter.
Gets how unhappy the villager is. Returns : how unhappy the villager is
// AbstractVillager.unhappyCounter() as int;
myAbstractVillager . unhappyCounter();
Return Type:
int
Sets how unhappy the villager is. // AbstractVillager.unhappyCounter(unhappyCounter as int);
myAbstractVillager . unhappyCounter(myInt);
Parameters:
unhappyCounter: int
Type: int
- The new unhappy counter.
Removes any passengers and stops riding the current entity. // AbstractVillager.unRide();
myAbstractVillager . unRide();
Updates the custom NBT data for this Entity. // AbstractVillager.updateCustomData(data as MapData ); myAbstractVillager . updateCustomData({custom: "data" });
// AbstractVillager.updateCustomEntityTag(level as Level , player as Player , data as MapData ); myAbstractVillager . updateCustomEntityTag(myLevel, myPlayer, myMapData);
Updates the NBT data of this Entity. // AbstractVillager.updateData(data as MapData ); myAbstractVillager . updateData({key: "value" });
Gets the hand that the entity is using an item with. myAbstractVillager . usedItemHand
Return Type:
InteractionHand
Gets the hand that the entity is using an item with. Returns : The hand that the entity is using an item with.
myAbstractVillager . usedItemHand();
Return Type:
InteractionHand
Gets the item that the entity is using. myAbstractVillager . useItem
Return Type:
ItemStack
Gets the item that the entity is using. Returns : The item that the entity is using.
myAbstractVillager . useItem();
Return Type:
ItemStack
Gets the remaining ticks left of the use duration of the item that is being used. // AbstractVillager.useItemRemainingTicks as int
myAbstractVillager . useItemRemainingTicks
Return Type:
int
Gets the remaining ticks left of the use duration of the item that is being used. Returns : The remaining ticks for the item that the entity is using.
// AbstractVillager.useItemRemainingTicks() as int;
myAbstractVillager . useItemRemainingTicks();
Return Type:
int
Gets the UUID of the entity. // AbstractVillager.uuid as UUID
Return Type:
UUID
Gets the UUID of the entity. Returns : The UUID of the entity.
// AbstractVillager.uuid() as UUID;
myAbstractVillager . uuid();
Return Type:
UUID
Gets the vehicle of the entity. // AbstractVillager.vehicle as Entity myAbstractVillager . vehicle
Return Type:
Entity
Gets the vehicle of the entity. Returns : The vehicle of the entity.
// AbstractVillager.vehicle() as Entity ; myAbstractVillager . vehicle();
Return Type:
Entity
Gets the villager XP of the merchant. // AbstractVillager.villagerXp as int
myAbstractVillager . villagerXp
Return Type:
int
Gets the villager XP of the merchant. Returns : The villager XP of the merchant.
// AbstractVillager.villagerXp() as int;
myAbstractVillager . villagerXp();
Return Type:
int
Gets the voice pitch for this entity. // AbstractVillager.voicePitch as float
myAbstractVillager . voicePitch
Return Type:
float
Gets the voice pitch for this entity. Returns : The voice pitch.
// AbstractVillager.voicePitch() as float;
myAbstractVillager . voicePitch();
Return Type:
float
Checks if the mob wants to pick up the given item. Returns : Whether the mob wants to pick up the item.
// AbstractVillager.wantsToPickUp(stack as ItemStack ) as bool; myAbstractVillager . wantsToPickUp(myItemStack);
Return Type:
bool
Gets the x coordinate of the entity. // AbstractVillager.x as double
Return Type:
double
Gets the x coordinate of the entity. Returns : The x coordinate of the entity.
// AbstractVillager.x() as double;
Return Type:
double
Gets the y coordinate of the entity. // AbstractVillager.y as double
Return Type:
double
Gets the y coordinate of the entity. Returns : The y coordinate of the entity.
// AbstractVillager.y() as double;
Return Type:
double
Gets the z coordinate of the entity. // AbstractVillager.z as double
Return Type:
double
Gets the z coordinate of the entity. Returns : The z coordinate of the entity.
// AbstractVillager.z() as double;
Return Type:
double