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

## LivingEntityAccessor `extends EntityAccessor`

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

## WorldAccessor

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

## BlockStateAccessor

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

## DamageSourceAccessor

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

## AbilityAccessor

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

## ConditionAccessor

Function | Return Type | Parameters
--- | --- | ---
getType | String | /
getData | Object | key - String
setData | boolean | key - String value - Object
getAbility | AbilityAccessor | /
isInverted | boolean | /
isEnabling | 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 | /
getString | String | key - String
putByteArray | CompoundNBTAccessor | key - String value - byte[]
putString | CompoundNBTAccessor | key - String value - String
getUniqueId | String | key - String
getIntArray | int[] | key - String
getByteArray | byte[] | key - String
getLongArray | long[] | key - String
getCompound | CompoundNBTAccessor | key - String
getUniqueIdWithUtil | String | key - String
getTagId | byte | key - String
putIntArray | CompoundNBTAccessor | key - String value - int[]
putUniqueId | CompoundNBTAccessor | key - String value - String
putLongArray | CompoundNBTAccessor | key - String value - long[]
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
mul | Vector3dAccessor | factorX - double factorY - double factorZ - double
mul | Vector3dAccessor | vector - Vector3dAccessor
subtract | Vector3dAccessor | x - double y - double z - double
subtract | Vector3dAccessor | vector - Vector3dAccessor
getY | double | /
getX | double | /
inverse | Vector3dAccessor | /
dotProduct | double | vector - Vector3dAccessor
getZ | double | /
rotatePitch | Vector3dAccessor | pitch - float
rotateYaw | Vector3dAccessor | yaw - float
crossProduct | Vector3dAccessor | vector - Vector3dAccessor
lengthSquared | double | /
distanceTo | double | vector - Vector3dAccessor
subtractReverse | Vector3dAccessor | vector - Vector3dAccessor
squareDistanceTo | double | vector - Vector3dAccessor
squareDistanceTo | double | x - double y - double z - double
getValue | Object | /

## MaterialAccessor

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

## ItemStackAccessor

Function | Return Type | Parameters
--- | --- | ---
isEmpty | boolean | /
split | ItemStackAccessor | amount - int
copy | ItemStackAccessor | /
getItem | String | /
getCount | int | /
setCount | ItemStackAccessor | count - int
getNbtTag | CompoundNBTAccessor | /
getMaxDamage | int | /
setDamage | ItemStackAccessor | damage - int
getDamage | int | /
isDamaged | boolean | /
getMaxStackSize | int | /
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 | /