# Script Accessors

## Overview

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

## EntityAccessor

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

## LivingEntityAccessor `extends EntityAccessor`

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

## WorldAccessor

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

## BlockStateAccessor

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

## DamageSourceAccessor

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

## AbilityAccessor

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

## ConditionAccessor

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

## CompoundNBTAccessor

Function | Return Type | Parameters
--- | --- | ---
getUniqueIdWithUtil | String | key - String
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 type - int
contains | boolean | key - String
merge | CompoundNBTAccessor | otherTag - CompoundNBTAccessor
copy | CompoundNBTAccessor | /
putString | CompoundNBTAccessor | key - String value - String
getString | String | key - String
putByteArray | CompoundNBTAccessor | key - String value - byte[]
getCompound | CompoundNBTAccessor | key - String
getByteArray | byte[] | key - String
getIntArray | int[] | key - String
getLongArray | long[] | key - String
getUniqueId | 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 | vector - Vector3dAccessor
mul | Vector3dAccessor | factorX - double factorY - double factorZ - double
subtract | Vector3dAccessor | x - double y - double z - double
subtract | Vector3dAccessor | vector - Vector3dAccessor
getY | double | /
getX | double | /
inverse | Vector3dAccessor | /
crossProduct | Vector3dAccessor | vector - Vector3dAccessor
getZ | double | /
lengthSquared | double | /
distanceTo | double | vector - Vector3dAccessor
dotProduct | double | vector - Vector3dAccessor
squareDistanceTo | double | x - double y - double z - double
squareDistanceTo | double | vector - Vector3dAccessor
subtractReverse | Vector3dAccessor | vector - Vector3dAccessor
rotatePitch | Vector3dAccessor | pitch - float
rotateYaw | Vector3dAccessor | yaw - float
getValue | Object | /

## MaterialAccessor

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

## ItemStackAccessor

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