Nano Swarm

A Nano Swarm is a throwable entity that will infect the first mob it touches. After infecting the mob, a player can control what the infected mob does by communicating with the nano swarm through an antenna. Before a nano swarm can be thrown (or shot by a dispenser), it first must be linked to an antenna. To do this, simply right click on an antenna with the swarm in your hand.

Many attributes and actions for the infected entity can be accessed through the nano swarm. However, the nanobots can only perform a certain amount of actions and gather so much data before they become unusable. By default, the nanobots can only receive 8 instructions before being destroyed. This is configurable in the config file. There is no limit to the amount of bots that can infect and entity, so while the bots will decay with use, this can be remedied by adding ample bots to an entity.

Functions

Functions accessible for both mobs and players.

Function Returns Cost Description
isPlayer() boolean isPlayer 1 Returns whether or not the entity is a player.
hurt() boolean success 1 Hurts the entity.
heal() boolean success 1 Heals the entity.
getHealth() number health 1 Returns the entity's current health.
getMaxHealth() number maxHealth 1 Returns the entity's maximum health.
isDead() boolean isDead 1 Returns whether or not the entity is dead.
getRemainingBots() number remainingBots 0 Returns the number of nanobots left in the entity.
getDisplayName() string name 1 Returns the entity's display name.

Player-Only Functions

Functions exclusive to players.

Function Returns Cost Description
getPlayerName() string name 1 Returns the player's name.
getUUID() string UUID 1 Returns the player's UUID.
getHunger() number foodLevel 1 Returns the player's current food level (hunger).
click(number button) nil 1 Simulates a click for the player.
clickRelease(number button) nil 1 Simulates the releasing of the left mouse button for the player.
keyPress(string key) nil 1 Simulates a key press for the player.
keyRelease(string key) nil 1 Simulates the releasing of the passed key for the player.
mouseMove(number x, number y) nil 1 Moves the player's mouse to the passed coordinates.
whisper(string message, string senderName) boolean success 1 Whispers the passed message to the player. It will appear to come from the passed sender name.

Mob-Only Functions

Functions exclusive to mobs.

Function Returns Cost Description
getEntityName() string name 1 Returns the class name of the entity.
setTarget(string/number name/x, number y, number z) nil 1 Sets the target of the entity. Either pass a player's name or the coordinates the target.
setAttackTarget(string/number name/x, number y, number z) nil 1 Sets the attack target of the entity. Either pass a player's name or the coordinates the target.
setMovementTarget(string/number name/x, number y, number z) nil 1 Sets the movement target of the entity. Either pass a player's name or the coordinates the target.
setTurnAngle(number rotation) nil 1 Sets the entity's rotation yaw.
toggleJumping() boolean success 1 Toggles jumping for the entity.