# Table of Contents - [entity | raven client](#entity-raven-client) - [encryption | raven client](#encryption-raven-client) - [image | raven client](#image-raven-client) - [setup | raven client](#setup-raven-client) - [itemstack | raven client](#itemstack-raven-client) - [Unknown](#unknown) - [Unknown](#unknown) - [main | raven client](#main-raven-client) - [imports | raven client](#imports-raven-client) - [bridge | raven client](#bridge-raven-client) - [block | raven client](#block-raven-client) - [Unknown](#unknown) - [keybinds | raven client](#keybinds-raven-client) - [config | raven client](#config-raven-client) - [events | raven client](#events-raven-client) - [network | raven client](#network-raven-client) - [inventory | raven client](#inventory-raven-client) - [gl | raven client](#gl-raven-client) - [json | raven client](#json-raven-client) - [Unknown](#unknown) - [client | raven client](#client-raven-client) - [load string | raven client](#load-string-raven-client) - [packets | raven client](#packets-raven-client) - [tile entity | raven client](#tile-entity-raven-client) - [response | raven client](#response-raven-client) - [util | raven client](#util-raven-client) - [playerstate | raven client](#playerstate-raven-client) - [request | raven client](#request-raven-client) - [vec3 | raven client](#vec3-raven-client) - [modules | raven client](#modules-raven-client) - [world | raven client](#world-raven-client) - [render | raven client](#render-raven-client) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) --- # entity | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/entity.md) . assumes variable `entity` is defined. example: `Entity entity = client.getPlayer();` [](https://daikirai.gitbook.io/scripting/documentation/entity#entity) Entity --------------------------------------------------------------------------------- `Entity` represents an entity in the world with its properties and data. property type description type `String` simple class name of the entity entityId `int` entity id in the world isLiving `boolean` `true` if the entity extends `EntityLivingBase` isPlayer `boolean` `true` if the entity is a player isUser `boolean` `true` if the entity is the local player * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#distancetoground) distanceToGround returns the distance from the entity to the ground. Copy double distance = entity.distanceToGround(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getabsorption) getAbsorption returns the absorption amount, or `-1` for non-living entities. Copy float absorption = entity.getAbsorption(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getarmorinslot) getArmorInSlot returns the armor item in the specified slot as an [`ItemStack`](https://daikirai.gitbook.io/scripting/documentation/itemstack) . valid slots are `0-3`. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getblockposition) getBlockPosition returns the entity's block position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getbps) getBPS returns the entity's speed in blocks per second. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getdisplayname) getDisplayName returns the display name of the entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#geteyeheight) getEyeHeight returns the eye height. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getfalldistance) getFallDistance returns the fall distance. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getfacing) getFacing returns the horizontal facing direction. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#gethealth) getHealth returns the current health, or `-1` for non-living entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#gethelditem) getHeldItem returns the held item as an [`ItemStack`](https://daikirai.gitbook.io/scripting/documentation/itemstack) , or `null` when empty. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getheight) getHeight returns the entity height. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#gethurttime) getHurtTime returns the hurt time, or `-1` for non-living entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getlastposition) getLastPosition returns the previous tick position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getmaxhealth) getMaxHealth returns the maximum health, or `-1` for non-living entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getmaxhurttime) getMaxHurtTime returns the maximum hurt time, or `-1` for non-living entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getmoveattribute) getMoveAttribute returns current movement speed attribute `getAIMoveSpeed`, or `-1` for non-player entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getname) getName returns the registry or display name of the entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getnetworkplayer) getNetworkPlayer returns the [`NetworkPlayer`](https://daikirai.gitbook.io/scripting/documentation/network) wrapper for this entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getpitch) getPitch returns the entity pitch. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getposition) getPosition returns the current position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getpotioneffects) getPotionEffects returns active potion effects as a list of `[id, name, amplifier, duration]`, or `null` when none. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getspeed) getSpeed returns the horizontal movement speed per tick. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getswingprogress) getSwingProgress returns the swing progress tick count, or `-1` for non-living entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getticksexisted) getTicksExisted returns the ticks existed value. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getuuid) getUUID returns the entity uuid as a string. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getwidth) getWidth returns the entity width. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#getyaw) getYaw returns the entity yaw. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isburning) isBurning returns `true` if the entity is burning. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#iscollided) isCollided returns `true` if the entity is colliding. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#iscollidedhorizontally) isCollidedHorizontally returns `true` if the entity collides horizontally. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#iscollidedvertically) isCollidedVertically returns `true` if the entity collides vertically. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isconsuming) isConsuming returns `true` if the player entity is consuming an item. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isdead) isDead returns `true` if the entity is dead. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isholdingblock) isHoldingBlock returns `true` if the entity is holding a block item. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isholdingsword) isHoldingSword returns `true` if the entity is holding a sword. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isholdingweapon) isHoldingWeapon returns `true` if the entity is holding a weapon recognised by raven. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isinvisible) isInvisible returns `true` if the entity is invisible. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isinlava) isInLava returns `true` if the entity is in lava. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isinliquid) isInLiquid returns `true` if the entity is in water or lava. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isinwater) isInWater returns `true` if the entity is in water. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isonedge) isOnEdge returns `true` if the entity is standing on an edge. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#onground) onGround returns `true` if the entity is on the ground. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isonladder) isOnLadder returns `true` if the entity is on a ladder. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isriding) isRiding returns `true` if the entity is riding another entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#issleeping) isSleeping returns `true` if the player entity is sleeping. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#issneaking) isSneaking returns `true` if the entity is sneaking. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#issprinting) isSprinting returns `true` if the entity is sprinting. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isswinging) isSwinging returns `true` if the entity is currently swinging. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#isusingitem) isUsingItem returns `true` if the player entity is using an item. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#setpitch) setPitch sets the entity pitch. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#setposition) setPosition sets the entity position. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/entity#setyaw) setYaw sets the entity yaw. [Previousconfig](https://daikirai.gitbook.io/scripting/documentation/config) [Nextgl](https://daikirai.gitbook.io/scripting/documentation/gl) Last updated 3 months ago * [Entity](https://daikirai.gitbook.io/scripting/documentation/entity#entity) * [distanceToGround](https://daikirai.gitbook.io/scripting/documentation/entity#distancetoground) * [getAbsorption](https://daikirai.gitbook.io/scripting/documentation/entity#getabsorption) * [getArmorInSlot](https://daikirai.gitbook.io/scripting/documentation/entity#getarmorinslot) * [getBlockPosition](https://daikirai.gitbook.io/scripting/documentation/entity#getblockposition) * [getBPS](https://daikirai.gitbook.io/scripting/documentation/entity#getbps) * [getDisplayName](https://daikirai.gitbook.io/scripting/documentation/entity#getdisplayname) * [getEyeHeight](https://daikirai.gitbook.io/scripting/documentation/entity#geteyeheight) * [getFallDistance](https://daikirai.gitbook.io/scripting/documentation/entity#getfalldistance) * [getFacing](https://daikirai.gitbook.io/scripting/documentation/entity#getfacing) * [getHealth](https://daikirai.gitbook.io/scripting/documentation/entity#gethealth) * [getHeldItem](https://daikirai.gitbook.io/scripting/documentation/entity#gethelditem) * [getHeight](https://daikirai.gitbook.io/scripting/documentation/entity#getheight) * [getHurtTime](https://daikirai.gitbook.io/scripting/documentation/entity#gethurttime) * [getLastPosition](https://daikirai.gitbook.io/scripting/documentation/entity#getlastposition) * [getMaxHealth](https://daikirai.gitbook.io/scripting/documentation/entity#getmaxhealth) * [getMaxHurtTime](https://daikirai.gitbook.io/scripting/documentation/entity#getmaxhurttime) * [getMoveAttribute](https://daikirai.gitbook.io/scripting/documentation/entity#getmoveattribute) * [getName](https://daikirai.gitbook.io/scripting/documentation/entity#getname) * [getNetworkPlayer](https://daikirai.gitbook.io/scripting/documentation/entity#getnetworkplayer) * [getPitch](https://daikirai.gitbook.io/scripting/documentation/entity#getpitch) * [getPosition](https://daikirai.gitbook.io/scripting/documentation/entity#getposition) * [getPotionEffects](https://daikirai.gitbook.io/scripting/documentation/entity#getpotioneffects) * [getSpeed](https://daikirai.gitbook.io/scripting/documentation/entity#getspeed) * [getSwingProgress](https://daikirai.gitbook.io/scripting/documentation/entity#getswingprogress) * [getTicksExisted](https://daikirai.gitbook.io/scripting/documentation/entity#getticksexisted) * [getUUID](https://daikirai.gitbook.io/scripting/documentation/entity#getuuid) * [getWidth](https://daikirai.gitbook.io/scripting/documentation/entity#getwidth) * [getYaw](https://daikirai.gitbook.io/scripting/documentation/entity#getyaw) * [isBurning](https://daikirai.gitbook.io/scripting/documentation/entity#isburning) * [isCollided](https://daikirai.gitbook.io/scripting/documentation/entity#iscollided) * [isCollidedHorizontally](https://daikirai.gitbook.io/scripting/documentation/entity#iscollidedhorizontally) * [isCollidedVertically](https://daikirai.gitbook.io/scripting/documentation/entity#iscollidedvertically) * [isConsuming](https://daikirai.gitbook.io/scripting/documentation/entity#isconsuming) * [isDead](https://daikirai.gitbook.io/scripting/documentation/entity#isdead) * [isHoldingBlock](https://daikirai.gitbook.io/scripting/documentation/entity#isholdingblock) * [isHoldingSword](https://daikirai.gitbook.io/scripting/documentation/entity#isholdingsword) * [isHoldingWeapon](https://daikirai.gitbook.io/scripting/documentation/entity#isholdingweapon) * [isInvisible](https://daikirai.gitbook.io/scripting/documentation/entity#isinvisible) * [isInLava](https://daikirai.gitbook.io/scripting/documentation/entity#isinlava) * [isInLiquid](https://daikirai.gitbook.io/scripting/documentation/entity#isinliquid) * [isInWater](https://daikirai.gitbook.io/scripting/documentation/entity#isinwater) * [isOnEdge](https://daikirai.gitbook.io/scripting/documentation/entity#isonedge) * [onGround](https://daikirai.gitbook.io/scripting/documentation/entity#onground) * [isOnLadder](https://daikirai.gitbook.io/scripting/documentation/entity#isonladder) * [isRiding](https://daikirai.gitbook.io/scripting/documentation/entity#isriding) * [isSleeping](https://daikirai.gitbook.io/scripting/documentation/entity#issleeping) * [isSneaking](https://daikirai.gitbook.io/scripting/documentation/entity#issneaking) * [isSprinting](https://daikirai.gitbook.io/scripting/documentation/entity#issprinting) * [isSwinging](https://daikirai.gitbook.io/scripting/documentation/entity#isswinging) * [isUsingItem](https://daikirai.gitbook.io/scripting/documentation/entity#isusingitem) * [setPitch](https://daikirai.gitbook.io/scripting/documentation/entity#setpitch) * [setPosition](https://daikirai.gitbook.io/scripting/documentation/entity#setposition) * [setYaw](https://daikirai.gitbook.io/scripting/documentation/entity#setyaw) Copy ItemStack armor = entity.getArmorInSlot(int slot); Copy Vec3 blockPos = entity.getBlockPosition(); Copy double bps = entity.getBPS(); Copy String displayName = entity.getDisplayName(); Copy float eyeHeight = entity.getEyeHeight(); Copy float fall = entity.getFallDistance(); Copy String facing = entity.getFacing(); Copy float health = entity.getHealth(); Copy ItemStack held = entity.getHeldItem(); Copy float height = entity.getHeight(); Copy int hurtTime = entity.getHurtTime(); Copy Vec3 previous = entity.getLastPosition(); Copy float maxHealth = entity.getMaxHealth(); Copy int maxHurt = entity.getMaxHurtTime(); Copy float moveAttr = entity.getMoveAttribute(); Copy String name = entity.getName(); Copy NetworkPlayer info = entity.getNetworkPlayer(); Copy float pitch = entity.getPitch(); Copy Vec3 position = entity.getPosition(); Copy List effects = entity.getPotionEffects(); Copy double speed = entity.getSpeed(); Copy int swing = entity.getSwingProgress(); Copy int ticks = entity.getTicksExisted(); Copy String uuid = entity.getUUID(); Copy float width = entity.getWidth(); Copy float yaw = entity.getYaw(); Copy boolean burning = entity.isBurning(); Copy boolean collided = entity.isCollided(); Copy boolean collidedHoriz = entity.isCollidedHorizontally(); Copy boolean collidedVert = entity.isCollidedVertically(); Copy boolean consuming = entity.isConsuming(); Copy boolean dead = entity.isDead(); Copy boolean holdingBlock = entity.isHoldingBlock(); Copy boolean holdingSword = entity.isHoldingSword(); Copy boolean holdingWeapon = entity.isHoldingWeapon(); Copy boolean invisible = entity.isInvisible(); Copy boolean inLava = entity.isInLava(); Copy boolean inLiquid = entity.isInLiquid(); Copy boolean inWater = entity.isInWater(); Copy boolean onEdge = entity.isOnEdge(); Copy boolean grounded = entity.onGround(); Copy boolean onLadder = entity.isOnLadder(); Copy boolean riding = entity.isRiding(); Copy boolean sleeping = entity.isSleeping(); Copy boolean sneaking = entity.isSneaking(); Copy boolean sprinting = entity.isSprinting(); Copy boolean swinging = entity.isSwinging(); Copy boolean usingItem = entity.isUsingItem(); Copy entity.setPitch(float pitch); Copy entity.setPosition(Vec3 position); entity.setPosition(double x, double y, double z); Copy entity.setYaw(float yaw); --- # encryption | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/guide/encryption.md) . [](https://daikirai.gitbook.io/scripting/guide/encryption#why-encryption) Why Encryption? ---------------------------------------------------------------------------------------------- By default, script source code can be easily accessed and altered. Encryption ensures your code remains secure and is only decrypted at runtime by the client. To encrypt a script, use the **orchid bot** in the customer discord and run the command: `/encrypt ` [Previoussetup](https://daikirai.gitbook.io/scripting/guide/setup) [Nextimports](https://daikirai.gitbook.io/scripting/documentation/imports) Last updated 5 months ago --- # image | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/image.md) . [](https://daikirai.gitbook.io/scripting/documentation/image#image) Image ------------------------------------------------------------------------------ `Image` represents a loaded image with dimensions and loading state. ### [](https://daikirai.gitbook.io/scripting/documentation/image#constructor) constructor creates a new image from a url with optional caching. Copy Image image = new Image(String url, boolean cache); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/image#getdimensions) getDimensions returns the image dimensions as a float array. Copy float[] dimensions = image.getDimensions(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/image#isloaded) isLoaded returns `true` if the image has finished loading. Copy boolean loaded = image.isLoaded(); [Previousgl](https://daikirai.gitbook.io/scripting/documentation/gl) [Nextinventory](https://daikirai.gitbook.io/scripting/documentation/inventory) Last updated 5 months ago * [Image](https://daikirai.gitbook.io/scripting/documentation/image#image) * [constructor](https://daikirai.gitbook.io/scripting/documentation/image#constructor) * [getDimensions](https://daikirai.gitbook.io/scripting/documentation/image#getdimensions) * [isLoaded](https://daikirai.gitbook.io/scripting/documentation/image#isloaded) --- # setup | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/guide/setup.md) . ### [](https://daikirai.gitbook.io/scripting/guide/setup#installing-the-java-development-kit) Installing the Java Development Kit You must install the Java Development Kit to create and use scripts! A Java Runtime Environment (JRE) can run Java applications but does not include the tools required to compile Java scripts. To compile Java scripts you need a **Java Development Kit (JDK)**. You may install the Adoptium Java 8 JDK [here](https://adoptium.net/en-GB/temurin/releases?version=8&os=any&arch=any) . * * * ### [](https://daikirai.gitbook.io/scripting/guide/setup#setting-the-java-executable) Setting the Java executable On Windows, the Java executable is typically located at either: `C:\Program Files\Java\jdk` `` `\bin\javaw.exe` `C:\Program Files\Eclipse Adoptium\jdk` `` `\bin\javaw.exe` To configure the Java executable in the default Minecraft Launcher, follow these steps: 1 #### [](https://daikirai.gitbook.io/scripting/guide/setup#open-installations) Open Installations Navigate to the "Installations" tab in the launcher interface. 2 #### [](https://daikirai.gitbook.io/scripting/guide/setup#select-a-profile) Select a profile Locate the launch profile for which you want to set the Java executable. 3 #### [](https://daikirai.gitbook.io/scripting/guide/setup#edit-the-profile) Edit the profile On the right-hand side of the launch profile, click the button faced with three dots and select "Edit" from the drop-down menu. 4 #### [](https://daikirai.gitbook.io/scripting/guide/setup#show-more-options) Show more options Click on "More Options" to expand it and reveal additional settings. 5 #### [](https://daikirai.gitbook.io/scripting/guide/setup#set-java-executable) Set Java executable Locate the field labelled "Java executable" within the "More Options" section and paste the path of `javaw.exe` corresponding to your Java installation into the field. * * * ### [](https://daikirai.gitbook.io/scripting/guide/setup#creating-scripts) Creating Scripts * Raven scripts are coded in Java, which means your code must be in a `.java` file. * The recommended approach is to utilise a code editor, such as Brackets or Visual Studio Code. * All scripts must be in the scripts folder in order to be used. If the file name begins with an underscore, it will not be recognised as a valid script file. * * * ### [](https://daikirai.gitbook.io/scripting/guide/setup#using-scripts) Using Scripts * The GUI has a category labelled **Scripts**. All scripts in your scripts folder will be displayed here. * To add scripts, click **Open Folder** within the Manager module and drag your scripts into the folder. * Whenever you introduce a new script or make modifications to an existing one, press the **Load Scripts** button to apply the changes. * If there is an error within a script, it will appear in red and cannot be enabled. An error message will be displayed in the chat window with details about the encountered issue. [Previousmain](https://daikirai.gitbook.io/scripting) [Nextencryption](https://daikirai.gitbook.io/scripting/guide/encryption) Last updated 5 months ago * [Installing the Java Development Kit](https://daikirai.gitbook.io/scripting/guide/setup#installing-the-java-development-kit) * [Setting the Java executable](https://daikirai.gitbook.io/scripting/guide/setup#setting-the-java-executable) * [Creating Scripts](https://daikirai.gitbook.io/scripting/guide/setup#creating-scripts) * [Using Scripts](https://daikirai.gitbook.io/scripting/guide/setup#using-scripts) --- # itemstack | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/itemstack.md) . [](https://daikirai.gitbook.io/scripting/documentation/itemstack#itemstack) ItemStack ------------------------------------------------------------------------------------------ `ItemStack` represents an item with its properties, durability, and metadata. property type description type `String` item class name name `String` registry name displayName `String` display name stackSize `int` current stack size maxStackSize `int` max stack size durability `int` remaining durability maxDurability `int` max durability isBlock `boolean` `true` if the item is a block meta `int` item metadata ### [](https://daikirai.gitbook.io/scripting/documentation/itemstack#constructor) constructor creates a new item stack from a registry name. Copy ItemStack stack = new ItemStack(String name); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/itemstack#getenchantments) getEnchantments returns a list of enchantments on the item. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/itemstack#gettooltip) getTooltip returns the item's tooltip as a list of strings. [Previousinventory](https://daikirai.gitbook.io/scripting/documentation/inventory) [Nextjson](https://daikirai.gitbook.io/scripting/documentation/json) Last updated 5 months ago * [ItemStack](https://daikirai.gitbook.io/scripting/documentation/itemstack#itemstack) * [constructor](https://daikirai.gitbook.io/scripting/documentation/itemstack#constructor) * [getEnchantments](https://daikirai.gitbook.io/scripting/documentation/itemstack#getenchantments) * [getTooltip](https://daikirai.gitbook.io/scripting/documentation/itemstack#gettooltip) Copy List enchantments = stack.getEnchantments(); Copy List tooltip = stack.getTooltip(); --- # Unknown \# raven client ## scripting - \[main\](https://daikirai.gitbook.io/scripting/readme.md) - \[setup\](https://daikirai.gitbook.io/scripting/guide/setup.md) - \[encryption\](https://daikirai.gitbook.io/scripting/guide/encryption.md): protect your scripts from being viewed or modified. - \[imports\](https://daikirai.gitbook.io/scripting/documentation/imports.md) - \[events\](https://daikirai.gitbook.io/scripting/documentation/events.md): event callbacks that are triggered during various game actions and states. - \[block\](https://daikirai.gitbook.io/scripting/documentation/block.md) - \[bridge\](https://daikirai.gitbook.io/scripting/documentation/bridge.md): data bridge for sharing values between scripts. - \[client\](https://daikirai.gitbook.io/scripting/documentation/client.md): methods related to the client. - \[config\](https://daikirai.gitbook.io/scripting/documentation/config.md) - \[entity\](https://daikirai.gitbook.io/scripting/documentation/entity.md) - \[gl\](https://daikirai.gitbook.io/scripting/documentation/gl.md): opengl wrappers for advanced rendering operations. - \[image\](https://daikirai.gitbook.io/scripting/documentation/image.md) - \[inventory\](https://daikirai.gitbook.io/scripting/documentation/inventory.md) - \[itemstack\](https://daikirai.gitbook.io/scripting/documentation/itemstack.md) - \[json\](https://daikirai.gitbook.io/scripting/documentation/json.md) - \[keybinds\](https://daikirai.gitbook.io/scripting/documentation/keybinds.md) - \[load string\](https://daikirai.gitbook.io/scripting/documentation/loadstring.md): loads code from an external source. - \[modules\](https://daikirai.gitbook.io/scripting/documentation/modules.md) - \[network\](https://daikirai.gitbook.io/scripting/documentation/network.md) - \[packets\](https://daikirai.gitbook.io/scripting/documentation/packets.md) - \[playerstate\](https://daikirai.gitbook.io/scripting/documentation/playerstate.md) - \[render\](https://daikirai.gitbook.io/scripting/documentation/render.md) - \[request\](https://daikirai.gitbook.io/scripting/documentation/request.md) - \[response\](https://daikirai.gitbook.io/scripting/documentation/response.md) - \[tile entity\](https://daikirai.gitbook.io/scripting/documentation/tile-entity.md) - \[util\](https://daikirai.gitbook.io/scripting/documentation/util.md) - \[vec3\](https://daikirai.gitbook.io/scripting/documentation/vec3.md) - \[world\](https://daikirai.gitbook.io/scripting/documentation/world.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on a page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/readme.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/entity.md). # entity {% hint style="info" %} assumes variable \`entity\` is defined. example: \`Entity entity = client.getPlayer();\` {% endhint %} ## Entity \`Entity\` represents an entity in the world with its properties and data. | property | type | description | | -------- | --------- | ----------------------------------------------- | | type | \`String\` | simple class name of the entity | | entityId | \`int\` | entity id in the world | | isLiving | \`boolean\` | \`true\` if the entity extends \`EntityLivingBase\` | | isPlayer | \`boolean\` | \`true\` if the entity is a player | | isUser | \`boolean\` | \`true\` if the entity is the local player | \*\*\* ### distanceToGround returns the distance from the entity to the ground. \`\`\`java double distance = entity.distanceToGround(); \`\`\` \*\*\* ### getAbsorption returns the absorption amount, or \`-1\` for non-living entities. \`\`\`java float absorption = entity.getAbsorption(); \`\`\` \*\*\* ### getArmorInSlot returns the armor item in the specified slot as an \[\`ItemStack\`\](/scripting/documentation/itemstack.md). valid slots are \`0-3\`. \`\`\`java ItemStack armor = entity.getArmorInSlot(int slot); \`\`\` \*\*\* ### getBlockPosition returns the entity's block position as a \[\`Vec3\`\](/scripting/documentation/vec3.md). \`\`\`java Vec3 blockPos = entity.getBlockPosition(); \`\`\` \*\*\* ### getBPS returns the entity's speed in blocks per second. \`\`\`java double bps = entity.getBPS(); \`\`\` \*\*\* ### getDisplayName returns the display name of the entity. \`\`\`java String displayName = entity.getDisplayName(); \`\`\` \*\*\* ### getEyeHeight returns the eye height. \`\`\`java float eyeHeight = entity.getEyeHeight(); \`\`\` \*\*\* ### getFallDistance returns the fall distance. \`\`\`java float fall = entity.getFallDistance(); \`\`\` \*\*\* ### getFacing returns the horizontal facing direction. \`\`\`java String facing = entity.getFacing(); \`\`\` \*\*\* ### getHealth returns the current health, or \`-1\` for non-living entities. \`\`\`java float health = entity.getHealth(); \`\`\` \*\*\* ### getHeldItem returns the held item as an \[\`ItemStack\`\](/scripting/documentation/itemstack.md), or \`null\` when empty. \`\`\`java ItemStack held = entity.getHeldItem(); \`\`\` \*\*\* ### getHeight returns the entity height. \`\`\`java float height = entity.getHeight(); \`\`\` \*\*\* ### getHurtTime returns the hurt time, or \`-1\` for non-living entities. \`\`\`java int hurtTime = entity.getHurtTime(); \`\`\` \*\*\* ### getLastPosition returns the previous tick position as a \[\`Vec3\`\](/scripting/documentation/vec3.md). \`\`\`java Vec3 previous = entity.getLastPosition(); \`\`\` \*\*\* ### getMaxHealth returns the maximum health, or \`-1\` for non-living entities. \`\`\`java float maxHealth = entity.getMaxHealth(); \`\`\` \*\*\* ### getMaxHurtTime returns the maximum hurt time, or \`-1\` for non-living entities. \`\`\`java int maxHurt = entity.getMaxHurtTime(); \`\`\` \*\*\* ### getMoveAttribute returns current movement speed attribute \`getAIMoveSpeed\`, or \`-1\` for non-player entities. \`\`\`java float moveAttr = entity.getMoveAttribute(); \`\`\` \*\*\* ### getName returns the registry or display name of the entity. \`\`\`java String name = entity.getName(); \`\`\` \*\*\* ### getNetworkPlayer returns the \[\`NetworkPlayer\`\](/scripting/documentation/network.md) wrapper for this entity. \`\`\`java NetworkPlayer info = entity.getNetworkPlayer(); \`\`\` \*\*\* ### getPitch returns the entity pitch. \`\`\`java float pitch = entity.getPitch(); \`\`\` \*\*\* ### getPosition returns the current position as a \[\`Vec3\`\](/scripting/documentation/vec3.md). \`\`\`java Vec3 position = entity.getPosition(); \`\`\` \*\*\* ### getPotionEffects returns active potion effects as a list of \`\[id, name, amplifier, duration\]\`, or \`null\` when none. \`\`\`java List effects = entity.getPotionEffects(); \`\`\` \*\*\* ### getSpeed returns the horizontal movement speed per tick. \`\`\`java double speed = entity.getSpeed(); \`\`\` \*\*\* ### getSwingProgress returns the swing progress tick count, or \`-1\` for non-living entities. \`\`\`java int swing = entity.getSwingProgress(); \`\`\` \*\*\* ### getTicksExisted returns the ticks existed value. \`\`\`java int ticks = entity.getTicksExisted(); \`\`\` \*\*\* ### getUUID returns the entity uuid as a string. \`\`\`java String uuid = entity.getUUID(); \`\`\` \*\*\* ### getWidth returns the entity width. \`\`\`java float width = entity.getWidth(); \`\`\` \*\*\* ### getYaw returns the entity yaw. \`\`\`java float yaw = entity.getYaw(); \`\`\` \*\*\* ### isBurning returns \`true\` if the entity is burning. \`\`\`java boolean burning = entity.isBurning(); \`\`\` \*\*\* ### isCollided returns \`true\` if the entity is colliding. \`\`\`java boolean collided = entity.isCollided(); \`\`\` \*\*\* ### isCollidedHorizontally returns \`true\` if the entity collides horizontally. \`\`\`java boolean collidedHoriz = entity.isCollidedHorizontally(); \`\`\` \*\*\* ### isCollidedVertically returns \`true\` if the entity collides vertically. \`\`\`java boolean collidedVert = entity.isCollidedVertically(); \`\`\` \*\*\* ### isConsuming returns \`true\` if the player entity is consuming an item. \`\`\`java boolean consuming = entity.isConsuming(); \`\`\` \*\*\* ### isDead returns \`true\` if the entity is dead. \`\`\`java boolean dead = entity.isDead(); \`\`\` \*\*\* ### isHoldingBlock returns \`true\` if the entity is holding a block item. \`\`\`java boolean holdingBlock = entity.isHoldingBlock(); \`\`\` \*\*\* ### isHoldingSword returns \`true\` if the entity is holding a sword. \`\`\`java boolean holdingSword = entity.isHoldingSword(); \`\`\` \*\*\* ### isHoldingWeapon returns \`true\` if the entity is holding a weapon recognised by raven. \`\`\`java boolean holdingWeapon = entity.isHoldingWeapon(); \`\`\` \*\*\* ### isInvisible returns \`true\` if the entity is invisible. \`\`\`java boolean invisible = entity.isInvisible(); \`\`\` \*\*\* ### isInLava returns \`true\` if the entity is in lava. \`\`\`java boolean inLava = entity.isInLava(); \`\`\` \*\*\* ### isInLiquid returns \`true\` if the entity is in water or lava. \`\`\`java boolean inLiquid = entity.isInLiquid(); \`\`\` \*\*\* ### isInWater returns \`true\` if the entity is in water. \`\`\`java boolean inWater = entity.isInWater(); \`\`\` \*\*\* ### isOnEdge returns \`true\` if the entity is standing on an edge. \`\`\`java boolean onEdge = entity.isOnEdge(); \`\`\` \*\*\* ### onGround returns \`true\` if the entity is on the ground. \`\`\`java boolean grounded = entity.onGround(); \`\`\` \*\*\* ### isOnLadder returns \`true\` if the entity is on a ladder. \`\`\`java boolean onLadder = entity.isOnLadder(); \`\`\` \*\*\* ### isRiding returns \`true\` if the entity is riding another entity. \`\`\`java boolean riding = entity.isRiding(); \`\`\` \*\*\* ### isSleeping returns \`true\` if the player entity is sleeping. \`\`\`java boolean sleeping = entity.isSleeping(); \`\`\` \*\*\* ### isSneaking returns \`true\` if the entity is sneaking. \`\`\`java boolean sneaking = entity.isSneaking(); \`\`\` \*\*\* ### isSprinting returns \`true\` if the entity is sprinting. \`\`\`java boolean sprinting = entity.isSprinting(); \`\`\` \*\*\* ### isSwinging returns \`true\` if the entity is currently swinging. \`\`\`java boolean swinging = entity.isSwinging(); \`\`\` \*\*\* ### isUsingItem returns \`true\` if the player entity is using an item. \`\`\`java boolean usingItem = entity.isUsingItem(); \`\`\` \*\*\* ### setPitch sets the entity pitch. \`\`\`java entity.setPitch(float pitch); \`\`\` \*\*\* ### setPosition sets the entity position. \`\`\`java entity.setPosition(Vec3 position); entity.setPosition(double x, double y, double z); \`\`\` \*\*\* ### setYaw sets the entity yaw. \`\`\`java entity.setYaw(float yaw); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/entity.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # main | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/readme.md) . #### [](https://daikirai.gitbook.io/scripting#welcome-to-the-scripting-api-documentation) Welcome to the Scripting API documentation. Write simple Java scripts that hook into events, read game state, and automate actions. Visit the [setup](https://daikirai.gitbook.io/scripting/guide/setup) page to get your environment ready and run your first script. * * * ### [](https://daikirai.gitbook.io/scripting#credits) Credits This documentation was created by [blowsy](https://www.youtube.com/@blowsy) , [pug](https://www.youtube.com/@pugrilla) , and [desiyn](https://www.youtube.com/@desIWNL) . [Nextsetup](https://daikirai.gitbook.io/scripting/guide/setup) Last updated 5 months ago --- # imports | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/imports.md) . list of java classes that are imported and available for use in scripts. * `java.lang.* (ex. Math, StringBuilder)` * `ArrayList` * `Arrays` * `AtomicBoolean` * `AtomicInteger` * `AtomicLong` * `Color` * `Collections` * `Comparator` * `ConcurrentHashMap` * `HashMap` * `HashSet` * `Iterator` * `LinkedHashMap` * `LinkedList` * `List` * `Map` * `Matcher` * `Pattern` * `Random` [Previousencryption](https://daikirai.gitbook.io/scripting/guide/encryption) [Nextevents](https://daikirai.gitbook.io/scripting/documentation/events) Last updated 2 months ago --- # bridge | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/bridge.md) . ### [](https://daikirai.gitbook.io/scripting/documentation/bridge#add) add adds or updates a value in the shared bridge map. Copy bridge.add(String key, Object value); bridge.add(String key); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/bridge#clear) clear removes every entry stored in the bridge map. Copy bridge.clear(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/bridge#get) get returns the value stored under a specified key, or `null` if it does not exist. Copy Object value = bridge.get(String key); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/bridge#has) has returns `true` if the bridge map contains the specified key. Copy boolean containsKey = bridge.has(String key); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/bridge#remove) remove removes a key and its associated value from the bridge map. [Previousblock](https://daikirai.gitbook.io/scripting/documentation/block) [Nextclient](https://daikirai.gitbook.io/scripting/documentation/client) Last updated 5 months ago * [add](https://daikirai.gitbook.io/scripting/documentation/bridge#add) * [clear](https://daikirai.gitbook.io/scripting/documentation/bridge#clear) * [get](https://daikirai.gitbook.io/scripting/documentation/bridge#get) * [has](https://daikirai.gitbook.io/scripting/documentation/bridge#has) * [remove](https://daikirai.gitbook.io/scripting/documentation/bridge#remove) Copy bridge.remove(String key); --- # block | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/block.md) . [](https://daikirai.gitbook.io/scripting/documentation/block#block) Block ------------------------------------------------------------------------------ `Block` represents a block in the world with its properties and metadata. property type description type `String` block class name name `String` registry name variant `int` block metadata interactable `boolean` `true` if the block can be interacted with height `double` block bounding height width `double` block bounding width length `double` block bounding length [Previousevents](https://daikirai.gitbook.io/scripting/documentation/events) [Nextbridge](https://daikirai.gitbook.io/scripting/documentation/bridge) Last updated 5 months ago --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/image.md). # image ## Image \`Image\` represents a loaded image with dimensions and loading state. ### constructor creates a new image from a url with optional caching. \`\`\`java Image image = new Image(String url, boolean cache); \`\`\` \*\*\* ### getDimensions returns the image dimensions as a float array. \`\`\`java float\[\] dimensions = image.getDimensions(); \`\`\` \*\*\* ### isLoaded returns \`true\` if the image has finished loading. \`\`\`java boolean loaded = image.isLoaded(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/image.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # keybinds | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/keybinds.md) . minecraft keycodes: [https://minecraft.fandom.com/wiki/Key\_codes](https://minecraft.fandom.com/wiki/Key_codes) ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#getkeycode) getKeycode returns the keycode for the specified minecraft keybind name. Copy int code = keybinds.getKeycode(String key); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#getmouseposition) getMousePosition returns the current mouse position in pixels as `[x, y]`. Copy int[] position = keybinds.getMousePosition(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#iskeydown) isKeyDown returns `true` if the specified keycode is held. Copy boolean keyDown = keybinds.isKeyDown(int key); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#ismousedown) isMouseDown returns `true` if the specified mouse button is pressed. use `0` for left, `1` for right, and `2` for middle click. Copy boolean mouseDown = keybinds.isMouseDown(int button); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#ispressed) isPressed returns `true` if the named keybind is currently pressed. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#leftclick) leftClick simulates a left mouse click. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#rightclick) rightClick simulates a right mouse click. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/keybinds#setpressed) setPressed sets the pressed state of a keybind as defined in `options.txt`. [Previousjson](https://daikirai.gitbook.io/scripting/documentation/json) [Nextload string](https://daikirai.gitbook.io/scripting/documentation/loadstring) Last updated 5 months ago * [getKeycode](https://daikirai.gitbook.io/scripting/documentation/keybinds#getkeycode) * [getMousePosition](https://daikirai.gitbook.io/scripting/documentation/keybinds#getmouseposition) * [isKeyDown](https://daikirai.gitbook.io/scripting/documentation/keybinds#iskeydown) * [isMouseDown](https://daikirai.gitbook.io/scripting/documentation/keybinds#ismousedown) * [isPressed](https://daikirai.gitbook.io/scripting/documentation/keybinds#ispressed) * [leftClick](https://daikirai.gitbook.io/scripting/documentation/keybinds#leftclick) * [rightClick](https://daikirai.gitbook.io/scripting/documentation/keybinds#rightclick) * [setPressed](https://daikirai.gitbook.io/scripting/documentation/keybinds#setpressed) Copy boolean pressed = keybinds.isPressed(String key); Copy keybinds.leftClick(); Copy keybinds.rightClick(); Copy keybinds.setPressed(String key, boolean pressed); --- # config | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/config.md) . ### [](https://daikirai.gitbook.io/scripting/documentation/config#get) get returns the value stored for the specified key. Copy String value = config.get(String key); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/config#getdirectory) getDirectory returns the absolute path to the config directory. Copy String path = config.getDirectory(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/config#set) set writes or updates a key-value pair inside the config file. returns `true` on success. Copy boolean saved = config.set(String key, String value); [Previousclient](https://daikirai.gitbook.io/scripting/documentation/client) [Nextentity](https://daikirai.gitbook.io/scripting/documentation/entity) Last updated 5 months ago * [get](https://daikirai.gitbook.io/scripting/documentation/config#get) * [getDirectory](https://daikirai.gitbook.io/scripting/documentation/config#getdirectory) * [set](https://daikirai.gitbook.io/scripting/documentation/config#set) --- # events | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/events.md) . ### [](https://daikirai.gitbook.io/scripting/documentation/events#getrotations) getRotations called when Minecraft sets your yaw and pitch for movement calculations. Copy float[] getRotations(float lastYaw, float lastPitch) * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onanticheatflag) onAntiCheatFlag called when the AntiCheat module flags a player. Copy void onAntiCheatFlag(String flag, Entity entity) * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onchat) onChat called whenever a message is sent in chat, return `false` to cancel. Copy boolean onChat(String msg, int type) * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#ondisable) onDisable called whenever the script is disabled. Copy void onDisable() * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onenable) onEnable called whenever the script is enabled. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onguiupdate) onGuiUpdate called when a GUI updates. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onircmessage) onIRCMessage called when you receive an IRC message, return `false` to cancel printing. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onkey) onKey called when a key is pressed. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onload) onLoad called when the script is loaded. register buttons/sliders here. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onlocraw) onLocRaw calls on `/locraw` (auto-runs on world join), gives raw response as string. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onmouse) onMouse called whenever a button on the mouse is pressed, return `false` to cancel. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onpacketreceived) onPacketReceived called before a packet gets processed by the client, return `false` to cancel. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onpacketsent) onPacketSent called before a packet gets sent to the server, return `false` to cancel. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onpostmotion) onPostMotion called after updates sent to server. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onpostplayerinput) onPostPlayerInput called after the client processes player inputs. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onpremotion) onPreMotion called before player updates are sent to the server. see also: [`playerstate`](https://daikirai.gitbook.io/scripting/documentation/playerstate) for `PlayerState` properties. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onpreupdate) onPreUpdate called at the beginning of every update to the local player. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onrendertick) onRenderTick called every time the HUD renders. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onrenderworld) onRenderWorld called every time the world renders. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/events#onworldjoin) onWorldJoin called whenever an entity spawns in. [Previousimports](https://daikirai.gitbook.io/scripting/documentation/imports) [Nextblock](https://daikirai.gitbook.io/scripting/documentation/block) Last updated 2 months ago * [getRotations](https://daikirai.gitbook.io/scripting/documentation/events#getrotations) * [onAntiCheatFlag](https://daikirai.gitbook.io/scripting/documentation/events#onanticheatflag) * [onChat](https://daikirai.gitbook.io/scripting/documentation/events#onchat) * [onDisable](https://daikirai.gitbook.io/scripting/documentation/events#ondisable) * [onEnable](https://daikirai.gitbook.io/scripting/documentation/events#onenable) * [onGuiUpdate](https://daikirai.gitbook.io/scripting/documentation/events#onguiupdate) * [onIRCMessage](https://daikirai.gitbook.io/scripting/documentation/events#onircmessage) * [onKey](https://daikirai.gitbook.io/scripting/documentation/events#onkey) * [onLoad](https://daikirai.gitbook.io/scripting/documentation/events#onload) * [onLocRaw](https://daikirai.gitbook.io/scripting/documentation/events#onlocraw) * [onMouse](https://daikirai.gitbook.io/scripting/documentation/events#onmouse) * [onPacketReceived](https://daikirai.gitbook.io/scripting/documentation/events#onpacketreceived) * [onPacketSent](https://daikirai.gitbook.io/scripting/documentation/events#onpacketsent) * [onPostMotion](https://daikirai.gitbook.io/scripting/documentation/events#onpostmotion) * [onPostPlayerInput](https://daikirai.gitbook.io/scripting/documentation/events#onpostplayerinput) * [onPreMotion](https://daikirai.gitbook.io/scripting/documentation/events#onpremotion) * [onPreUpdate](https://daikirai.gitbook.io/scripting/documentation/events#onpreupdate) * [onRenderTick](https://daikirai.gitbook.io/scripting/documentation/events#onrendertick) * [onRenderWorld](https://daikirai.gitbook.io/scripting/documentation/events#onrenderworld) * [onWorldJoin](https://daikirai.gitbook.io/scripting/documentation/events#onworldjoin) Copy void onEnable() Copy void onGuiUpdate(String name, boolean opened) Copy boolean onIRCMessage(String message) Copy void onKey(String keyName, int keyCode, boolean state, boolean inGui) Copy void onLoad() Copy void onLocRaw(String locraw) Copy boolean onMouse(int button, boolean state) Copy boolean onPacketReceived(SPacket packet) Copy boolean onPacketSent(CPacket packet) Copy void onPostMotion() Copy void onPostPlayerInput() Copy void onPreMotion(PlayerState state) Copy void onPreUpdate() Copy void onRenderTick(float partialTicks) Copy void onRenderWorld(float partialTicks) Copy void onWorldJoin(Entity entity) --- # network | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/network.md) . assumes variable `networkPlayer` is defined. example: `NetworkPlayer networkPlayer = entity.getNetworkPlayer();` see also: [`entity.getNetworkPlayer()`](https://daikirai.gitbook.io/scripting/documentation/entity#getnetworkplayer) or [`world.getNetworkPlayers()`](https://daikirai.gitbook.io/scripting/documentation/world#getnetworkplayers) ### [](https://daikirai.gitbook.io/scripting/documentation/network#getcape) getCape returns the cape resource path for the player, or `null` when unavailable. Copy String cape = networkPlayer.getCape(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/network#getdisplayname) getDisplayName returns the formatted display name of the player. Copy String displayName = networkPlayer.getDisplayName(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/network#getname) getName returns the unformatted player name. Copy String name = networkPlayer.getName(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/network#getping) getPing returns the ping of the player in milliseconds. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/network#getskindata) getSkinData returns the skin data encoded as a json string, or `null` if missing. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/network#getuuid) getUUID returns the uuid of the player. [Previousmodules](https://daikirai.gitbook.io/scripting/documentation/modules) [Nextpackets](https://daikirai.gitbook.io/scripting/documentation/packets) Last updated 5 months ago * [getCape](https://daikirai.gitbook.io/scripting/documentation/network#getcape) * [getDisplayName](https://daikirai.gitbook.io/scripting/documentation/network#getdisplayname) * [getName](https://daikirai.gitbook.io/scripting/documentation/network#getname) * [getPing](https://daikirai.gitbook.io/scripting/documentation/network#getping) * [getSkinData](https://daikirai.gitbook.io/scripting/documentation/network#getskindata) * [getUUID](https://daikirai.gitbook.io/scripting/documentation/network#getuuid) Copy int ping = networkPlayer.getPing(); Copy String skinData = networkPlayer.getSkinData(); Copy String uuid = networkPlayer.getUUID(); --- # inventory | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/inventory.md) . see also: [`itemstack`](https://daikirai.gitbook.io/scripting/documentation/itemstack) for `ItemStack` properties. ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#click) click clicks a slot in the current container. Copy inventory.click(int slot, int button, int mode); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getbookcontents) getBookContents returns the pages of the currently open book as raw json strings. Copy List pages = inventory.getBookContents(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getchest) getChest returns the chest name when a chest is open, otherwise an empty string. Copy String chestName = inventory.getChest(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getchestsize) getChestSize returns the size of the opened chest inventory, or `0` if no chest is open. Copy int chestSize = inventory.getChestSize(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getcontainer) getContainer returns the simple class name of the currently open container. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getsize) getSize returns the size of the player's inventory. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getslot) getSlot returns the currently selected hotbar slot index. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getstackinchestslot) getStackInChestSlot returns the item in the specified chest slot as an [`ItemStack`](https://daikirai.gitbook.io/scripting/documentation/itemstack) , or `null` when unavailable. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#getstackinslot) getStackInSlot returns the item in the specified player inventory slot as an [`ItemStack`](https://daikirai.gitbook.io/scripting/documentation/itemstack) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#open) open simulates opening the inventory gui. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/inventory#setslot) setSlot sets the currently selected hotbar slot. [Previousimage](https://daikirai.gitbook.io/scripting/documentation/image) [Nextitemstack](https://daikirai.gitbook.io/scripting/documentation/itemstack) Last updated 5 months ago * [click](https://daikirai.gitbook.io/scripting/documentation/inventory#click) * [getBookContents](https://daikirai.gitbook.io/scripting/documentation/inventory#getbookcontents) * [getChest](https://daikirai.gitbook.io/scripting/documentation/inventory#getchest) * [getChestSize](https://daikirai.gitbook.io/scripting/documentation/inventory#getchestsize) * [getContainer](https://daikirai.gitbook.io/scripting/documentation/inventory#getcontainer) * [getSize](https://daikirai.gitbook.io/scripting/documentation/inventory#getsize) * [getSlot](https://daikirai.gitbook.io/scripting/documentation/inventory#getslot) * [getStackInChestSlot](https://daikirai.gitbook.io/scripting/documentation/inventory#getstackinchestslot) * [getStackInSlot](https://daikirai.gitbook.io/scripting/documentation/inventory#getstackinslot) * [open](https://daikirai.gitbook.io/scripting/documentation/inventory#open) * [setSlot](https://daikirai.gitbook.io/scripting/documentation/inventory#setslot) Copy String container = inventory.getContainer(); Copy int size = inventory.getSize(); Copy int slot = inventory.getSlot(); Copy ItemStack item = inventory.getStackInChestSlot(int slot); Copy ItemStack item = inventory.getStackInSlot(int slot); Copy inventory.open(); Copy inventory.setSlot(int slot); --- # gl | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/gl.md) . advanced rendering api - improper use may cause visual glitches. use [`render`](https://daikirai.gitbook.io/scripting/documentation/render) methods when possible. ### [](https://daikirai.gitbook.io/scripting/documentation/gl#alpha) alpha enables or disables alpha testing. Copy gl.alpha(boolean enabled); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#begin) begin starts specifying vertices for a primitive shape. Copy gl.begin(int mode); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#blend) blend enables or disables blending. Copy gl.blend(boolean enabled); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#color) color sets the current drawing color. Copy gl.color(int r, int g, int b, int a); gl.color(double r, double g, double b, double a); gl.color(float r, float g, float b, float a); gl.color(int rgb); gl.resetColor(); // set to white * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#cull) cull enables or disables face culling. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#depth) depth enables or disables depth testing. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#depthmask) depthMask sets whether writing to the depth buffer is enabled. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#disable) disable disables an opengl capability. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#disableitemlighting) disableItemLighting disables standard item lighting. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#enable) enable enables an opengl capability. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#enableitemlighting) enableItemLighting enables standard item lighting. set `gui` to `true` when rendering in guis. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#end) end completes the current vertex specification. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#lighting) lighting enables or disables lighting. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#linesmooth) lineSmooth enables or disables line smoothing. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#linewidth) lineWidth sets the width of lines. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#normal) normal specifies a normal vector for lighting calculations. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#pop) pop pops the current matrix stack. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#push) push pushes the current matrix stack. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#rotate) rotate applies rotation around the specified axis. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#scale) scale scales the current transformation matrix. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#scissor-box) scissor (box) sets the scissor rectangle. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#scissor-toggle) scissor (toggle) enables or disables scissoring. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#texture2d) texture2d enables or disables 2d texturing. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#translate) translate translates the current transformation matrix. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#vertex2) vertex2 specifies a 2d vertex. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/gl#vertex3) vertex3 specifies a 3d vertex. [Previousentity](https://daikirai.gitbook.io/scripting/documentation/entity) [Nextimage](https://daikirai.gitbook.io/scripting/documentation/image) Last updated 3 months ago * [alpha](https://daikirai.gitbook.io/scripting/documentation/gl#alpha) * [begin](https://daikirai.gitbook.io/scripting/documentation/gl#begin) * [blend](https://daikirai.gitbook.io/scripting/documentation/gl#blend) * [color](https://daikirai.gitbook.io/scripting/documentation/gl#color) * [cull](https://daikirai.gitbook.io/scripting/documentation/gl#cull) * [depth](https://daikirai.gitbook.io/scripting/documentation/gl#depth) * [depthMask](https://daikirai.gitbook.io/scripting/documentation/gl#depthmask) * [disable](https://daikirai.gitbook.io/scripting/documentation/gl#disable) * [disableItemLighting](https://daikirai.gitbook.io/scripting/documentation/gl#disableitemlighting) * [enable](https://daikirai.gitbook.io/scripting/documentation/gl#enable) * [enableItemLighting](https://daikirai.gitbook.io/scripting/documentation/gl#enableitemlighting) * [end](https://daikirai.gitbook.io/scripting/documentation/gl#end) * [lighting](https://daikirai.gitbook.io/scripting/documentation/gl#lighting) * [lineSmooth](https://daikirai.gitbook.io/scripting/documentation/gl#linesmooth) * [lineWidth](https://daikirai.gitbook.io/scripting/documentation/gl#linewidth) * [normal](https://daikirai.gitbook.io/scripting/documentation/gl#normal) * [pop](https://daikirai.gitbook.io/scripting/documentation/gl#pop) * [push](https://daikirai.gitbook.io/scripting/documentation/gl#push) * [rotate](https://daikirai.gitbook.io/scripting/documentation/gl#rotate) * [scale](https://daikirai.gitbook.io/scripting/documentation/gl#scale) * [scissor (box)](https://daikirai.gitbook.io/scripting/documentation/gl#scissor-box) * [scissor (toggle)](https://daikirai.gitbook.io/scripting/documentation/gl#scissor-toggle) * [texture2d](https://daikirai.gitbook.io/scripting/documentation/gl#texture2d) * [translate](https://daikirai.gitbook.io/scripting/documentation/gl#translate) * [vertex2](https://daikirai.gitbook.io/scripting/documentation/gl#vertex2) * [vertex3](https://daikirai.gitbook.io/scripting/documentation/gl#vertex3) Copy gl.cull(boolean enabled); Copy gl.depth(boolean enabled); Copy gl.depthMask(boolean enabled); Copy gl.disable(int cap); Copy gl.disableItemLighting(); Copy gl.enable(int cap); Copy gl.enableItemLighting(boolean gui); Copy gl.end(); Copy gl.lighting(boolean enabled); Copy gl.lineSmooth(boolean enabled); Copy gl.lineWidth(double width); gl.lineWidth(float width); Copy gl.normal(double x, double y, double z); gl.normal(float x, float y, float z); Copy gl.pop(); Copy gl.push(); Copy gl.rotate(double angle, double x, double y, double z); gl.rotate(float angle, float x, float y, float z); Copy gl.scale(double x, double y, double z); gl.scale(float x, float y, float z); Copy gl.scissor(int x, int y, int width, int height); Copy gl.scissor(boolean enabled); Copy gl.texture2d(boolean enabled); Copy gl.translate(double x, double y, double z); gl.translate(float x, float y, float z); Copy gl.vertex2(double x, double y); gl.vertex2(float x, float y); Copy gl.vertex3(double x, double y, double z); gl.vertex3(float x, float y, float z); --- # json | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/json.md) . [](https://daikirai.gitbook.io/scripting/documentation/json#json) Json --------------------------------------------------------------------------- `Json` represents parsed json data. see sections below for available helpers. ### [](https://daikirai.gitbook.io/scripting/documentation/json#constructor) constructor creates a new json object from a string. Copy Json json = new Json(String contents); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#object) object returns the json object itself or a named member as a new `Json` instance. Copy Json obj = json.object(); Json member = json.object(String memberName); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#array) array returns the json array or a named member as a list of `Json` objects. Copy List array = json.array(); List memberArray = json.array(String memberName); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#map) map returns a map of object members to `Json` values. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#get) get returns the string value of a member, optionally providing a default. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#exists) exists returns `true` if the json value is not null. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#equals) equals compares two json values for equality. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/json#string) string returns the json value as a string. non-primitive values are serialized. [Previousitemstack](https://daikirai.gitbook.io/scripting/documentation/itemstack) [Nextkeybinds](https://daikirai.gitbook.io/scripting/documentation/keybinds) Last updated 5 months ago * [Json](https://daikirai.gitbook.io/scripting/documentation/json#json) * [constructor](https://daikirai.gitbook.io/scripting/documentation/json#constructor) * [object](https://daikirai.gitbook.io/scripting/documentation/json#object) * [array](https://daikirai.gitbook.io/scripting/documentation/json#array) * [map](https://daikirai.gitbook.io/scripting/documentation/json#map) * [get](https://daikirai.gitbook.io/scripting/documentation/json#get) * [exists](https://daikirai.gitbook.io/scripting/documentation/json#exists) * [equals](https://daikirai.gitbook.io/scripting/documentation/json#equals) * [string](https://daikirai.gitbook.io/scripting/documentation/json#string) Copy Map members = json.map(); Copy String value = json.get(String memberName); String valueOrDefault = json.get(String memberName, String defaultValue); Copy boolean exists = json.exists(); Copy boolean same = json.equals(Json other); Copy String contents = json.string(); --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/guide/setup.md). # setup ### Installing the Java Development Kit {% hint style="warning" %} You must install the Java Development Kit to create and use scripts! A Java Runtime Environment (JRE) can run Java applications but does not include the tools required to compile Java scripts. To compile Java scripts you need a \*\*Java Development Kit (JDK)\*\*. {% endhint %} You may install the Adoptium Java 8 JDK \[here\](https://adoptium.net/en-GB/temurin/releases?version=8\\&os=any\\&arch=any). \*\*\* ### Setting the Java executable {% hint style="info" %} On Windows, the Java executable is typically located at either: \`C:\\Program Files\\Java\\jdk\` \`\` \`\\bin\\javaw.exe\` \`C:\\Program Files\\Eclipse Adoptium\\jdk\` \`\` \`\\bin\\javaw.exe\` {% endhint %} To configure the Java executable in the default Minecraft Launcher, follow these steps: {% stepper %} {% step %} #### Open Installations Navigate to the "Installations" tab in the launcher interface. {% endstep %} {% step %} #### Select a profile Locate the launch profile for which you want to set the Java executable. {% endstep %} {% step %} #### Edit the profile On the right-hand side of the launch profile, click the button faced with three dots and select "Edit" from the drop-down menu. {% endstep %} {% step %} #### Show more options Click on "More Options" to expand it and reveal additional settings. {% endstep %} {% step %} #### Set Java executable Locate the field labelled "Java executable" within the "More Options" section and paste the path of \`javaw.exe\` corresponding to your Java installation into the field. {% endstep %} {% endstepper %} \*\*\* ### Creating Scripts \* Raven scripts are coded in Java, which means your code must be in a \`.java\` file. \* The recommended approach is to utilise a code editor, such as Brackets or Visual Studio Code. \* All scripts must be in the scripts folder in order to be used. If the file name begins with an underscore, it will not be recognised as a valid script file. \*\*\* ### Using Scripts \* The GUI has a category labelled \*\*Scripts\*\*. All scripts in your scripts folder will be displayed here. \* To add scripts, click \*\*Open Folder\*\* within the Manager module and drag your scripts into the folder. \* Whenever you introduce a new script or make modifications to an existing one, press the \*\*Load Scripts\*\* button to apply the changes. \* If there is an error within a script, it will appear in red and cannot be enabled. An error message will be displayed in the chat window with details about the encountered issue. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/guide/setup.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # client | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/client.md) . see also: [`entity`](https://daikirai.gitbook.io/scripting/documentation/entity) for entity-specific methods and [`world`](https://daikirai.gitbook.io/scripting/documentation/world) for world data. ### [](https://daikirai.gitbook.io/scripting/documentation/client#addenemy) addEnemy adds the specified player to the enemy list. Copy client.addEnemy(String username); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#addfriend) addFriend adds the specified player to the friend list. Copy client.addFriend(String username); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#allowediting) allowEditing returns `true` if the player may edit blocks. Copy boolean allowEditing = client.allowEditing(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#allowflying) allowFlying returns `true` if the player has the ability to fly. Copy boolean allowFlying = client.allowFlying(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#attack) attack performs an attack on the specified [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#async) async runs the provided task on a cached background thread. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#canseeentity) canSeeEntity returns `true` if the player has line of sight to the entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#chat) chat sends a chat message as the local player. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#closescreen) closeScreen closes the currently open gui. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#dropitem) dropItem drops the currently held item. set `stack` to `true` to drop the entire stack. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getdisplaysize) getDisplaySize returns `[width, height, scaleFactor]` for the scaled window. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getdirection) getDirection returns the movement direction string calculated by the client. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getforward) getForward returns the forward movement input value. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getfps) getFPS returns the current frames per second. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getfreememory) getFreeMemory returns the amount of free jvm memory in bytes. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getmaxmemory) getMaxMemory returns the maximum jvm memory allocation in bytes. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getmotion) getMotion returns the local player's motion vector as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getplayer) getPlayer returns the local player as an [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getrenderarmpitch) getRenderArmPitch returns the render arm pitch angle. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getrotations) getRotations returns `[yaw, pitch]` required to aim at a position. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getrotationstoblock) getRotationsToBlock returns `[yaw, pitch]` needed to aim at a block. provide a face or omit to use the default face. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getrotationstoentity) getRotationsToEntity returns `[yaw, pitch]` needed to aim at an entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getscreen) getScreen returns the simple class name of the currently open gui, or an empty string when no gui is open. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getserverdirection) getServerDirection returns the server-reported movement direction using a [`PlayerState`](https://daikirai.gitbook.io/scripting/documentation/playerstate) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getserverip) getServerIP returns the connected server ip, or an empty string in singleplayer. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getstrafe) getStrafe returns the strafe movement input value. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#gettotalmemory) getTotalMemory returns the total jvm memory in bytes currently allocated. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getuid) getUID returns the raven user id. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#getuser) getUser returns the raven username. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#isdiagonal) isDiagonal returns `true` if the player is moving diagonally. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#isenemy) isEnemy returns `true` if the specified name is on the enemy list. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#isfacingdiagonal) isFacingDiagonal returns `true` if the player is facing diagonally. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#isflying) isFlying returns `true` if the player is currently flying. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#isfriend) isFriend returns `true` if the specified name is on the friend list. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#isjump) isJump returns `true` if the jump input is active. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#ismoving) isMoving returns `true` if either forward or strafe input is active. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#issingleplayer) isSingleplayer returns `true` when running in a singleplayer world. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#issneak) isSneak returns `true` if the sneak input is active. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#iscreative) isCreative returns `true` if the player is in creative mode. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#jump) jump makes the player jump. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#log) log logs a value to `latest.log`. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#multiplymotion) multiplyMotion multiplies horizontal motion by the supplied factor. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#ping) ping sends a ping request to the server. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#placeblock) placeBlock attempts to place a block using the specified hit data. returns `true` on success. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#playsound) playSound plays a sound at the player position. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#print) print prints a chat message without the raven prefix. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#processpacket) processPacket processes an incoming server packet immediately. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#raycastblock) raycastBlock performs a block raycast and returns `[Vec3 blockPos, Vec3 hitOffset, String side]`, or `null` if nothing is hit. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#raycastentity) raycastEntity performs an entity raycast and returns `[Entity target, Vec3 hitOffset, double distanceSq]`, or `null` if nothing is hit. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#removeenemy) removeEnemy removes the specified name from the enemy list. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#removefriend) removeFriend removes the specified name from the friend list. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#removepotioneffect) removePotionEffect removes the specified potion effect from the player. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#runcommand) runCommand runs a raven client command. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#sendpacket) sendPacket sends a client packet and posts events. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#sendpacketnoevent) sendPacketNoEvent sends a client packet without triggering events. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setflying) setFlying enables or disables flying for the player. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setforward) setForward sets the forward movement input value, only works [`onPostPlayerInput`](https://daikirai.gitbook.io/scripting/documentation/events#onpostplayerinput) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setjump) setJump sets the jump input state, only works [`onPostPlayerInput`](https://daikirai.gitbook.io/scripting/documentation/events#onpostplayerinput) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setmotion) setMotion sets the player motion using a vector or explicit components. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setrenderarmpitch) setRenderArmPitch sets the render arm pitch. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setsneak) setSneak sets the sneak input state, only works [`onPostPlayerInput`](https://daikirai.gitbook.io/scripting/documentation/events#onpostplayerinput) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setspeed) setSpeed sets the horizontal speed value used by movement utilities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setspeedforward) setSpeedForward sets the forward speed value used by movement utilities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setsprinting) setSprinting sets the sprinting state. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#setstrafe) setStrafe sets the strafe movement input value, only works [`onPostPlayerInput`](https://daikirai.gitbook.io/scripting/documentation/events#onpostplayerinput) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#settimer) setTimer adjusts the client timer speed. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#sleep) sleep sleeps the current thread for the specified milliseconds. returns `true` if uninterrupted. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#swing) swing swings the held item. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#swingreset) swingReset swings the held item and resets the equipped animation. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#time) time returns the current system time in milliseconds. use in place of `System.currentTimeMillis()`. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/client#timetag) timeTag returns truncated millisecond timestamp for lightweight debugging. [Previousbridge](https://daikirai.gitbook.io/scripting/documentation/bridge) [Nextconfig](https://daikirai.gitbook.io/scripting/documentation/config) Last updated 2 months ago * [addEnemy](https://daikirai.gitbook.io/scripting/documentation/client#addenemy) * [addFriend](https://daikirai.gitbook.io/scripting/documentation/client#addfriend) * [allowEditing](https://daikirai.gitbook.io/scripting/documentation/client#allowediting) * [allowFlying](https://daikirai.gitbook.io/scripting/documentation/client#allowflying) * [attack](https://daikirai.gitbook.io/scripting/documentation/client#attack) * [async](https://daikirai.gitbook.io/scripting/documentation/client#async) * [canSeeEntity](https://daikirai.gitbook.io/scripting/documentation/client#canseeentity) * [chat](https://daikirai.gitbook.io/scripting/documentation/client#chat) * [closeScreen](https://daikirai.gitbook.io/scripting/documentation/client#closescreen) * [dropItem](https://daikirai.gitbook.io/scripting/documentation/client#dropitem) * [getDisplaySize](https://daikirai.gitbook.io/scripting/documentation/client#getdisplaysize) * [getDirection](https://daikirai.gitbook.io/scripting/documentation/client#getdirection) * [getForward](https://daikirai.gitbook.io/scripting/documentation/client#getforward) * [getFPS](https://daikirai.gitbook.io/scripting/documentation/client#getfps) * [getFreeMemory](https://daikirai.gitbook.io/scripting/documentation/client#getfreememory) * [getMaxMemory](https://daikirai.gitbook.io/scripting/documentation/client#getmaxmemory) * [getMotion](https://daikirai.gitbook.io/scripting/documentation/client#getmotion) * [getPlayer](https://daikirai.gitbook.io/scripting/documentation/client#getplayer) * [getRenderArmPitch](https://daikirai.gitbook.io/scripting/documentation/client#getrenderarmpitch) * [getRotations](https://daikirai.gitbook.io/scripting/documentation/client#getrotations) * [getRotationsToBlock](https://daikirai.gitbook.io/scripting/documentation/client#getrotationstoblock) * [getRotationsToEntity](https://daikirai.gitbook.io/scripting/documentation/client#getrotationstoentity) * [getScreen](https://daikirai.gitbook.io/scripting/documentation/client#getscreen) * [getServerDirection](https://daikirai.gitbook.io/scripting/documentation/client#getserverdirection) * [getServerIP](https://daikirai.gitbook.io/scripting/documentation/client#getserverip) * [getStrafe](https://daikirai.gitbook.io/scripting/documentation/client#getstrafe) * [getTotalMemory](https://daikirai.gitbook.io/scripting/documentation/client#gettotalmemory) * [getUID](https://daikirai.gitbook.io/scripting/documentation/client#getuid) * [getUser](https://daikirai.gitbook.io/scripting/documentation/client#getuser) * [isDiagonal](https://daikirai.gitbook.io/scripting/documentation/client#isdiagonal) * [isEnemy](https://daikirai.gitbook.io/scripting/documentation/client#isenemy) * [isFacingDiagonal](https://daikirai.gitbook.io/scripting/documentation/client#isfacingdiagonal) * [isFlying](https://daikirai.gitbook.io/scripting/documentation/client#isflying) * [isFriend](https://daikirai.gitbook.io/scripting/documentation/client#isfriend) * [isJump](https://daikirai.gitbook.io/scripting/documentation/client#isjump) * [isMoving](https://daikirai.gitbook.io/scripting/documentation/client#ismoving) * [isSingleplayer](https://daikirai.gitbook.io/scripting/documentation/client#issingleplayer) * [isSneak](https://daikirai.gitbook.io/scripting/documentation/client#issneak) * [isCreative](https://daikirai.gitbook.io/scripting/documentation/client#iscreative) * [jump](https://daikirai.gitbook.io/scripting/documentation/client#jump) * [log](https://daikirai.gitbook.io/scripting/documentation/client#log) * [multiplyMotion](https://daikirai.gitbook.io/scripting/documentation/client#multiplymotion) * [ping](https://daikirai.gitbook.io/scripting/documentation/client#ping) * [placeBlock](https://daikirai.gitbook.io/scripting/documentation/client#placeblock) * [playSound](https://daikirai.gitbook.io/scripting/documentation/client#playsound) * [print](https://daikirai.gitbook.io/scripting/documentation/client#print) * [processPacket](https://daikirai.gitbook.io/scripting/documentation/client#processpacket) * [raycastBlock](https://daikirai.gitbook.io/scripting/documentation/client#raycastblock) * [raycastEntity](https://daikirai.gitbook.io/scripting/documentation/client#raycastentity) * [removeEnemy](https://daikirai.gitbook.io/scripting/documentation/client#removeenemy) * [removeFriend](https://daikirai.gitbook.io/scripting/documentation/client#removefriend) * [removePotionEffect](https://daikirai.gitbook.io/scripting/documentation/client#removepotioneffect) * [runCommand](https://daikirai.gitbook.io/scripting/documentation/client#runcommand) * [sendPacket](https://daikirai.gitbook.io/scripting/documentation/client#sendpacket) * [sendPacketNoEvent](https://daikirai.gitbook.io/scripting/documentation/client#sendpacketnoevent) * [setFlying](https://daikirai.gitbook.io/scripting/documentation/client#setflying) * [setForward](https://daikirai.gitbook.io/scripting/documentation/client#setforward) * [setJump](https://daikirai.gitbook.io/scripting/documentation/client#setjump) * [setMotion](https://daikirai.gitbook.io/scripting/documentation/client#setmotion) * [setRenderArmPitch](https://daikirai.gitbook.io/scripting/documentation/client#setrenderarmpitch) * [setSneak](https://daikirai.gitbook.io/scripting/documentation/client#setsneak) * [setSpeed](https://daikirai.gitbook.io/scripting/documentation/client#setspeed) * [setSpeedForward](https://daikirai.gitbook.io/scripting/documentation/client#setspeedforward) * [setSprinting](https://daikirai.gitbook.io/scripting/documentation/client#setsprinting) * [setStrafe](https://daikirai.gitbook.io/scripting/documentation/client#setstrafe) * [setTimer](https://daikirai.gitbook.io/scripting/documentation/client#settimer) * [sleep](https://daikirai.gitbook.io/scripting/documentation/client#sleep) * [swing](https://daikirai.gitbook.io/scripting/documentation/client#swing) * [swingReset](https://daikirai.gitbook.io/scripting/documentation/client#swingreset) * [time](https://daikirai.gitbook.io/scripting/documentation/client#time) * [timeTag](https://daikirai.gitbook.io/scripting/documentation/client#timetag) Copy client.attack(Entity entity); Copy client.async(() -> { // background work }); Copy boolean visible = client.canSeeEntity(Entity entity); Copy client.chat(String message); Copy client.closeScreen(); Copy client.dropItem(boolean stack); Copy int[] display = client.getDisplaySize(); Copy String direction = client.getDirection(); Copy float forward = client.getForward(); Copy int fps = client.getFPS(); Copy long freeMemory = client.getFreeMemory(); Copy long maxMemory = client.getMaxMemory(); Copy Vec3 motion = client.getMotion(); Copy Entity player = client.getPlayer(); Copy float pitch = client.getRenderArmPitch(); Copy float[] rotations = client.getRotations(Vec3 position); Copy float[] rotations = client.getRotationsToBlock(Vec3 position, String face); float[] rotationsDefault = client.getRotationsToBlock(Vec3 position); Copy float[] rotations = client.getRotationsToEntity(Entity entity); Copy String screen = client.getScreen(); Copy String direction = client.getServerDirection(PlayerState state); Copy String serverIP = client.getServerIP(); Copy float strafe = client.getStrafe(); Copy long totalMemory = client.getTotalMemory(); Copy int uid = client.getUID(); Copy String user = client.getUser(); Copy boolean diagonal = client.isDiagonal(); Copy boolean enemy = client.isEnemy(String username); Copy boolean facing = client.isFacingDiagonal(); Copy boolean flying = client.isFlying(); Copy boolean friend = client.isFriend(String username); Copy boolean jumping = client.isJump(); Copy boolean moving = client.isMoving(); Copy boolean singleplayer = client.isSingleplayer(); Copy boolean sneaking = client.isSneak(); Copy boolean creative = client.isCreative(); Copy client.jump(); Copy client.log(Object value); Copy client.multiplyMotion(double factor); Copy client.ping(); Copy boolean placed = client.placeBlock(Vec3 blockPos, String side, Vec3 hitOffset); Copy client.playSound(String name, float volume, float pitch); Copy client.print(Object value); Copy client.processPacket(SPacket packet); Copy Object[] hit = client.raycastBlock(double distance); Object[] hitCustom = client.raycastBlock(double distance, float yaw, float pitch); Copy Object[] result = client.raycastEntity(double distance); Object[] resultCustom = client.raycastEntity(double distance, float yaw, float pitch); Copy client.removeEnemy(String username); Copy client.removeFriend(String username); Copy client.removePotionEffect(int potionId); Copy boolean success = client.runCommand(String command); Copy client.sendPacket(CPacket packet); Copy client.sendPacketNoEvent(CPacket packet); Copy client.setFlying(boolean flying); Copy client.setForward(float value); Copy client.setJump(boolean jumping); Copy client.setMotion(Vec3 motion); client.setMotion(double x, double y, double z); Copy client.setRenderArmPitch(float pitch); Copy client.setSneak(boolean sneaking); Copy client.setSpeed(double speed); Copy client.setSpeedForward(double speed); Copy client.setSprinting(boolean sprinting); Copy client.setStrafe(float value); Copy client.setTimer(double timer); Copy boolean ok = client.sleep(long milliseconds); Copy client.swing(); Copy client.swingReset(); Copy long ms = client.time(); Copy int tag = client.timeTag(); --- # load string | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/loadstring.md) . Must be outside of a function in the following format on a separate line. Copy load - "URL" * * * ### [](https://daikirai.gitbook.io/scripting/documentation/loadstring#example) Example Here is an example script hosted on [Pastebin](https://pastebin.com/93hWSJeN) : Copy void onEnable() { client.print("enabled script!"); } You can load it using the Pastebin raw link: Copy load - "https://pastebin.com/raw/93hWSJeN" Alternatively, load from a local directory: Copy load - "file:///C:/Users/user/Desktop/script.txt" [Previouskeybinds](https://daikirai.gitbook.io/scripting/documentation/keybinds) [Nextmodules](https://daikirai.gitbook.io/scripting/documentation/modules) Last updated 4 months ago --- # packets | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/packets.md) . packets must be cast to their specific type to access their properties. example: `C03 c03 = (C03) packet;` [](https://daikirai.gitbook.io/scripting/documentation/packets#client-packets) client packets -------------------------------------------------------------------------------------------------- ### [](https://daikirai.gitbook.io/scripting/documentation/packets#cpacket) CPacket base wrapper for outbound packets. property type description name `String` simple packet class name * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c0a-animation) C0A (animation) Copy new C0A(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c0b-entity-action) C0B (entity action) Copy new C0B(String action, int horsePower); property type description action `String` entity action name horsepower `int` horse jump power * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c0d-close-window) C0D (close window) property type windowId `int` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c0e-click-window) C0E (click window) property type description windowId `int` window id slot `int` inventory slot button `int` mouse button mode `int` click mode action `short` transaction id itemStack `ItemStack` clicked stack * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c0f-confirm-transaction) C0F (confirm transaction) property type windowId `int` uid `short` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c01-chat-message) C01 (chat message) property type message `String` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c02-use-entity) C02 (use entity) property type description entity `Entity` target entity action `String` ATTACK / INTERACT / INTERACT\_AT hitVec `Vec3` hit vector (may be `null`) * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c03-player) C03 (player) property type description position `Vec3` player position yaw `float` yaw angle pitch `float` pitch angle ground `boolean` on ground flag moving `boolean` whether position is included rotating `boolean` whether rotation is included * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c07-player-digging) C07 (player digging) property type position `Vec3` status `String` facing `String` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c08-block-placement) C08 (block placement) property type description itemStack `ItemStack` held item position `Vec3` block position direction `int` placed block face offset `Vec3` hit offset * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c09-held-item-change) C09 (held item change) property type slot `int` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c10-creative-inventory-action) C10 (creative inventory action) property type slot `int` itemStack `ItemStack` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c13-player-abilities) C13 (player abilities) property type invulnerable `boolean` flying `boolean` allowFlying `boolean` creativeMode `boolean` flySpeed `float` walkSpeed `float` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#c16-client-status) C16 (client status) property type status `String` * * * [](https://daikirai.gitbook.io/scripting/documentation/packets#server-packets) server packets -------------------------------------------------------------------------------------------------- ### [](https://daikirai.gitbook.io/scripting/documentation/packets#spacket) SPacket base wrapper for inbound packets. property type description name `String` simple packet class name * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s06-update-health) S06 (update health) property type health `float` saturation `float` food `int` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s08-player-position-and-look) S08 (player position and look) property type position `Vec3` yaw `float` pitch `float` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s09-held-item-change) S09 (held item change) property type slot `int` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s12-entity-velocity) S12 (entity velocity) property type entityId `int` motion `Vec3` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s23-block-change) S23 (block change) property type position `Vec3` block `Block` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s27-explosion) S27 (explosion) property type strength `float` position `Vec3` motion `Vec3` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s29-sound-effect) S29 (sound effect) property type sound `String` position `Vec3` volume `float` pitch `float` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s2a-particles) S2A (particles) property type type `String` position `Vec3` offset `Vec3` speed `float` count `int` args `int[]` * * * ### [](https://daikirai.gitbook.io/scripting/documentation/packets#s3e-teams) S3E (teams) property type name `String` displayName `String` prefix `String` suffix `String` nametagVisibility `String` playerList `Collection` action `int` friendlyFlags `int` color `int` [Previousnetwork](https://daikirai.gitbook.io/scripting/documentation/network) [Nextplayerstate](https://daikirai.gitbook.io/scripting/documentation/playerstate) Last updated 3 months ago * [client packets](https://daikirai.gitbook.io/scripting/documentation/packets#client-packets) * [CPacket](https://daikirai.gitbook.io/scripting/documentation/packets#cpacket) * [C0A (animation)](https://daikirai.gitbook.io/scripting/documentation/packets#c0a-animation) * [C0B (entity action)](https://daikirai.gitbook.io/scripting/documentation/packets#c0b-entity-action) * [C0D (close window)](https://daikirai.gitbook.io/scripting/documentation/packets#c0d-close-window) * [C0E (click window)](https://daikirai.gitbook.io/scripting/documentation/packets#c0e-click-window) * [C0F (confirm transaction)](https://daikirai.gitbook.io/scripting/documentation/packets#c0f-confirm-transaction) * [C01 (chat message)](https://daikirai.gitbook.io/scripting/documentation/packets#c01-chat-message) * [C02 (use entity)](https://daikirai.gitbook.io/scripting/documentation/packets#c02-use-entity) * [C03 (player)](https://daikirai.gitbook.io/scripting/documentation/packets#c03-player) * [C07 (player digging)](https://daikirai.gitbook.io/scripting/documentation/packets#c07-player-digging) * [C08 (block placement)](https://daikirai.gitbook.io/scripting/documentation/packets#c08-block-placement) * [C09 (held item change)](https://daikirai.gitbook.io/scripting/documentation/packets#c09-held-item-change) * [C10 (creative inventory action)](https://daikirai.gitbook.io/scripting/documentation/packets#c10-creative-inventory-action) * [C13 (player abilities)](https://daikirai.gitbook.io/scripting/documentation/packets#c13-player-abilities) * [C16 (client status)](https://daikirai.gitbook.io/scripting/documentation/packets#c16-client-status) * [server packets](https://daikirai.gitbook.io/scripting/documentation/packets#server-packets) * [SPacket](https://daikirai.gitbook.io/scripting/documentation/packets#spacket) * [S06 (update health)](https://daikirai.gitbook.io/scripting/documentation/packets#s06-update-health) * [S08 (player position and look)](https://daikirai.gitbook.io/scripting/documentation/packets#s08-player-position-and-look) * [S09 (held item change)](https://daikirai.gitbook.io/scripting/documentation/packets#s09-held-item-change) * [S12 (entity velocity)](https://daikirai.gitbook.io/scripting/documentation/packets#s12-entity-velocity) * [S23 (block change)](https://daikirai.gitbook.io/scripting/documentation/packets#s23-block-change) * [S27 (explosion)](https://daikirai.gitbook.io/scripting/documentation/packets#s27-explosion) * [S29 (sound effect)](https://daikirai.gitbook.io/scripting/documentation/packets#s29-sound-effect) * [S2A (particles)](https://daikirai.gitbook.io/scripting/documentation/packets#s2a-particles) * [S3E (teams)](https://daikirai.gitbook.io/scripting/documentation/packets#s3e-teams) Copy new C0D(int windowId); Copy new C0E(int windowId, int slot, int button, int mode, ItemStack itemStack); Copy new C0F(int windowId, short uid); Copy new C01(String message); Copy new C02(Entity entity, String action, Vec3 hitVec); Copy new C03(boolean onGround); // (onGround only) new C03(Vec3 position, boolean onGround); // C04 (pos) new C03(float yaw, float pitch, boolean onGround); // C05 (look) new C03(Vec3 position, float yaw, float pitch, boolean onGround); // C06 (pos + look) Copy new C07(Vec3 position, String status, String facing); Copy new C08(ItemStack itemStack); new C08(ItemStack itemStack, Vec3 position, int direction, Vec3 offset); Copy new C09(int slot); Copy new C10(int slot, ItemStack itemStack); Copy new C13(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flySpeed, float walkSpeed); Copy new C16(String status); --- # tile entity | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/tile-entity.md) . assumes variable `tileEntity` is defined. example: `List tileEntities = world.getTileEntities();` see also: [`world.getTileEntities()`](https://daikirai.gitbook.io/scripting/documentation/world#gettileentities) [](https://daikirai.gitbook.io/scripting/documentation/tile-entity#properties) properties ---------------------------------------------------------------------------------------------- property type description name `String` registry name of the block type `String` simple class name of the block * * * ### [](https://daikirai.gitbook.io/scripting/documentation/tile-entity#getposition) getPosition returns the tile entity position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) . Copy Vec3 position = tileEntity.getPosition(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/tile-entity#getskulldata) getSkullData returns skull metadata when the tile entity is a skull. the array contains `[type, rotation, name, uuid]`. Copy Object[] skullData = tileEntity.getSkullData(); [Previousresponse](https://daikirai.gitbook.io/scripting/documentation/response) [Nextutil](https://daikirai.gitbook.io/scripting/documentation/util) Last updated 5 months ago * [properties](https://daikirai.gitbook.io/scripting/documentation/tile-entity#properties) * [getPosition](https://daikirai.gitbook.io/scripting/documentation/tile-entity#getposition) * [getSkullData](https://daikirai.gitbook.io/scripting/documentation/tile-entity#getskulldata) --- # response | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/response.md) . see also: [`request`](https://daikirai.gitbook.io/scripting/documentation/request) for more usages. [](https://daikirai.gitbook.io/scripting/documentation/response#response) Response --------------------------------------------------------------------------------------- `Response` represents the result of an http request with status code and content. ### [](https://daikirai.gitbook.io/scripting/documentation/response#code) code returns the http status code of the response. Copy int code = response.code(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/response#string) string returns the response body as a string. Copy String body = response.string(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/response#json) json returns the response body parsed as a Json object. Copy Json json = response.json(); [Previousrequest](https://daikirai.gitbook.io/scripting/documentation/request) [Nexttile entity](https://daikirai.gitbook.io/scripting/documentation/tile-entity) Last updated 5 months ago * [Response](https://daikirai.gitbook.io/scripting/documentation/response#response) * [code](https://daikirai.gitbook.io/scripting/documentation/response#code) * [string](https://daikirai.gitbook.io/scripting/documentation/response#string) * [json](https://daikirai.gitbook.io/scripting/documentation/response#json) --- # util | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/util.md) . ### [](https://daikirai.gitbook.io/scripting/documentation/util#color) color replaces `&` color codes with the minecraft color symbol. Copy String colored = util.color(String text); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#colorsymbol) colorSymbol minecraft unicode character for color codes. Copy String colorSymbol = util.colorSymbol; * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#decodeb64) decodeb64 decode base 64 encoded text. Copy String decoded = util.decodeb64(String b64); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#encodeb64) encodeb64 encode text into base 64. Copy String encoded = util.encodeb64(String text); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#randomdouble) randomDouble returns a random `double` within the inclusive range. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#randomint) randomInt returns a random `int` within the inclusive range. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#round) round rounds a double to the specified number of decimal places. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/util#strip) strip removes minecraft color codes from a string. [Previoustile entity](https://daikirai.gitbook.io/scripting/documentation/tile-entity) [Nextvec3](https://daikirai.gitbook.io/scripting/documentation/vec3) Last updated 3 months ago * [color](https://daikirai.gitbook.io/scripting/documentation/util#color) * [colorSymbol](https://daikirai.gitbook.io/scripting/documentation/util#colorsymbol) * [decodeb64](https://daikirai.gitbook.io/scripting/documentation/util#decodeb64) * [encodeb64](https://daikirai.gitbook.io/scripting/documentation/util#encodeb64) * [randomDouble](https://daikirai.gitbook.io/scripting/documentation/util#randomdouble) * [randomInt](https://daikirai.gitbook.io/scripting/documentation/util#randomint) * [round](https://daikirai.gitbook.io/scripting/documentation/util#round) * [strip](https://daikirai.gitbook.io/scripting/documentation/util#strip) Copy double random = util.randomDouble(double min, double max); Copy int random = util.randomInt(int min, int max); Copy double rounded = util.round(double value, int decimals); Copy String plain = util.strip(String text); --- # playerstate | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/playerstate.md) . [](https://daikirai.gitbook.io/scripting/documentation/playerstate#playerstate) PlayerState ------------------------------------------------------------------------------------------------ `PlayerState` represents a player's position, rotation, and movement state. property type description x `double` x coordinate y `double` y coordinate z `double` z coordinate yaw `float` yaw rotation pitch `float` pitch rotation onGround `boolean` whether the player is on ground isSprinting `boolean` whether the player is sprinting isSneaking `boolean` whether the player is sneaking ### [](https://daikirai.gitbook.io/scripting/documentation/playerstate#constructor) constructor creates a new player state with individual parameters. Copy PlayerState state = new PlayerState(double x, double y, double z, float yaw, float pitch, boolean onGround, boolean sprinting, boolean sneaking); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/playerstate#constructor-1) constructor creates a new player state from an array of data. Copy PlayerState state = new PlayerState(Object[] data); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/playerstate#asarray) asArray returns the player state data as an object array. [Previouspackets](https://daikirai.gitbook.io/scripting/documentation/packets) [Nextrender](https://daikirai.gitbook.io/scripting/documentation/render) Last updated 5 months ago * [PlayerState](https://daikirai.gitbook.io/scripting/documentation/playerstate#playerstate) * [constructor](https://daikirai.gitbook.io/scripting/documentation/playerstate#constructor) * [constructor](https://daikirai.gitbook.io/scripting/documentation/playerstate#constructor-1) * [asArray](https://daikirai.gitbook.io/scripting/documentation/playerstate#asarray) Copy Object[] data = state.asArray(); --- # request | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/request.md) . [](https://daikirai.gitbook.io/scripting/documentation/request#request) Request ------------------------------------------------------------------------------------ `Request` represents an http request with methods, headers, and content. ### [](https://daikirai.gitbook.io/scripting/documentation/request#constructor) constructor creates a new request to a specified url. supported methods: `GET`, `POST`. Copy Request request = new Request(String method, String url); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/request#addheader) addHeader adds a header to the request. Copy request.addHeader(String header, String value); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/request#setuseragent) setUserAgent sets the user-agent header for the request. Copy request.setUserAgent(String userAgent); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/request#setconnecttimeout) setConnectTimeout sets the connection timeout in milliseconds. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/request#setreadtimeout) setReadTimeout sets the read timeout in milliseconds. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/request#setcontent) setContent sets the content to be sent with a post request. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/request#fetch) fetch executes the request and returns a [`Response`](https://daikirai.gitbook.io/scripting/documentation/response) . [Previousrender](https://daikirai.gitbook.io/scripting/documentation/render) [Nextresponse](https://daikirai.gitbook.io/scripting/documentation/response) Last updated 5 months ago * [Request](https://daikirai.gitbook.io/scripting/documentation/request#request) * [constructor](https://daikirai.gitbook.io/scripting/documentation/request#constructor) * [addHeader](https://daikirai.gitbook.io/scripting/documentation/request#addheader) * [setUserAgent](https://daikirai.gitbook.io/scripting/documentation/request#setuseragent) * [setConnectTimeout](https://daikirai.gitbook.io/scripting/documentation/request#setconnecttimeout) * [setReadTimeout](https://daikirai.gitbook.io/scripting/documentation/request#setreadtimeout) * [setContent](https://daikirai.gitbook.io/scripting/documentation/request#setcontent) * [fetch](https://daikirai.gitbook.io/scripting/documentation/request#fetch) Copy request.setConnectTimeout(int timeout); Copy request.setReadTimeout(int timeout); Copy request.setContent(String content); Copy Response response = request.fetch(); --- # vec3 | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/vec3.md) . [](https://daikirai.gitbook.io/scripting/documentation/vec3#vec3) Vec3 --------------------------------------------------------------------------- `Vec3` represents a 3d vector with x, y, and z coordinates for position calculations. property type description x `double` x coordinate y `double` y coordinate z `double` z coordinate ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#ceil) ceil returns a new vector with coordinates rounded up. Copy Vec3 ceiled = position.ceil(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#equals) equals compares two vectors for equality. Copy boolean equal = position.equals(Vec3 other); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#floor) floor returns a new vector with coordinates rounded down. Copy Vec3 floored = position.floor(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#inverse) inverse returns a new vector with negated coordinates. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#offset) offset returns a new vector offset by another vector. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#offset-1) offset returns a new vector offset by values. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#translate) translate returns current vector translated by another vector. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#translate-1) translate returns current vector translated by values. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#distanceto) distanceTo returns the distance to another vector. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/vec3#distancetosq) distanceToSq returns the squared distance to another vector. [Previousutil](https://daikirai.gitbook.io/scripting/documentation/util) [Nextworld](https://daikirai.gitbook.io/scripting/documentation/world) Last updated 4 months ago * [Vec3](https://daikirai.gitbook.io/scripting/documentation/vec3#vec3) * [ceil](https://daikirai.gitbook.io/scripting/documentation/vec3#ceil) * [equals](https://daikirai.gitbook.io/scripting/documentation/vec3#equals) * [floor](https://daikirai.gitbook.io/scripting/documentation/vec3#floor) * [inverse](https://daikirai.gitbook.io/scripting/documentation/vec3#inverse) * [offset](https://daikirai.gitbook.io/scripting/documentation/vec3#offset) * [offset](https://daikirai.gitbook.io/scripting/documentation/vec3#offset-1) * [translate](https://daikirai.gitbook.io/scripting/documentation/vec3#translate) * [translate](https://daikirai.gitbook.io/scripting/documentation/vec3#translate-1) * [distanceTo](https://daikirai.gitbook.io/scripting/documentation/vec3#distanceto) * [distanceToSq](https://daikirai.gitbook.io/scripting/documentation/vec3#distancetosq) Copy Vec3 inverse = position.inverse(); Copy Vec3 offset = position.offset(Vec3 amount); Copy Vec3 offset = position.offset(double x, double y, double z); Copy Vec3 translated = position.translate(Vec3 amount); Copy Vec3 translated = position.translate(double x, double y, double z); Copy double distance = position.distanceTo(Vec3 other); Copy double distanceSq = position.distanceToSq(Vec3 other); --- # modules | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/modules.md) . the variable `scriptName` is a global value containing the current script name. ### [](https://daikirai.gitbook.io/scripting/documentation/modules#disable) disable disables the specified module. Copy modules.disable(String moduleName); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#enable) enable enables the specified module. Copy modules.enable(String moduleName); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#forcescaffoldmultiplace) forceScaffoldMultiplace forces Scaffold to place multiple blocks per tick when `true`. Copy modules.forceScaffoldMultiplace(boolean enable); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getaimassisttarget) getAimAssistTarget returns the current AimAssist target as an [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) or `null` if none. Copy Entity target = modules.getAimAssistTarget(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getbacktracktarget) getBacktrackTarget returns the current Backtrack target as an [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) or `null` if none. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getbedauraposition) getBedAuraPosition returns the BedAura target position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) , or `null` when inactive. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getbedauraprogress) getBedAuraProgress returns the current break progress of the targeted bed as `[modified, vanilla]`. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getbutton) getButton returns the value of a registered button setting. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getcategories) getCategories returns all module categories mapped to their module names. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getkillauratarget) getKillAuraTarget returns the current KillAura target as an [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) or `null` if none. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getlagrangetarget) getLagRangeTarget returns the current Lag Range target as an [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) or `null` if none. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getsettings) getSettings returns every setting registered by the specified module. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getwhitelistedbedpos) getWhitelistedBedPos returns the whitelisted bed position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) , or `null` if none. persists across worlds. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#getslider) getSlider returns the current value of a slider setting. string-array sliders return the selected index. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#isenabled) isEnabled returns `true` if the specified module is enabled. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#ishidden) isHidden returns `true` if the specified module is hidden. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#isscaffolding) isScaffolding returns `true` when the Scaffold module is currently active. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#istowering) isTowering returns `true` when the Tower module is currently active. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#registerbutton) registerButton registers a toggleable button with its default value, only works [`onLoad`](https://daikirai.gitbook.io/scripting/documentation/events#onload) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#registerdescription) registerDescription registers a description displayed in the script options, only works [`onLoad`](https://daikirai.gitbook.io/scripting/documentation/events#onload) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#registerslider) registerSlider registers a slider. provide numeric bounds or an array of options, only works [`onLoad`](https://daikirai.gitbook.io/scripting/documentation/events#onload) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#setbutton) setButton updates the value of an existing button setting. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/modules#setslider) setSlider updates the value of a slider setting. [Previousload string](https://daikirai.gitbook.io/scripting/documentation/loadstring) [Nextnetwork](https://daikirai.gitbook.io/scripting/documentation/network) Last updated 1 month ago * [disable](https://daikirai.gitbook.io/scripting/documentation/modules#disable) * [enable](https://daikirai.gitbook.io/scripting/documentation/modules#enable) * [forceScaffoldMultiplace](https://daikirai.gitbook.io/scripting/documentation/modules#forcescaffoldmultiplace) * [getAimAssistTarget](https://daikirai.gitbook.io/scripting/documentation/modules#getaimassisttarget) * [getBacktrackTarget](https://daikirai.gitbook.io/scripting/documentation/modules#getbacktracktarget) * [getBedAuraPosition](https://daikirai.gitbook.io/scripting/documentation/modules#getbedauraposition) * [getBedAuraProgress](https://daikirai.gitbook.io/scripting/documentation/modules#getbedauraprogress) * [getButton](https://daikirai.gitbook.io/scripting/documentation/modules#getbutton) * [getCategories](https://daikirai.gitbook.io/scripting/documentation/modules#getcategories) * [getKillAuraTarget](https://daikirai.gitbook.io/scripting/documentation/modules#getkillauratarget) * [getLagRangeTarget](https://daikirai.gitbook.io/scripting/documentation/modules#getlagrangetarget) * [getSettings](https://daikirai.gitbook.io/scripting/documentation/modules#getsettings) * [getWhitelistedBedPos](https://daikirai.gitbook.io/scripting/documentation/modules#getwhitelistedbedpos) * [getSlider](https://daikirai.gitbook.io/scripting/documentation/modules#getslider) * [isEnabled](https://daikirai.gitbook.io/scripting/documentation/modules#isenabled) * [isHidden](https://daikirai.gitbook.io/scripting/documentation/modules#ishidden) * [isScaffolding](https://daikirai.gitbook.io/scripting/documentation/modules#isscaffolding) * [isTowering](https://daikirai.gitbook.io/scripting/documentation/modules#istowering) * [registerButton](https://daikirai.gitbook.io/scripting/documentation/modules#registerbutton) * [registerDescription](https://daikirai.gitbook.io/scripting/documentation/modules#registerdescription) * [registerSlider](https://daikirai.gitbook.io/scripting/documentation/modules#registerslider) * [setButton](https://daikirai.gitbook.io/scripting/documentation/modules#setbutton) * [setSlider](https://daikirai.gitbook.io/scripting/documentation/modules#setslider) Copy Entity target = modules.getBacktrackTarget(); Copy Vec3 target = modules.getBedAuraPosition(); Copy float[] progress = modules.getBedAuraProgress(); Copy boolean value = modules.getButton(String moduleName, String name); Copy Map> categories = modules.getCategories(); Copy Entity target = modules.getKillAuraTarget(); Copy Entity target = modules.getLagRangeTarget(); Copy Map settings = modules.getSettings(String moduleName); Copy Vec3 pos = modules.getWhitelistedBedPos(); Copy double value = modules.getSlider(String moduleName, String name); Copy boolean enabled = modules.isEnabled(String moduleName); Copy boolean hidden = modules.isHidden(String moduleName); Copy boolean scaffolding = modules.isScaffolding(); Copy boolean towering = modules.isTowering(); Copy modules.registerButton(String name, boolean defaultValue); Copy modules.registerDescription(String description); Copy modules.registerSlider(String name, String suffix, double defaultValue, double min, double max, double interval); modules.registerSlider(String name, String suffix, int defaultIndex, String[] values); Copy modules.setButton(String moduleName, String name, boolean value); Copy modules.setSlider(String moduleName, String name, double value); --- # world | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/world.md) . see also: [`entity`](https://daikirai.gitbook.io/scripting/documentation/entity) , [`tile entity`](https://daikirai.gitbook.io/scripting/documentation/tile-entity) , and [`network`](https://daikirai.gitbook.io/scripting/documentation/network) ### [](https://daikirai.gitbook.io/scripting/documentation/world#exists) exists returns `true` if the world is loaded. Copy boolean exists = world.exists(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getblockat) getBlockAt returns a [`Block`](https://daikirai.gitbook.io/scripting/documentation/block) for the specified coordinates or vector. Copy Block blockByPos = world.getBlockAt(Vec3 position); Block blockByCoords = world.getBlockAt(int x, int y, int z); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getdimension) getDimension returns the current dimension name. Copy String dimension = world.getDimension(); ### [](https://daikirai.gitbook.io/scripting/documentation/world#getentities) getEntities returns every loaded entity. Copy List entities = world.getEntities(); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getentitybyid) getEntityById returns an [`Entity`](https://daikirai.gitbook.io/scripting/documentation/entity) by id, or `null` when missing. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getmode) getMode returns current gamemode as a string (ex. `NOT_HYPIXEL`, `BEDWARS_PREGAME`, `BEDWARS_GAME` ). * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getnetworkplayers) getNetworkPlayers returns the network player list. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getplayerentities) getPlayerEntities returns all loaded player entities. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getscoreboard) getScoreboard returns the sidebar scoreboard lines. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getsubtitletext) getSubtitleText returns currently displayed subtitle text or an empty string if no subtitle is visible. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#gettabfooter) getTabFooter returns the tab list footer text. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#gettabheader) getTabHeader returns the tab list header text. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#getteams) getTeams returns a map of team names to their members. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#gettileentities) getTileEntities returns every loaded tile entity. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#gettitletext) getTitleText returns currently displayed title text or an empty string if no title is visible. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/world#isvalidentity) isValidEntity returns `true` if the provided entity is still loaded. [Previousvec3](https://daikirai.gitbook.io/scripting/documentation/vec3) Last updated 2 months ago * [exists](https://daikirai.gitbook.io/scripting/documentation/world#exists) * [getBlockAt](https://daikirai.gitbook.io/scripting/documentation/world#getblockat) * [getDimension](https://daikirai.gitbook.io/scripting/documentation/world#getdimension) * [getEntities](https://daikirai.gitbook.io/scripting/documentation/world#getentities) * [getEntityById](https://daikirai.gitbook.io/scripting/documentation/world#getentitybyid) * [getMode](https://daikirai.gitbook.io/scripting/documentation/world#getmode) * [getNetworkPlayers](https://daikirai.gitbook.io/scripting/documentation/world#getnetworkplayers) * [getPlayerEntities](https://daikirai.gitbook.io/scripting/documentation/world#getplayerentities) * [getScoreboard](https://daikirai.gitbook.io/scripting/documentation/world#getscoreboard) * [getSubtitleText](https://daikirai.gitbook.io/scripting/documentation/world#getsubtitletext) * [getTabFooter](https://daikirai.gitbook.io/scripting/documentation/world#gettabfooter) * [getTabHeader](https://daikirai.gitbook.io/scripting/documentation/world#gettabheader) * [getTeams](https://daikirai.gitbook.io/scripting/documentation/world#getteams) * [getTileEntities](https://daikirai.gitbook.io/scripting/documentation/world#gettileentities) * [getTitleText](https://daikirai.gitbook.io/scripting/documentation/world#gettitletext) * [isValidEntity](https://daikirai.gitbook.io/scripting/documentation/world#isvalidentity) Copy Entity entity = world.getEntityById(int entityId); Copy String mode = world.getMode(); Copy List players = world.getNetworkPlayers(); Copy List players = world.getPlayerEntities(); Copy List scoreboard = world.getScoreboard(); Copy String subtitle = world.getSubtitleText(); Copy String footer = world.getTabFooter(); Copy String header = world.getTabHeader(); Copy Map> teamMap = world.getTeams(); Copy List tileEntities = world.getTileEntities(); Copy String title = world.getTitleText(); Copy boolean valid = world.isValidEntity(Entity entity); --- # render | raven client For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt) . This page is also available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/render.md) . ### [](https://daikirai.gitbook.io/scripting/documentation/render#block) block renders a block highlight at the specified position. Copy render.block(Vec3 position, int color, boolean outline, boolean shade); render.block(int x, int y, int z, int color, boolean outline, boolean shade); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#bloom) bloom applies a bloom shader to all renders between `prepare` and `apply`. Copy render.bloom.prepare(); // rendering code render.bloom.apply(int passes, float radius); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#blur) blur applies a blur shader to all renders between `prepare` and `apply`. Copy render.blur.prepare(); // rendering code render.blur.apply(int passes, float radius); * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#drawbeam) drawBeam draws an upwards beam at a position. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#draw3dpolygon) draw3DPolygon draws a wireframe polygon around a position. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#entity) entity renders an entity bounding box with optional outline and shade. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#entitygui) entityGui renders an entity model on the screen. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#getfontheight) getFontHeight returns the height of the current font renderer. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#getfontwidth) getFontWidth returns the width of the specified text. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#getposition) getPosition returns the camera position as a [`Vec3`](https://daikirai.gitbook.io/scripting/documentation/vec3) . * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#getrotations) getRotations returns the camera rotations as `[yaw, pitch]`. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#image) image renders an [`Image`](https://daikirai.gitbook.io/scripting/documentation/image) on screen. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#isinview) isInView returns `true` if the given bounding box is within the camera frustum. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#item) item renders an item stack on screen. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#line2d) line2D draws a 2d line on screen. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#line3d) line3D draws a 3d line between two points. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#rect) rect draws a solid rectangle on screen. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#roundedrect) roundedRect draws a rounded rectangle on screen. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#text) text draws text on screen with optional scaling and shadow. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#tracer) tracer draws a tracer line from the player to an entity or position. * * * ### [](https://daikirai.gitbook.io/scripting/documentation/render#worldtoscreen) worldToScreen projects a world position into screen space. returns `null` if the point is not visible. [Previousplayerstate](https://daikirai.gitbook.io/scripting/documentation/playerstate) [Nextrequest](https://daikirai.gitbook.io/scripting/documentation/request) Last updated 4 months ago * [block](https://daikirai.gitbook.io/scripting/documentation/render#block) * [bloom](https://daikirai.gitbook.io/scripting/documentation/render#bloom) * [blur](https://daikirai.gitbook.io/scripting/documentation/render#blur) * [drawBeam](https://daikirai.gitbook.io/scripting/documentation/render#drawbeam) * [draw3DPolygon](https://daikirai.gitbook.io/scripting/documentation/render#draw3dpolygon) * [entity](https://daikirai.gitbook.io/scripting/documentation/render#entity) * [entityGui](https://daikirai.gitbook.io/scripting/documentation/render#entitygui) * [getFontHeight](https://daikirai.gitbook.io/scripting/documentation/render#getfontheight) * [getFontWidth](https://daikirai.gitbook.io/scripting/documentation/render#getfontwidth) * [getPosition](https://daikirai.gitbook.io/scripting/documentation/render#getposition) * [getRotations](https://daikirai.gitbook.io/scripting/documentation/render#getrotations) * [image](https://daikirai.gitbook.io/scripting/documentation/render#image) * [isInView](https://daikirai.gitbook.io/scripting/documentation/render#isinview) * [item](https://daikirai.gitbook.io/scripting/documentation/render#item) * [line2D](https://daikirai.gitbook.io/scripting/documentation/render#line2d) * [line3D](https://daikirai.gitbook.io/scripting/documentation/render#line3d) * [rect](https://daikirai.gitbook.io/scripting/documentation/render#rect) * [roundedRect](https://daikirai.gitbook.io/scripting/documentation/render#roundedrect) * [text](https://daikirai.gitbook.io/scripting/documentation/render#text) * [tracer](https://daikirai.gitbook.io/scripting/documentation/render#tracer) * [worldToScreen](https://daikirai.gitbook.io/scripting/documentation/render#worldtoscreen) Copy render.drawBeam(Vec3 position, double height, double radius, int color, float alpha); render.drawBeam(double x, double y, double z, double height, double radius, int color, float alpha); Copy render.draw3DPolygon(Vec3 position, double radius, int sides, double lineWidth, int color); render.draw3DPolygon(double x, double y, double z, double radius, int sides, double lineWidth, int color); Copy render.entity(Entity entity, int color, float partialTicks, boolean outline, boolean shade); Copy render.entityGui(Entity entity, int x, int y, float mouseX, float mouseY, int scale); Copy int fontHeight = render.getFontHeight(); Copy int width = render.getFontWidth(String text); Copy Vec3 position = render.getPosition(); Copy double[] rotations = render.getRotations(); Copy render.image(Image image, float x, float y, float width, float height); Copy boolean visible = render.isInView(Entity entity); boolean visible = render.isInView(double minX, double minY, double minZ, double maxX, double maxY, double maxZ); Copy render.item(ItemStack stack, float x, float y, float scale); Copy render.line2D(double startX, double startY, double endX, double endY, float lineWidth, int color); Copy render.line3D(Vec3 start, Vec3 end, float lineWidth, int color); render.line3D(double startX, double startY, double startZ, double endX, double endY, double endZ, float lineWidth, int color); Copy render.rect(float startX, float startY, float endX, float endY, int color); Copy render.roundedRect(float startX, float startY, float endX, float endY, float radius, int color); Copy render.text(String text, float x, float y, float scale, int color, boolean shadow); Copy render.tracer(Entity entity, float lineWidth, int color, float partialTicks); render.tracer(Vec3 position, float lineWidth, int color, float partialTicks); render.tracer(double x, double y, double z, float lineWidth, int color, float partialTicks); Copy Vec3 screen = render.worldToScreen(Vec3 position, int scaleFactor, float partialTicks); Vec3 screen = render.worldToScreen(double x, double y, double z, int scaleFactor, float partialTicks); --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/imports.md). # imports list of java classes that are imported and available for use in scripts. \* \`java.lang.\* (ex. Math, StringBuilder)\` \* \`ArrayList\` \* \`Arrays\` \* \`AtomicBoolean\` \* \`AtomicInteger\` \* \`AtomicLong\` \* \`Color\` \* \`Collections\` \* \`Comparator\` \* \`ConcurrentHashMap\` \* \`HashMap\` \* \`HashSet\` \* \`Iterator\` \* \`LinkedHashMap\` \* \`LinkedList\` \* \`List\` \* \`Map\` \* \`Matcher\` \* \`Pattern\` \* \`Random\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/imports.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/json.md). # json ## Json \`Json\` represents parsed json data. see sections below for available helpers. ### constructor creates a new json object from a string. \`\`\`java Json json = new Json(String contents); \`\`\` \*\*\* ### object returns the json object itself or a named member as a new \`Json\` instance. \`\`\`java Json obj = json.object(); Json member = json.object(String memberName); \`\`\` \*\*\* ### array returns the json array or a named member as a list of \`Json\` objects. \`\`\`java List array = json.array(); List memberArray = json.array(String memberName); \`\`\` \*\*\* ### map returns a map of object members to \`Json\` values. \`\`\`java Map members = json.map(); \`\`\` \*\*\* ### get returns the string value of a member, optionally providing a default. \`\`\`java String value = json.get(String memberName); String valueOrDefault = json.get(String memberName, String defaultValue); \`\`\` \*\*\* ### exists returns \`true\` if the json value is not null. \`\`\`java boolean exists = json.exists(); \`\`\` \*\*\* ### equals compares two json values for equality. \`\`\`java boolean same = json.equals(Json other); \`\`\` \*\*\* ### string returns the json value as a string. non-primitive values are serialized. \`\`\`java String contents = json.string(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/json.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/network.md). # network {% hint style="info" %} assumes variable \`networkPlayer\` is defined. example: \`NetworkPlayer networkPlayer = entity.getNetworkPlayer();\` see also: \[\`entity.getNetworkPlayer()\`\](/scripting/documentation/entity.md#getnetworkplayer) or \[\`world.getNetworkPlayers()\`\](/scripting/documentation/world.md#getnetworkplayers) {% endhint %} ### getCape returns the cape resource path for the player, or \`null\` when unavailable. \`\`\`java String cape = networkPlayer.getCape(); \`\`\` \*\*\* ### getDisplayName returns the formatted display name of the player. \`\`\`java String displayName = networkPlayer.getDisplayName(); \`\`\` \*\*\* ### getName returns the unformatted player name. \`\`\`java String name = networkPlayer.getName(); \`\`\` \*\*\* ### getPing returns the ping of the player in milliseconds. \`\`\`java int ping = networkPlayer.getPing(); \`\`\` \*\*\* ### getSkinData returns the skin data encoded as a json string, or \`null\` if missing. \`\`\`java String skinData = networkPlayer.getSkinData(); \`\`\` \*\*\* ### getUUID returns the uuid of the player. \`\`\`java String uuid = networkPlayer.getUUID(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/network.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/util.md). # util ### color replaces \`&\` color codes with the minecraft color symbol. \`\`\`java String colored = util.color(String text); \`\`\` \*\*\* ### colorSymbol minecraft unicode character for color codes. \`\`\`java String colorSymbol = util.colorSymbol; \`\`\` \*\*\* ### decodeb64 decode base 64 encoded text. \`\`\`java String decoded = util.decodeb64(String b64); \`\`\` \*\*\* ### encodeb64 encode text into base 64. \`\`\`java String encoded = util.encodeb64(String text); \`\`\` \*\*\* ### randomDouble returns a random \`double\` within the inclusive range. \`\`\`java double random = util.randomDouble(double min, double max); \`\`\` \*\*\* ### randomInt returns a random \`int\` within the inclusive range. \`\`\`java int random = util.randomInt(int min, int max); \`\`\` \*\*\* ### round rounds a double to the specified number of decimal places. \`\`\`java double rounded = util.round(double value, int decimals); \`\`\` \*\*\* ### strip removes minecraft color codes from a string. \`\`\`java String plain = util.strip(String text); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/util.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/client.md). # client {% hint style="info" %} see also: \[\`entity\`\](/scripting/documentation/entity.md) for entity-specific methods and \[\`world\`\](/scripting/documentation/world.md) for world data. {% endhint %} ### addEnemy adds the specified player to the enemy list. \`\`\`java client.addEnemy(String username); \`\`\` \*\*\* ### addFriend adds the specified player to the friend list. \`\`\`java client.addFriend(String username); \`\`\` \*\*\* ### allowEditing returns \`true\` if the player may edit blocks. \`\`\`java boolean allowEditing = client.allowEditing(); \`\`\` \*\*\* ### allowFlying returns \`true\` if the player has the ability to fly. \`\`\`java boolean allowFlying = client.allowFlying(); \`\`\` \*\*\* ### attack performs an attack on the specified \[\`Entity\`\](/scripting/documentation/entity.md). \`\`\`java client.attack(Entity entity); \`\`\` \*\*\* ### async runs the provided task on a cached background thread. \`\`\`java client.async(() -> { // background work }); \`\`\` \*\*\* ### canSeeEntity returns \`true\` if the player has line of sight to the entity. \`\`\`java boolean visible = client.canSeeEntity(Entity entity); \`\`\` \*\*\* ### chat sends a chat message as the local player. \`\`\`java client.chat(String message); \`\`\` \*\*\* ### closeScreen closes the currently open gui. \`\`\`java client.closeScreen(); \`\`\` \*\*\* ### dropItem drops the currently held item. set \`stack\` to \`true\` to drop the entire stack. \`\`\`java client.dropItem(boolean stack); \`\`\` \*\*\* ### getDisplaySize returns \`\[width, height, scaleFactor\]\` for the scaled window. \`\`\`java int\[\] display = client.getDisplaySize(); \`\`\` \*\*\* ### getDirection returns the movement direction string calculated by the client. \`\`\`java String direction = client.getDirection(); \`\`\` \*\*\* ### getForward returns the forward movement input value. \`\`\`java float forward = client.getForward(); \`\`\` \*\*\* ### getFPS returns the current frames per second. \`\`\`java int fps = client.getFPS(); \`\`\` \*\*\* ### getFreeMemory returns the amount of free jvm memory in bytes. \`\`\`java long freeMemory = client.getFreeMemory(); \`\`\` \*\*\* ### getMaxMemory returns the maximum jvm memory allocation in bytes. \`\`\`java long maxMemory = client.getMaxMemory(); \`\`\` \*\*\* ### getMotion returns the local player's motion vector as a \[\`Vec3\`\](/scripting/documentation/vec3.md). \`\`\`java Vec3 motion = client.getMotion(); \`\`\` \*\*\* ### getPlayer returns the local player as an \[\`Entity\`\](/scripting/documentation/entity.md). \`\`\`java Entity player = client.getPlayer(); \`\`\` \*\*\* ### getRenderArmPitch returns the render arm pitch angle. \`\`\`java float pitch = client.getRenderArmPitch(); \`\`\` \*\*\* ### getRotations returns \`\[yaw, pitch\]\` required to aim at a position. \`\`\`java float\[\] rotations = client.getRotations(Vec3 position); \`\`\` \*\*\* ### getRotationsToBlock returns \`\[yaw, pitch\]\` needed to aim at a block. provide a face or omit to use the default face. \`\`\`java float\[\] rotations = client.getRotationsToBlock(Vec3 position, String face); float\[\] rotationsDefault = client.getRotationsToBlock(Vec3 position); \`\`\` \*\*\* ### getRotationsToEntity returns \`\[yaw, pitch\]\` needed to aim at an entity. \`\`\`java float\[\] rotations = client.getRotationsToEntity(Entity entity); \`\`\` \*\*\* ### getScreen returns the simple class name of the currently open gui, or an empty string when no gui is open. \`\`\`java String screen = client.getScreen(); \`\`\` \*\*\* ### getServerDirection returns the server-reported movement direction using a \[\`PlayerState\`\](/scripting/documentation/playerstate.md). \`\`\`java String direction = client.getServerDirection(PlayerState state); \`\`\` \*\*\* ### getServerIP returns the connected server ip, or an empty string in singleplayer. \`\`\`java String serverIP = client.getServerIP(); \`\`\` \*\*\* ### getStrafe returns the strafe movement input value. \`\`\`java float strafe = client.getStrafe(); \`\`\` \*\*\* ### getTotalMemory returns the total jvm memory in bytes currently allocated. \`\`\`java long totalMemory = client.getTotalMemory(); \`\`\` \*\*\* ### getUID returns the raven user id. \`\`\`java int uid = client.getUID(); \`\`\` \*\*\* ### getUser returns the raven username. \`\`\`java String user = client.getUser(); \`\`\` \*\*\* ### isDiagonal returns \`true\` if the player is moving diagonally. \`\`\`java boolean diagonal = client.isDiagonal(); \`\`\` \*\*\* ### isEnemy returns \`true\` if the specified name is on the enemy list. \`\`\`java boolean enemy = client.isEnemy(String username); \`\`\` \*\*\* ### isFacingDiagonal returns \`true\` if the player is facing diagonally. \`\`\`java boolean facing = client.isFacingDiagonal(); \`\`\` \*\*\* ### isFlying returns \`true\` if the player is currently flying. \`\`\`java boolean flying = client.isFlying(); \`\`\` \*\*\* ### isFriend returns \`true\` if the specified name is on the friend list. \`\`\`java boolean friend = client.isFriend(String username); \`\`\` \*\*\* ### isJump returns \`true\` if the jump input is active. \`\`\`java boolean jumping = client.isJump(); \`\`\` \*\*\* ### isMoving returns \`true\` if either forward or strafe input is active. \`\`\`java boolean moving = client.isMoving(); \`\`\` \*\*\* ### isSingleplayer returns \`true\` when running in a singleplayer world. \`\`\`java boolean singleplayer = client.isSingleplayer(); \`\`\` \*\*\* ### isSneak returns \`true\` if the sneak input is active. \`\`\`java boolean sneaking = client.isSneak(); \`\`\` \*\*\* ### isCreative returns \`true\` if the player is in creative mode. \`\`\`java boolean creative = client.isCreative(); \`\`\` \*\*\* ### jump makes the player jump. \`\`\`java client.jump(); \`\`\` \*\*\* ### log logs a value to \`latest.log\`. \`\`\`java client.log(Object value); \`\`\` \*\*\* ### multiplyMotion multiplies horizontal motion by the supplied factor. \`\`\`java client.multiplyMotion(double factor); \`\`\` \*\*\* ### ping sends a ping request to the server. \`\`\`java client.ping(); \`\`\` \*\*\* ### placeBlock attempts to place a block using the specified hit data. returns \`true\` on success. \`\`\`java boolean placed = client.placeBlock(Vec3 blockPos, String side, Vec3 hitOffset); \`\`\` \*\*\* ### playSound plays a sound at the player position. \`\`\`java client.playSound(String name, float volume, float pitch); \`\`\` \*\*\* ### print prints a chat message without the raven prefix. \`\`\`java client.print(Object value); \`\`\` \*\*\* ### processPacket processes an incoming server packet immediately. \`\`\`java client.processPacket(SPacket packet); \`\`\` \*\*\* ### raycastBlock performs a block raycast and returns \`\[Vec3 blockPos, Vec3 hitOffset, String side\]\`, or \`null\` if nothing is hit. \`\`\`java Object\[\] hit = client.raycastBlock(double distance); Object\[\] hitCustom = client.raycastBlock(double distance, float yaw, float pitch); \`\`\` \*\*\* ### raycastEntity performs an entity raycast and returns \`\[Entity target, Vec3 hitOffset, double distanceSq\]\`, or \`null\` if nothing is hit. \`\`\`java Object\[\] result = client.raycastEntity(double distance); Object\[\] resultCustom = client.raycastEntity(double distance, float yaw, float pitch); \`\`\` \*\*\* ### removeEnemy removes the specified name from the enemy list. \`\`\`java client.removeEnemy(String username); \`\`\` \*\*\* ### removeFriend removes the specified name from the friend list. \`\`\`java client.removeFriend(String username); \`\`\` \*\*\* ### removePotionEffect removes the specified potion effect from the player. \`\`\`java client.removePotionEffect(int potionId); \`\`\` \*\*\* ### runCommand runs a raven client command. \`\`\`java boolean success = client.runCommand(String command); \`\`\` \*\*\* ### sendPacket sends a client packet and posts events. \`\`\`java client.sendPacket(CPacket packet); \`\`\` \*\*\* ### sendPacketNoEvent sends a client packet without triggering events. \`\`\`java client.sendPacketNoEvent(CPacket packet); \`\`\` \*\*\* ### setFlying enables or disables flying for the player. \`\`\`java client.setFlying(boolean flying); \`\`\` \*\*\* ### setForward sets the forward movement input value, only works \[\`onPostPlayerInput\`\](/scripting/documentation/events.md#onpostplayerinput). \`\`\`java client.setForward(float value); \`\`\` \*\*\* ### setJump sets the jump input state, only works \[\`onPostPlayerInput\`\](/scripting/documentation/events.md#onpostplayerinput). \`\`\`java client.setJump(boolean jumping); \`\`\` \*\*\* ### setMotion sets the player motion using a vector or explicit components. \`\`\`java client.setMotion(Vec3 motion); client.setMotion(double x, double y, double z); \`\`\` \*\*\* ### setRenderArmPitch sets the render arm pitch. \`\`\`java client.setRenderArmPitch(float pitch); \`\`\` \*\*\* ### setSneak sets the sneak input state, only works \[\`onPostPlayerInput\`\](/scripting/documentation/events.md#onpostplayerinput). \`\`\`java client.setSneak(boolean sneaking); \`\`\` \*\*\* ### setSpeed sets the horizontal speed value used by movement utilities. \`\`\`java client.setSpeed(double speed); \`\`\` \*\*\* ### setSpeedForward sets the forward speed value used by movement utilities. \`\`\`java client.setSpeedForward(double speed); \`\`\` \*\*\* ### setSprinting sets the sprinting state. \`\`\`java client.setSprinting(boolean sprinting); \`\`\` \*\*\* ### setStrafe sets the strafe movement input value, only works \[\`onPostPlayerInput\`\](/scripting/documentation/events.md#onpostplayerinput). \`\`\`java client.setStrafe(float value); \`\`\` \*\*\* ### setTimer adjusts the client timer speed. \`\`\`java client.setTimer(double timer); \`\`\` \*\*\* ### sleep sleeps the current thread for the specified milliseconds. returns \`true\` if uninterrupted. \`\`\`java boolean ok = client.sleep(long milliseconds); \`\`\` \*\*\* ### swing swings the held item. \`\`\`java client.swing(); \`\`\` \*\*\* ### swingReset swings the held item and resets the equipped animation. \`\`\`java client.swingReset(); \`\`\` \*\*\* ### time returns the current system time in milliseconds. use in place of \`System.currentTimeMillis()\`. \`\`\`java long ms = client.time(); \`\`\` \*\*\* ### timeTag returns truncated millisecond timestamp for lightweight debugging. \`\`\`java int tag = client.timeTag(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/client.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/packets.md). # packets {% hint style="warning" %} packets must be cast to their specific type to access their properties. example: \`C03 c03 = (C03) packet;\` {% endhint %} ## client packets ### CPacket base wrapper for outbound packets. | property | type | description | | -------- | -------- | ------------------------ | | name | \`String\` | simple packet class name | \*\*\* ### C0A (animation) \`\`\`java new C0A(); \`\`\` \*\*\* ### C0B (entity action) \`\`\`java new C0B(String action, int horsePower); \`\`\` | property | type | description | | ---------- | -------- | ------------------ | | action | \`String\` | entity action name | | horsepower | \`int\` | horse jump power | \*\*\* ### C0D (close window) \`\`\`java new C0D(int windowId); \`\`\` | property | type | | -------- | ----- | | windowId | \`int\` | \*\*\* ### C0E (click window) \`\`\`java new C0E(int windowId, int slot, int button, int mode, ItemStack itemStack); \`\`\` | property | type | description | | --------- | ----------- | -------------- | | windowId | \`int\` | window id | | slot | \`int\` | inventory slot | | button | \`int\` | mouse button | | mode | \`int\` | click mode | | action | \`short\` | transaction id | | itemStack | \`ItemStack\` | clicked stack | \*\*\* ### C0F (confirm transaction) \`\`\`java new C0F(int windowId, short uid); \`\`\` | property | type | | -------- | ------- | | windowId | \`int\` | | uid | \`short\` | \*\*\* ### C01 (chat message) \`\`\`java new C01(String message); \`\`\` | property | type | | -------- | -------- | | message | \`String\` | \*\*\* ### C02 (use entity) \`\`\`java new C02(Entity entity, String action, Vec3 hitVec); \`\`\` | property | type | description | | -------- | -------- | -------------------------------- | | entity | \`Entity\` | target entity | | action | \`String\` | ATTACK / INTERACT / INTERACT\\\_AT | | hitVec | \`Vec3\` | hit vector (may be \`null\`) | \*\*\* ### C03 (player) \`\`\`java new C03(boolean onGround); // (onGround only) new C03(Vec3 position, boolean onGround); // C04 (pos) new C03(float yaw, float pitch, boolean onGround); // C05 (look) new C03(Vec3 position, float yaw, float pitch, boolean onGround); // C06 (pos + look) \`\`\` | property | type | description | | -------- | --------- | ---------------------------- | | position | \`Vec3\` | player position | | yaw | \`float\` | yaw angle | | pitch | \`float\` | pitch angle | | ground | \`boolean\` | on ground flag | | moving | \`boolean\` | whether position is included | | rotating | \`boolean\` | whether rotation is included | \*\*\* ### C07 (player digging) \`\`\`java new C07(Vec3 position, String status, String facing); \`\`\` | property | type | | -------- | -------- | | position | \`Vec3\` | | status | \`String\` | | facing | \`String\` | \*\*\* ### C08 (block placement) \`\`\`java new C08(ItemStack itemStack); new C08(ItemStack itemStack, Vec3 position, int direction, Vec3 offset); \`\`\` | property | type | description | | --------- | ----------- | ----------------- | | itemStack | \`ItemStack\` | held item | | position | \`Vec3\` | block position | | direction | \`int\` | placed block face | | offset | \`Vec3\` | hit offset | \*\*\* ### C09 (held item change) \`\`\`java new C09(int slot); \`\`\` | property | type | | -------- | ----- | | slot | \`int\` | \*\*\* ### C10 (creative inventory action) \`\`\`java new C10(int slot, ItemStack itemStack); \`\`\` | property | type | | --------- | ----------- | | slot | \`int\` | | itemStack | \`ItemStack\` | \*\*\* ### C13 (player abilities) \`\`\`java new C13(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flySpeed, float walkSpeed); \`\`\` | property | type | | ------------ | --------- | | invulnerable | \`boolean\` | | flying | \`boolean\` | | allowFlying | \`boolean\` | | creativeMode | \`boolean\` | | flySpeed | \`float\` | | walkSpeed | \`float\` | \*\*\* ### C16 (client status) \`\`\`java new C16(String status); \`\`\` | property | type | | -------- | -------- | | status | \`String\` | \*\*\* ## server packets ### SPacket base wrapper for inbound packets. | property | type | description | | -------- | -------- | ------------------------ | | name | \`String\` | simple packet class name | \*\*\* ### S06 (update health) | property | type | | ---------- | ------- | | health | \`float\` | | saturation | \`float\` | | food | \`int\` | \*\*\* ### S08 (player position and look) | property | type | | -------- | ------- | | position | \`Vec3\` | | yaw | \`float\` | | pitch | \`float\` | \*\*\* ### S09 (held item change) | property | type | | -------- | ----- | | slot | \`int\` | \*\*\* ### S12 (entity velocity) | property | type | | -------- | ------ | | entityId | \`int\` | | motion | \`Vec3\` | \*\*\* ### S23 (block change) | property | type | | -------- | ------- | | position | \`Vec3\` | | block | \`Block\` | \*\*\* ### S27 (explosion) | property | type | | -------- | ------- | | strength | \`float\` | | position | \`Vec3\` | | motion | \`Vec3\` | \*\*\* ### S29 (sound effect) | property | type | | -------- | -------- | | sound | \`String\` | | position | \`Vec3\` | | volume | \`float\` | | pitch | \`float\` | \*\*\* ### S2A (particles) | property | type | | -------- | -------- | | type | \`String\` | | position | \`Vec3\` | | offset | \`Vec3\` | | speed | \`float\` | | count | \`int\` | | args | \`int\[\]\` | \*\*\* ### S3E (teams) | property | type | | ----------------- | -------------------- | | name | \`String\` | | displayName | \`String\` | | prefix | \`String\` | | suffix | \`String\` | | nametagVisibility | \`String\` | | playerList | \`Collection\` | | action | \`int\` | | friendlyFlags | \`int\` | | color | \`int\` | --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/packets.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/modules.md). # modules {% hint style="info" %} the variable \`scriptName\` is a global value containing the current script name. {% endhint %} ### disable disables the specified module. \`\`\`java modules.disable(String moduleName); \`\`\` \*\*\* ### enable enables the specified module. \`\`\`java modules.enable(String moduleName); \`\`\` \*\*\* ### forceScaffoldMultiplace forces Scaffold to place multiple blocks per tick when \`true\`. \`\`\`java modules.forceScaffoldMultiplace(boolean enable); \`\`\` \*\*\* ### getAimAssistTarget returns the current AimAssist target as an \[\`Entity\`\](/scripting/documentation/entity.md) or \`null\` if none. \`\`\`java Entity target = modules.getAimAssistTarget(); \`\`\` \*\*\* ### getBacktrackTarget returns the current Backtrack target as an \[\`Entity\`\](/scripting/documentation/entity.md) or \`null\` if none. \`\`\`java Entity target = modules.getBacktrackTarget(); \`\`\` \*\*\* ### getBedAuraPosition returns the BedAura target position as a \[\`Vec3\`\](/scripting/documentation/vec3.md), or \`null\` when inactive. \`\`\`java Vec3 target = modules.getBedAuraPosition(); \`\`\` \*\*\* ### getBedAuraProgress returns the current break progress of the targeted bed as \`\[modified, vanilla\]\`. \`\`\`java float\[\] progress = modules.getBedAuraProgress(); \`\`\` \*\*\* ### getButton returns the value of a registered button setting. \`\`\`java boolean value = modules.getButton(String moduleName, String name); \`\`\` \*\*\* ### getCategories returns all module categories mapped to their module names. \`\`\`java Map\> categories = modules.getCategories(); \`\`\` \*\*\* ### getKillAuraTarget returns the current KillAura target as an \[\`Entity\`\](/scripting/documentation/entity.md) or \`null\` if none. \`\`\`java Entity target = modules.getKillAuraTarget(); \`\`\` \*\*\* ### getLagRangeTarget returns the current Lag Range target as an \[\`Entity\`\](/scripting/documentation/entity.md) or \`null\` if none. \`\`\`java Entity target = modules.getLagRangeTarget(); \`\`\` \*\*\* ### getSettings returns every setting registered by the specified module. \`\`\`java Map settings = modules.getSettings(String moduleName); \`\`\` \*\*\* ### getWhitelistedBedPos returns the whitelisted bed position as a \[\`Vec3\`\](/scripting/documentation/vec3.md), or \`null\` if none. persists across worlds. \`\`\`java Vec3 pos = modules.getWhitelistedBedPos(); \`\`\` \*\*\* ### getSlider returns the current value of a slider setting. string-array sliders return the selected index. \`\`\`java double value = modules.getSlider(String moduleName, String name); \`\`\` \*\*\* ### isEnabled returns \`true\` if the specified module is enabled. \`\`\`java boolean enabled = modules.isEnabled(String moduleName); \`\`\` \*\*\* ### isHidden returns \`true\` if the specified module is hidden. \`\`\`java boolean hidden = modules.isHidden(String moduleName); \`\`\` \*\*\* ### isScaffolding returns \`true\` when the Scaffold module is currently active. \`\`\`java boolean scaffolding = modules.isScaffolding(); \`\`\` \*\*\* ### isTowering returns \`true\` when the Tower module is currently active. \`\`\`java boolean towering = modules.isTowering(); \`\`\` \*\*\* ### registerButton registers a toggleable button with its default value, only works \[\`onLoad\`\](/scripting/documentation/events.md#onload). \`\`\`java modules.registerButton(String name, boolean defaultValue); \`\`\` \*\*\* ### registerDescription registers a description displayed in the script options, only works \[\`onLoad\`\](/scripting/documentation/events.md#onload). \`\`\`java modules.registerDescription(String description); \`\`\` \*\*\* ### registerSlider registers a slider. provide numeric bounds or an array of options, only works \[\`onLoad\`\](/scripting/documentation/events.md#onload). \`\`\`java modules.registerSlider(String name, String suffix, double defaultValue, double min, double max, double interval); modules.registerSlider(String name, String suffix, int defaultIndex, String\[\] values); \`\`\` \*\*\* ### setButton updates the value of an existing button setting. \`\`\`java modules.setButton(String moduleName, String name, boolean value); \`\`\` \*\*\* ### setSlider updates the value of a slider setting. \`\`\`java modules.setSlider(String moduleName, String name, double value); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/modules.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/playerstate.md). # playerstate ## PlayerState \`PlayerState\` represents a player's position, rotation, and movement state. | property | type | description | | ----------- | --------- | ------------------------------- | | x | \`double\` | x coordinate | | y | \`double\` | y coordinate | | z | \`double\` | z coordinate | | yaw | \`float\` | yaw rotation | | pitch | \`float\` | pitch rotation | | onGround | \`boolean\` | whether the player is on ground | | isSprinting | \`boolean\` | whether the player is sprinting | | isSneaking | \`boolean\` | whether the player is sneaking | ### constructor creates a new player state with individual parameters. \`\`\`java PlayerState state = new PlayerState(double x, double y, double z, float yaw, float pitch, boolean onGround, boolean sprinting, boolean sneaking); \`\`\` \*\*\* ### constructor creates a new player state from an array of data. \`\`\`java PlayerState state = new PlayerState(Object\[\] data); \`\`\` \*\*\* ### asArray returns the player state data as an object array. \`\`\`java Object\[\] data = state.asArray(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/playerstate.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/keybinds.md). # keybinds {% hint style="info" %} minecraft keycodes: {% endhint %} ### getKeycode returns the keycode for the specified minecraft keybind name. \`\`\`java int code = keybinds.getKeycode(String key); \`\`\` \*\*\* ### getMousePosition returns the current mouse position in pixels as \`\[x, y\]\`. \`\`\`java int\[\] position = keybinds.getMousePosition(); \`\`\` \*\*\* ### isKeyDown returns \`true\` if the specified keycode is held. \`\`\`java boolean keyDown = keybinds.isKeyDown(int key); \`\`\` \*\*\* ### isMouseDown returns \`true\` if the specified mouse button is pressed. use \`0\` for left, \`1\` for right, and \`2\` for middle click. \`\`\`java boolean mouseDown = keybinds.isMouseDown(int button); \`\`\` \*\*\* ### isPressed returns \`true\` if the named keybind is currently pressed. \`\`\`java boolean pressed = keybinds.isPressed(String key); \`\`\` \*\*\* ### leftClick simulates a left mouse click. \`\`\`java keybinds.leftClick(); \`\`\` \*\*\* ### rightClick simulates a right mouse click. \`\`\`java keybinds.rightClick(); \`\`\` \*\*\* ### setPressed sets the pressed state of a keybind as defined in \`options.txt\`. \`\`\`java keybinds.setPressed(String key, boolean pressed); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/keybinds.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/config.md). # config ### get returns the value stored for the specified key. \`\`\`java String value = config.get(String key); \`\`\` \*\*\* ### getDirectory returns the absolute path to the config directory. \`\`\`java String path = config.getDirectory(); \`\`\` \*\*\* ### set writes or updates a key-value pair inside the config file. returns \`true\` on success. \`\`\`java boolean saved = config.set(String key, String value); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/config.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/vec3.md). # vec3 ## Vec3 \`Vec3\` represents a 3d vector with x, y, and z coordinates for position calculations. | property | type | description | | -------- | -------- | ------------ | | x | \`double\` | x coordinate | | y | \`double\` | y coordinate | | z | \`double\` | z coordinate | ### ceil returns a new vector with coordinates rounded up. \`\`\`java Vec3 ceiled = position.ceil(); \`\`\` \*\*\* ### equals compares two vectors for equality. \`\`\`java boolean equal = position.equals(Vec3 other); \`\`\` \*\*\* ### floor returns a new vector with coordinates rounded down. \`\`\`java Vec3 floored = position.floor(); \`\`\` \*\*\* ### inverse returns a new vector with negated coordinates. \`\`\`java Vec3 inverse = position.inverse(); \`\`\` \*\*\* ### offset returns a new vector offset by another vector. \`\`\`java Vec3 offset = position.offset(Vec3 amount); \`\`\` \*\*\* ### offset returns a new vector offset by values. \`\`\`java Vec3 offset = position.offset(double x, double y, double z); \`\`\` \*\*\* ### translate returns current vector translated by another vector. \`\`\`java Vec3 translated = position.translate(Vec3 amount); \`\`\` \*\*\* ### translate returns current vector translated by values. \`\`\`java Vec3 translated = position.translate(double x, double y, double z); \`\`\` \*\*\* ### distanceTo returns the distance to another vector. \`\`\`java double distance = position.distanceTo(Vec3 other); \`\`\` \*\*\* ### distanceToSq returns the squared distance to another vector. \`\`\`java double distanceSq = position.distanceToSq(Vec3 other); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/vec3.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/world.md). # world {% hint style="info" %} see also: \[\`entity\`\](/scripting/documentation/entity.md), \[\`tile entity\`\](/scripting/documentation/tile-entity.md), and \[\`network\`\](/scripting/documentation/network.md) {% endhint %} ### exists returns \`true\` if the world is loaded. \`\`\`java boolean exists = world.exists(); \`\`\` \*\*\* ### getBlockAt returns a \[\`Block\`\](/scripting/documentation/block.md) for the specified coordinates or vector. \`\`\`java Block blockByPos = world.getBlockAt(Vec3 position); Block blockByCoords = world.getBlockAt(int x, int y, int z); \`\`\` \*\*\* ### getDimension returns the current dimension name. \`\`\`java String dimension = world.getDimension(); \`\`\` ### getEntities returns every loaded entity. \`\`\`java List entities = world.getEntities(); \`\`\` \*\*\* ### getEntityById returns an \[\`Entity\`\](/scripting/documentation/entity.md) by id, or \`null\` when missing. \`\`\`java Entity entity = world.getEntityById(int entityId); \`\`\` \*\*\* ### getMode returns current gamemode as a string (ex. \`NOT\_HYPIXEL\`, \`BEDWARS\_PREGAME\`, \`BEDWARS\_GAME\` ). \`\`\`java String mode = world.getMode(); \`\`\` \*\*\* ### getNetworkPlayers returns the network player list. \`\`\`java List players = world.getNetworkPlayers(); \`\`\` \*\*\* ### getPlayerEntities returns all loaded player entities. \`\`\`java List players = world.getPlayerEntities(); \`\`\` \*\*\* ### getScoreboard returns the sidebar scoreboard lines. \`\`\`java List scoreboard = world.getScoreboard(); \`\`\` \*\*\* ### getSubtitleText returns currently displayed subtitle text or an empty string if no subtitle is visible. \`\`\`java String subtitle = world.getSubtitleText(); \`\`\` \*\*\* ### getTabFooter returns the tab list footer text. \`\`\`java String footer = world.getTabFooter(); \`\`\` \*\*\* ### getTabHeader returns the tab list header text. \`\`\`java String header = world.getTabHeader(); \`\`\` \*\*\* ### getTeams returns a map of team names to their members. \`\`\`java Map\> teamMap = world.getTeams(); \`\`\` \*\*\* ### getTileEntities returns every loaded tile entity. \`\`\`java List tileEntities = world.getTileEntities(); \`\`\` \*\*\* ### getTitleText returns currently displayed title text or an empty string if no title is visible. String title = world.getTitleText(); \*\*\* ### isValidEntity returns \`true\` if the provided entity is still loaded. \`\`\`java boolean valid = world.isValidEntity(Entity entity); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/world.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/render.md). # render ### block renders a block highlight at the specified position. \`\`\`java render.block(Vec3 position, int color, boolean outline, boolean shade); render.block(int x, int y, int z, int color, boolean outline, boolean shade); \`\`\` \*\*\* ### bloom applies a bloom shader to all renders between \`prepare\` and \`apply\`. \`\`\`java render.bloom.prepare(); // rendering code render.bloom.apply(int passes, float radius); \`\`\` \*\*\* ### blur applies a blur shader to all renders between \`prepare\` and \`apply\`. \`\`\`java render.blur.prepare(); // rendering code render.blur.apply(int passes, float radius); \`\`\` \*\*\* ### drawBeam draws an upwards beam at a position. \`\`\`java render.drawBeam(Vec3 position, double height, double radius, int color, float alpha); render.drawBeam(double x, double y, double z, double height, double radius, int color, float alpha); \`\`\` \*\*\* ### draw3DPolygon draws a wireframe polygon around a position. \`\`\`java render.draw3DPolygon(Vec3 position, double radius, int sides, double lineWidth, int color); render.draw3DPolygon(double x, double y, double z, double radius, int sides, double lineWidth, int color); \`\`\` \*\*\* ### entity renders an entity bounding box with optional outline and shade. \`\`\`java render.entity(Entity entity, int color, float partialTicks, boolean outline, boolean shade); \`\`\` \*\*\* ### entityGui renders an entity model on the screen. \`\`\`java render.entityGui(Entity entity, int x, int y, float mouseX, float mouseY, int scale); \`\`\` \*\*\* ### getFontHeight returns the height of the current font renderer. \`\`\`java int fontHeight = render.getFontHeight(); \`\`\` \*\*\* ### getFontWidth returns the width of the specified text. \`\`\`java int width = render.getFontWidth(String text); \`\`\` \*\*\* ### getPosition returns the camera position as a \[\`Vec3\`\](/scripting/documentation/vec3.md). \`\`\`java Vec3 position = render.getPosition(); \`\`\` \*\*\* ### getRotations returns the camera rotations as \`\[yaw, pitch\]\`. \`\`\`java double\[\] rotations = render.getRotations(); \`\`\` \*\*\* ### image renders an \[\`Image\`\](/scripting/documentation/image.md) on screen. \`\`\`java render.image(Image image, float x, float y, float width, float height); \`\`\` \*\*\* ### isInView returns \`true\` if the given bounding box is within the camera frustum. \`\`\`java boolean visible = render.isInView(Entity entity); boolean visible = render.isInView(double minX, double minY, double minZ, double maxX, double maxY, double maxZ); \`\`\` \*\*\* ### item renders an item stack on screen. \`\`\`java render.item(ItemStack stack, float x, float y, float scale); \`\`\` \*\*\* ### line2D draws a 2d line on screen. \`\`\`java render.line2D(double startX, double startY, double endX, double endY, float lineWidth, int color); \`\`\` \*\*\* ### line3D draws a 3d line between two points. \`\`\`java render.line3D(Vec3 start, Vec3 end, float lineWidth, int color); render.line3D(double startX, double startY, double startZ, double endX, double endY, double endZ, float lineWidth, int color); \`\`\` \*\*\* ### rect draws a solid rectangle on screen. \`\`\`java render.rect(float startX, float startY, float endX, float endY, int color); \`\`\` \*\*\* ### roundedRect draws a rounded rectangle on screen. \`\`\`java render.roundedRect(float startX, float startY, float endX, float endY, float radius, int color); \`\`\` \*\*\* ### text draws text on screen with optional scaling and shadow. \`\`\`java render.text(String text, float x, float y, float scale, int color, boolean shadow); \`\`\` \*\*\* ### tracer draws a tracer line from the player to an entity or position. \`\`\`java render.tracer(Entity entity, float lineWidth, int color, float partialTicks); render.tracer(Vec3 position, float lineWidth, int color, float partialTicks); render.tracer(double x, double y, double z, float lineWidth, int color, float partialTicks); \`\`\` \*\*\* ### worldToScreen projects a world position into screen space. returns \`null\` if the point is not visible. \`\`\`java Vec3 screen = render.worldToScreen(Vec3 position, int scaleFactor, float partialTicks); Vec3 screen = render.worldToScreen(double x, double y, double z, int scaleFactor, float partialTicks); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/render.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/events.md). # events ### getRotations called when Minecraft sets your yaw and pitch for movement calculations. \`\`\`java float\[\] getRotations(float lastYaw, float lastPitch) \`\`\` \*\*\* ### onAntiCheatFlag called when the AntiCheat module flags a player. \`\`\`java void onAntiCheatFlag(String flag, Entity entity) \`\`\` \*\*\* ### onChat called whenever a message is sent in chat, return \`false\` to cancel. \`\`\`java boolean onChat(String msg, int type) \`\`\` \*\*\* ### onDisable called whenever the script is disabled. \`\`\`java void onDisable() \`\`\` \*\*\* ### onEnable called whenever the script is enabled. \`\`\`java void onEnable() \`\`\` \*\*\* ### onGuiUpdate called when a GUI updates. \`\`\`java void onGuiUpdate(String name, boolean opened) \`\`\` \*\*\* ### onIRCMessage called when you receive an IRC message, return \`false\` to cancel printing. \`\`\`java boolean onIRCMessage(String message) \`\`\` \*\*\* ### onKey called when a key is pressed. \`\`\`java void onKey(String keyName, int keyCode, boolean state, boolean inGui) \`\`\` \*\*\* ### onLoad called when the script is loaded. register buttons/sliders here. \`\`\`java void onLoad() \`\`\` \*\*\* ### onLocRaw calls on \`/locraw\` (auto-runs on world join), gives raw response as string. \`\`\`java void onLocRaw(String locraw) \`\`\` \*\*\* ### onMouse called whenever a button on the mouse is pressed, return \`false\` to cancel. \`\`\`java boolean onMouse(int button, boolean state) \`\`\` \*\*\* ### onPacketReceived called before a packet gets processed by the client, return \`false\` to cancel. \`\`\`java boolean onPacketReceived(SPacket packet) \`\`\` \*\*\* ### onPacketSent called before a packet gets sent to the server, return \`false\` to cancel. \`\`\`java boolean onPacketSent(CPacket packet) \`\`\` \*\*\* ### onPostMotion called after updates sent to server. \`\`\`java void onPostMotion() \`\`\` \*\*\* ### onPostPlayerInput called after the client processes player inputs. \`\`\`java void onPostPlayerInput() \`\`\` \*\*\* ### onPreMotion called before player updates are sent to the server. {% hint style="info" %} see also: \[\`playerstate\`\](/scripting/documentation/playerstate.md) for \`PlayerState\` properties. {% endhint %} \`\`\`java void onPreMotion(PlayerState state) \`\`\` \*\*\* ### onPreUpdate called at the beginning of every update to the local player. \`\`\`java void onPreUpdate() \`\`\` \*\*\* ### onRenderTick called every time the HUD renders. \`\`\`java void onRenderTick(float partialTicks) \`\`\` \*\*\* ### onRenderWorld called every time the world renders. \`\`\`java void onRenderWorld(float partialTicks) \`\`\` \*\*\* ### onWorldJoin called whenever an entity spawns in. \`\`\`java void onWorldJoin(Entity entity) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/events.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/readme.md). # main #### Welcome to the Scripting API documentation. Write simple Java scripts that hook into events, read game state, and automate actions. Visit the \[setup\](/scripting/guide/setup.md) page to get your environment ready and run your first script. \*\*\* ### Credits This documentation was created by \[blowsy\](https://www.youtube.com/@blowsy), \[pug\](https://www.youtube.com/@pugrilla), and \[desiyn\](https://www.youtube.com/@desIWNL). --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/readme.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/bridge.md). # bridge ### add adds or updates a value in the shared bridge map. \`\`\`java bridge.add(String key, Object value); bridge.add(String key); \`\`\` \*\*\* ### clear removes every entry stored in the bridge map. \`\`\`java bridge.clear(); \`\`\` \*\*\* ### get returns the value stored under a specified key, or \`null\` if it does not exist. \`\`\`java Object value = bridge.get(String key); \`\`\` \*\*\* ### has returns \`true\` if the bridge map contains the specified key. \`\`\`java boolean containsKey = bridge.has(String key); \`\`\` \*\*\* ### remove removes a key and its associated value from the bridge map. \`\`\`java bridge.remove(String key); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/bridge.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/guide/encryption.md). # encryption ## Why Encryption? By default, script source code can be easily accessed and altered. Encryption ensures your code remains secure and is only decrypted at runtime by the client. To encrypt a script, use the \*\*orchid bot\*\* in the customer discord and run the command: \`/encrypt \` {% embed url="" %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/guide/encryption.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/loadstring.md). # load string Must be outside of a function in the following format on a separate line. \`\`\`java load - "URL" \`\`\` \*\*\* ### Example Here is an example script hosted on \[Pastebin\](https://pastebin.com/93hWSJeN): \`\`\`java void onEnable() { client.print("enabled script!"); } \`\`\` You can load it using the Pastebin raw link: \`\`\`java load - "https://pastebin.com/raw/93hWSJeN" \`\`\` Alternatively, load from a local directory: \`\`\`java load - "file:///C:/Users/user/Desktop/script.txt" \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/loadstring.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/gl.md). # gl {% hint style="warning" %} advanced rendering api - improper use may cause visual glitches. use \[\`render\`\](/scripting/documentation/render.md) methods when possible. {% endhint %} ### alpha enables or disables alpha testing. \`\`\`java gl.alpha(boolean enabled); \`\`\` \*\*\* ### begin starts specifying vertices for a primitive shape. \`\`\`java gl.begin(int mode); \`\`\` \*\*\* ### blend enables or disables blending. \`\`\`java gl.blend(boolean enabled); \`\`\` \*\*\* ### color sets the current drawing color. \`\`\`java gl.color(int r, int g, int b, int a); gl.color(double r, double g, double b, double a); gl.color(float r, float g, float b, float a); gl.color(int rgb); gl.resetColor(); // set to white \`\`\` \*\*\* ### cull enables or disables face culling. \`\`\`java gl.cull(boolean enabled); \`\`\` \*\*\* ### depth enables or disables depth testing. \`\`\`java gl.depth(boolean enabled); \`\`\` \*\*\* ### depthMask sets whether writing to the depth buffer is enabled. \`\`\`java gl.depthMask(boolean enabled); \`\`\` \*\*\* ### disable disables an opengl capability. \`\`\`java gl.disable(int cap); \`\`\` \*\*\* ### disableItemLighting disables standard item lighting. \`\`\`java gl.disableItemLighting(); \`\`\` \*\*\* ### enable enables an opengl capability. \`\`\`java gl.enable(int cap); \`\`\` \*\*\* ### enableItemLighting enables standard item lighting. set \`gui\` to \`true\` when rendering in guis. \`\`\`java gl.enableItemLighting(boolean gui); \`\`\` \*\*\* ### end completes the current vertex specification. \`\`\`java gl.end(); \`\`\` \*\*\* ### lighting enables or disables lighting. \`\`\`java gl.lighting(boolean enabled); \`\`\` \*\*\* ### lineSmooth enables or disables line smoothing. \`\`\`java gl.lineSmooth(boolean enabled); \`\`\` \*\*\* ### lineWidth sets the width of lines. \`\`\`java gl.lineWidth(double width); gl.lineWidth(float width); \`\`\` \*\*\* ### normal specifies a normal vector for lighting calculations. \`\`\`java gl.normal(double x, double y, double z); gl.normal(float x, float y, float z); \`\`\` \*\*\* ### pop pops the current matrix stack. \`\`\`java gl.pop(); \`\`\` \*\*\* ### push pushes the current matrix stack. \`\`\`java gl.push(); \`\`\` \*\*\* ### rotate applies rotation around the specified axis. \`\`\`java gl.rotate(double angle, double x, double y, double z); gl.rotate(float angle, float x, float y, float z); \`\`\` \*\*\* ### scale scales the current transformation matrix. \`\`\`java gl.scale(double x, double y, double z); gl.scale(float x, float y, float z); \`\`\` \*\*\* ### scissor (box) sets the scissor rectangle. \`\`\`java gl.scissor(int x, int y, int width, int height); \`\`\` \*\*\* ### scissor (toggle) enables or disables scissoring. \`\`\`java gl.scissor(boolean enabled); \`\`\` \*\*\* ### texture2d enables or disables 2d texturing. \`\`\`java gl.texture2d(boolean enabled); \`\`\` \*\*\* ### translate translates the current transformation matrix. \`\`\`java gl.translate(double x, double y, double z); gl.translate(float x, float y, float z); \`\`\` \*\*\* ### vertex2 specifies a 2d vertex. \`\`\`java gl.vertex2(double x, double y); gl.vertex2(float x, float y); \`\`\` \*\*\* ### vertex3 specifies a 3d vertex. \`\`\`java gl.vertex3(double x, double y, double z); gl.vertex3(float x, float y, float z); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/gl.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/response.md). # response {% hint style="info" %} see also: \[\`request\`\](/scripting/documentation/request.md) for more usages. {% endhint %} ## Response \`Response\` represents the result of an http request with status code and content. ### code returns the http status code of the response. \`\`\`java int code = response.code(); \`\`\` \*\*\* ### string returns the response body as a string. \`\`\`java String body = response.string(); \`\`\` \*\*\* ### json returns the response body parsed as a Json object. \`\`\`java Json json = response.json(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/response.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/inventory.md). # inventory {% hint style="info" %} see also: \[\`itemstack\`\](/scripting/documentation/itemstack.md) for \`ItemStack\` properties. {% endhint %} ### click clicks a slot in the current container. \`\`\`java inventory.click(int slot, int button, int mode); \`\`\` \*\*\* ### getBookContents returns the pages of the currently open book as raw json strings. \`\`\`java List pages = inventory.getBookContents(); \`\`\` \*\*\* ### getChest returns the chest name when a chest is open, otherwise an empty string. \`\`\`java String chestName = inventory.getChest(); \`\`\` \*\*\* ### getChestSize returns the size of the opened chest inventory, or \`0\` if no chest is open. \`\`\`java int chestSize = inventory.getChestSize(); \`\`\` \*\*\* ### getContainer returns the simple class name of the currently open container. \`\`\`java String container = inventory.getContainer(); \`\`\` \*\*\* ### getSize returns the size of the player's inventory. \`\`\`java int size = inventory.getSize(); \`\`\` \*\*\* ### getSlot returns the currently selected hotbar slot index. \`\`\`java int slot = inventory.getSlot(); \`\`\` \*\*\* ### getStackInChestSlot returns the item in the specified chest slot as an \[\`ItemStack\`\](/scripting/documentation/itemstack.md), or \`null\` when unavailable. \`\`\`java ItemStack item = inventory.getStackInChestSlot(int slot); \`\`\` \*\*\* ### getStackInSlot returns the item in the specified player inventory slot as an \[\`ItemStack\`\](/scripting/documentation/itemstack.md). \`\`\`java ItemStack item = inventory.getStackInSlot(int slot); \`\`\` \*\*\* ### open simulates opening the inventory gui. \`\`\`java inventory.open(); \`\`\` \*\*\* ### setSlot sets the currently selected hotbar slot. \`\`\`java inventory.setSlot(int slot); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/inventory.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/request.md). # request ## Request \`Request\` represents an http request with methods, headers, and content. ### constructor creates a new request to a specified url. supported methods: \`GET\`, \`POST\`. \`\`\`java Request request = new Request(String method, String url); \`\`\` \*\*\* ### addHeader adds a header to the request. \`\`\`java request.addHeader(String header, String value); \`\`\` \*\*\* ### setUserAgent sets the user-agent header for the request. \`\`\`java request.setUserAgent(String userAgent); \`\`\` \*\*\* ### setConnectTimeout sets the connection timeout in milliseconds. \`\`\`java request.setConnectTimeout(int timeout); \`\`\` \*\*\* ### setReadTimeout sets the read timeout in milliseconds. \`\`\`java request.setReadTimeout(int timeout); \`\`\` \*\*\* ### setContent sets the content to be sent with a post request. \`\`\`java request.setContent(String content); \`\`\` \*\*\* ### fetch executes the request and returns a \[\`Response\`\](/scripting/documentation/response.md). \`\`\`java Response response = request.fetch(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/request.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/tile-entity.md). # tile entity {% hint style="info" %} assumes variable \`tileEntity\` is defined. example: \`List tileEntities = world.getTileEntities();\` see also: \[\`world.getTileEntities()\`\](/scripting/documentation/world.md#gettileentities) {% endhint %} ## properties | property | type | description | | -------- | -------- | ------------------------------ | | name | \`String\` | registry name of the block | | type | \`String\` | simple class name of the block | \*\*\* ### getPosition returns the tile entity position as a \[\`Vec3\`\](/scripting/documentation/vec3.md). \`\`\`java Vec3 position = tileEntity.getPosition(); \`\`\` \*\*\* ### getSkullData returns skull metadata when the tile entity is a skull. the array contains \`\[type, rotation, name, uuid\]\`. \`\`\`java Object\[\] skullData = tileEntity.getSkullData(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/tile-entity.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/block.md). # block ## Block \`Block\` represents a block in the world with its properties and metadata. | property | type | description | | ------------ | --------- | ------------------------------------------ | | type | \`String\` | block class name | | name | \`String\` | registry name | | variant | \`int\` | block metadata | | interactable | \`boolean\` | \`true\` if the block can be interacted with | | height | \`double\` | block bounding height | | width | \`double\` | block bounding width | | length | \`double\` | block bounding length | --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/block.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://daikirai.gitbook.io/scripting/documentation/itemstack.md). # itemstack ## ItemStack \`ItemStack\` represents an item with its properties, durability, and metadata. | property | type | description | | ------------- | --------- | ----------------------------- | | type | \`String\` | item class name | | name | \`String\` | registry name | | displayName | \`String\` | display name | | stackSize | \`int\` | current stack size | | maxStackSize | \`int\` | max stack size | | durability | \`int\` | remaining durability | | maxDurability | \`int\` | max durability | | isBlock | \`boolean\` | \`true\` if the item is a block | | meta | \`int\` | item metadata | ### constructor creates a new item stack from a registry name. \`\`\`java ItemStack stack = new ItemStack(String name); \`\`\` \*\*\* ### getEnchantments returns a list of enchantments on the item. \`\`\`java List enchantments = stack.getEnchantments(); \`\`\` \*\*\* ### getTooltip returns the item's tooltip as a list of strings. \`\`\`java List tooltip = stack.getTooltip(); \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter: \`\`\` GET https://daikirai.gitbook.io/scripting/documentation/itemstack.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. ---