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

## LivingEntityAccessor `extends EntityAccessor`

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

## WorldAccessor

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

## BlockStateAccessor

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

## MaterialAccessor

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

## ItemStackAccessor

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