# Script Accessors

## Overview

- EntityAccessor
- LivingEntityAccessor
- WorldAccessor
- BlockStateAccessor
- DamageSourceAccessor
- AbilityAccessor
- ConditionAccessor
- CompoundNBTAccessor
- Vector3dAccessor
- MaterialAccessor
- ItemStackAccessor
- BlockRayTraceResultAccessor
- EntityRayTraceResultAccessor

## EntityAccessor

Function | Return Type | Parameters
--- | --- | ---
getName | String | /
read | void | from - CompoundNBTAccessor
isAlive | boolean | /
setName | void | name - String
save | void | to - CompoundNBTAccessor
getType | String | /
getPosition | Vector3dAccessor | /
getPosZ | double | /
isInvisible | boolean | /
setNameVisible | void | visible - boolean
setPlayerMotion | void | x - double y - double z - double
playSoundAt | void | id - String volume - float pitch - float
setThreeData | boolean | key - String value - Object
getNBTData | CompoundNBTAccessor | /
getLookVec | Vector3dAccessor | /
getAsLiving | LivingEntityAccessor | /
getYaw | float | /
getPitch | float | /
kill | void | /
sendMessage | void | message - String
getWidth | float | /
isImmuneToFire | boolean | /
isLiving | boolean | /
getPersistentData | CompoundNBTAccessor | /
getUUID | String | /
noClip | boolean | /
getWorld | WorldAccessor | /
setYaw | float | yaw - float
rayTrace | Object | distance - double blockMode - String fluidMode - String
setRotation | void | yaw - float pitch - float
setPosition | void | x - double y - double z - double
extinguish | void | /
setInvisible | void | invisible - boolean
getHeight | float | /
setSizeDirectly | void | size - float sizeChangeType - String
startSizeChange | void | size - float sizeChangeType - String
getFallDistance | float | /
executeCommand | int | command - String
getMotion | Vector3dAccessor | /
getPosY | double | /
getPosX | double | /
getTicksExisted | int | /
isPlayer | boolean | /
setPitch | void | pitch - float
setNoGravity | void | noGravity - boolean
isOnGround | boolean | /
hasNoGravity | boolean | /
startRiding | boolean | entity - EntityAccessor force - boolean
removePassengers | void | /
setMotion | void | x - double y - double z - double
getThreeData | Object | key - String
addMotion | void | x - double y - double z - double
isPassenger | boolean | entity - EntityAccessor
setFallDistance | void | fallDistance - float
setNoClip | void | noClip - boolean
setOnFire | void | seconds - int
getPassengers | EntityAccessor[] | /
lookAt | void | target - Vector3dAccessor
setPositionAndRotation | void | x - double y - double z - double yaw - float pitch - float
getHorizontalFacing | Direction | /
sendTranslatedMessage | void | translationKey - String args - Object[]
getEyeHeight | float | /
stopRiding | void | /
isCrouching | boolean | /
getValue | Object | /

## LivingEntityAccessor `extends EntityAccessor`

Function | Return Type | Parameters
--- | --- | ---
isChild | boolean | /
getHealth | float | /
setSuperpower | void | superpower - String
setSuperpower | void | superpower - String lifetime - int
removeSuperpower | void | superpower - String
setItemInSlot | void | slot - String item - Object
isSprinting | boolean | /
getAbilities | AbilityAccessor[] | /
getAbilities | AbilityAccessor[] | containerId - String
getMaxHealth | float | /
attackEntityFrom | void | sourceName - String amount - float
heal | void | amount - float
isOnLadder | boolean | /
setHealth | void | health - float
isUndead | boolean | /
addSuperpower | void | superpower - String
addSuperpower | void | superpower - String lifetime - int
getAbilityById | AbilityAccessor | abilityId - String
getItemInSlot | ItemStackAccessor | slot - String
getAbsorptionAmount | float | /
attackEntityFromMob | void | attacker - LivingEntityAccessor amount - float
attackEntityFromPlayer | void | playerAttacker - LivingEntityAccessor amount - float
attackEntityFromThrowable | void | throwable - EntityAccessor @Nullable thrower - EntityAccessor float - float
attackEntityFromExplosion | void | @Nullable attacker - LivingEntityAccessor float - float
removeSuperpowers | void | /
swingArm | void | mainHand - boolean
isElytraFlying | boolean | /
setMovementSpeed | void | speed - float
getMovementSpeed | float | /
isSleeping | boolean | /
getName | String | /
read | void | from - CompoundNBTAccessor
isAlive | boolean | /
setName | void | name - String
save | void | to - CompoundNBTAccessor
getType | String | /
getPosition | Vector3dAccessor | /
getPosZ | double | /
isInvisible | boolean | /
setNameVisible | void | visible - boolean
setPlayerMotion | void | x - double y - double z - double
playSoundAt | void | id - String volume - float pitch - float
setThreeData | boolean | key - String value - Object
getNBTData | CompoundNBTAccessor | /
getLookVec | Vector3dAccessor | /
getAsLiving | LivingEntityAccessor | /
getYaw | float | /
getPitch | float | /
kill | void | /
sendMessage | void | message - String
getWidth | float | /
isImmuneToFire | boolean | /
isLiving | boolean | /
getPersistentData | CompoundNBTAccessor | /
getUUID | String | /
noClip | boolean | /
getWorld | WorldAccessor | /
setYaw | float | yaw - float
rayTrace | Object | distance - double blockMode - String fluidMode - String
setRotation | void | yaw - float pitch - float
setPosition | void | x - double y - double z - double
extinguish | void | /
setInvisible | void | invisible - boolean
getHeight | float | /
setSizeDirectly | void | size - float sizeChangeType - String
startSizeChange | void | size - float sizeChangeType - String
getFallDistance | float | /
executeCommand | int | command - String
getMotion | Vector3dAccessor | /
getPosY | double | /
getPosX | double | /
getTicksExisted | int | /
isPlayer | boolean | /
setPitch | void | pitch - float
setNoGravity | void | noGravity - boolean
isOnGround | boolean | /
hasNoGravity | boolean | /
startRiding | boolean | entity - EntityAccessor force - boolean
removePassengers | void | /
setMotion | void | x - double y - double z - double
getThreeData | Object | key - String
addMotion | void | x - double y - double z - double
isPassenger | boolean | entity - EntityAccessor
setFallDistance | void | fallDistance - float
setNoClip | void | noClip - boolean
setOnFire | void | seconds - int
getPassengers | EntityAccessor[] | /
lookAt | void | target - Vector3dAccessor
setPositionAndRotation | void | x - double y - double z - double yaw - float pitch - float
getHorizontalFacing | Direction | /
sendTranslatedMessage | void | translationKey - String args - Object[]
getEyeHeight | float | /
stopRiding | void | /
isCrouching | boolean | /
getValue | Object | /

## WorldAccessor

Function | Return Type | Parameters
--- | --- | ---
setTime | void | time - long
getTime | long | /
getDimension | String | /
getEntitiesInBox | EntityAccessor[] | x1 - double y1 - double z1 - double x2 - double y2 - double z2 - double
summonLightning | void | x - double y - double z - double effectOnly - boolean
isRemote | boolean | /
getBlockState | BlockStateAccessor | x - int y - int z - int
setBlockState | void | block - Object x - int y - int z - int
isRaining | boolean | /
isThundering | boolean | /
setRainStrength | void | strength - float
playSound | void | id - String id - String posX - double posY - double posZ - double volume - float pitch - float
executeCommand | void | command - String
loadStructure | void | x - int y - int z - int name - String
getLivingEntitiesInBox | LivingEntityAccessor[] | x1 - double y1 - double z1 - double x2 - double y2 - double z2 - double
getValue | Object | /

## BlockStateAccessor

Function | Return Type | Parameters
--- | --- | ---
getProperty | Object | property - Object
getMaterial | MaterialAccessor | /
getBlock | String | /
withProperty | BlockStateAccessor | property - Object value - Comparable
isAir | boolean | world - WorldAccessor x - int y - int z - int
getPropertyByName | Property | name - String
getValue | Object | /

## DamageSourceAccessor

Function | Return Type | Parameters
--- | --- | ---
getType | String | /
getTrueSource | EntityAccessor | /
getImmediateSource | EntityAccessor | /
getValue | Object | /

## AbilityAccessor

Function | Return Type | Parameters
--- | --- | ---
getId | String | /
getType | String | /
getData | Object | key - String
isEnabled | boolean | /
setData | boolean | key - String value - Object
isUnlocked | boolean | /
getContainerId | String | /
getConditions | ConditionAccessor[] | /
getAdditionalNbtData | CompoundNBTAccessor | /
getValue | Object | /

## ConditionAccessor

Function | Return Type | Parameters
--- | --- | ---
getType | String | /
getData | Object | key - String
setData | boolean | key - String value - Object
isEnabling | boolean | /
getAbility | AbilityAccessor | /
isInverted | boolean | /
getValue | Object | /

## CompoundNBTAccessor

Function | Return Type | Parameters
--- | --- | ---
remove | CompoundNBTAccessor | key - String
getBoolean | boolean | key - String
putBoolean | CompoundNBTAccessor | key - String value - boolean
getByte | byte | key - String
putByte | CompoundNBTAccessor | key - String value - byte
getShort | short | key - String
putShort | CompoundNBTAccessor | key - String value - short
getInt | int | key - String
putInt | CompoundNBTAccessor | key - String value - int
getLong | long | key - String
putLong | CompoundNBTAccessor | key - String value - long
getFloat | float | key - String
putFloat | CompoundNBTAccessor | key - String value - float
getDouble | double | key - String
putDouble | CompoundNBTAccessor | key - String value - double
isEmpty | boolean | /
contains | boolean | key - String
contains | boolean | key - String type - int
merge | CompoundNBTAccessor | otherTag - CompoundNBTAccessor
copy | CompoundNBTAccessor | /
putByteArray | CompoundNBTAccessor | key - String value - byte[]
getString | String | key - String
putUniqueId | CompoundNBTAccessor | key - String value - String
putLongArray | CompoundNBTAccessor | key - String value - long[]
getCompound | CompoundNBTAccessor | key - String
getByteArray | byte[] | key - String
getIntArray | int[] | key - String
getLongArray | long[] | key - String
putString | CompoundNBTAccessor | key - String value - String
getUniqueIdWithUtil | String | key - String
getUniqueId | String | key - String
putIntArray | CompoundNBTAccessor | key - String value - int[]
getTagId | byte | key - String
getValue | Object | /

## Vector3dAccessor

Function | Return Type | Parameters
--- | --- | ---
add | Vector3dAccessor | x - double y - double z - double
add | Vector3dAccessor | vector - Vector3dAccessor
length | double | /
normalize | Vector3dAccessor | /
scale | Vector3dAccessor | scale - double
subtract | Vector3dAccessor | vector - Vector3dAccessor
subtract | Vector3dAccessor | x - double y - double z - double
getY | double | /
getX | double | /
inverse | Vector3dAccessor | /
mul | Vector3dAccessor | vector - Vector3dAccessor
mul | Vector3dAccessor | factorX - double factorY - double factorZ - double
getZ | double | /
dotProduct | double | vector - Vector3dAccessor
subtractReverse | Vector3dAccessor | vector - Vector3dAccessor
squareDistanceTo | double | x - double y - double z - double
squareDistanceTo | double | vector - Vector3dAccessor
distanceTo | double | vector - Vector3dAccessor
lengthSquared | double | /
crossProduct | Vector3dAccessor | vector - Vector3dAccessor
rotateYaw | Vector3dAccessor | yaw - float
rotatePitch | Vector3dAccessor | pitch - float
getValue | Object | /

## MaterialAccessor

Function | Return Type | Parameters
--- | --- | ---
isOpaque | boolean | /
isSolid | boolean | /
isFlammable | boolean | /
isReplaceable | boolean | /
getPushReaction | String | /
blocksMovement | boolean | /
isLiquid | boolean | /
getValue | Object | /

## ItemStackAccessor

Function | Return Type | Parameters
--- | --- | ---
isEmpty | boolean | /
split | ItemStackAccessor | amount - int
copy | ItemStackAccessor | /
getCount | int | /
getItem | String | /
setCount | ItemStackAccessor | count - int
getMaxStackSize | int | /
getDamage | int | /
setDamage | ItemStackAccessor | damage - int
isDamaged | boolean | /
getMaxDamage | int | /
getNbtTag | CompoundNBTAccessor | /
getValue | Object | /

## BlockRayTraceResultAccessor

Function | Return Type | Parameters
--- | --- | ---
getType | String | /
getHitVec | Vector3dAccessor | /
getValue | Object | /

## EntityRayTraceResultAccessor

Function | Return Type | Parameters
--- | --- | ---
getType | String | /
getEntity | EntityAccessor | /
getHitVec | Vector3dAccessor | /
getValue | Object | /