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

## LivingEntityAccessor `extends EntityAccessor`

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

## WorldAccessor

Function | Return Type | Parameters
--- | --- | ---
setTime | void | time - long
getTime | long | /
playSound | void | id - String id - String posX - double posY - double posZ - double volume - float pitch - float
getDimension | String | /
getBlockState | BlockStateAccessor | x - int y - int z - int
isRaining | boolean | /
setRainStrength | void | strength - float
isThundering | boolean | /
executeCommand | void | command - String
setBlockState | void | block - Object x - int y - int z - int
getLivingEntitiesInBox | LivingEntityAccessor[] | x1 - double y1 - double z1 - double x2 - double y2 - double z2 - double
isRemote | boolean | /
loadStructure | void | x - int y - int z - int name - String
summonLightning | void | x - double y - double z - double effectOnly - 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 | /
isAir | boolean | world - WorldAccessor x - int y - int z - int
getMaterial | MaterialAccessor | /
withProperty | BlockStateAccessor | property - Object value - Comparable
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
getConditions | ConditionAccessor[] | /
isUnlocked | boolean | /
getContainerId | String | /
getAdditionalNbtData | CompoundNBTAccessor | /
getValue | Object | /

## ConditionAccessor

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

## MaterialAccessor

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