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

## LivingEntityAccessor `extends EntityAccessor`

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

## WorldAccessor

Function | Return Type | Parameters
--- | --- | ---
setTime | void | time - long
getTime | long | /
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
isRaining | boolean | /
isThundering | boolean | /
loadStructure | void | x - int y - int z - int name - String
executeCommand | void | command - String
setRainStrength | void | strength - float
summonLightning | void | x - double y - double z - double effectOnly - boolean
getEntitiesInBox | EntityAccessor[] | x1 - double y1 - double z1 - double x2 - double y2 - double z2 - double
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
getBlock | String | /
getMaterial | MaterialAccessor | /
isAir | boolean | world - WorldAccessor x - int y - int z - int
withProperty | BlockStateAccessor | property - Object value - Comparable
getPropertyByName | Property | name - String
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
isEnabled | boolean | /
setData | boolean | key - String value - Object
isUnlocked | boolean | /
getConditions | ConditionAccessor[] | /
getContainerId | String | /
getAdditionalNbtData | CompoundNBTAccessor | /
getValue | Object | /

## ConditionAccessor

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

## MaterialAccessor

Function | Return Type | Parameters
--- | --- | ---
isOpaque | boolean | /
isFlammable | boolean | /
isSolid | boolean | /
isLiquid | boolean | /
blocksMovement | boolean | /
isReplaceable | 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
getDamage | int | /
setDamage | ItemStackAccessor | damage - int
getMaxDamage | int | /
isDamaged | boolean | /
getMaxStackSize | int | /
getNbtTag | CompoundNBTAccessor | /
getValue | Object | /

## BlockRayTraceResultAccessor

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

## EntityRayTraceResultAccessor

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