Skip to content

Nano Swarm

grandmind edited this page Apr 26, 2015 · 17 revisions

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, it first must be linked to an antenna. To do this, simply right click on an antenna with the swarm in your hand.

Many attribues and actions for the infected entity can be accessed through the nano swarm. ##Functions Functions accessable for both mobs and players.

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

##Player-Only Functions Functions exclusive players.

Function Returns Description
getPlayerName() string name Returns the player's name.
getUUID() string UUID Returns the player's UUID.
getHunger() number foodLevel Returns the player's current food level (hunger).
click(number button) nil Simulates a left click for the player.
clickRelease(number button) nil Simulates the releasing of the left mouse button for the player.
keyPress(string key) nil Simulates a key press for the player.
keyRelease(string key) nil Simulates the releasing of the passed key for the player.
mouseMove(number x, number y) nil Moves the player's mouse to the passed coordinates.
whisper(string message, string senderName) boolean success 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 Description
getEntityName() string name Returns the class name of the entity.
setTarget(string/number name/x, number y, number z) nil 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 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 Sets the movement target of the entity. Either pass a player's name or the coordinates the target.
setTurnAngle(number rotation) nil Sets the entity's rotation yaw.
toggleJumping() boolean success Toggles jumping for the entity.