Grinder
A mob grinder that can utilize any sword, and applies its effects like Fire Aspect or Sharpness Hitting on a 3x3 Area Around it.
Functions | Description |
---|---|
attack() | Attack any living mob around it (apply sword enchantments) |
hasSword() | Returns a boolean if the grinder has a sword in it |
pullSword(from, slot) | Pulls a sword from the target inventory |
pushSword(to) | Pushes a sword to the target inventory |
attack()
Description
Attack any living mob around it (apply sword enchantments)
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation
hasSword()
Description
Returns a boolean if the grinder has a sword in it
Returns
- boolean - If there is any sword in the grinder
pullSword(from, slot)
Description
Pulls a sword from the target inventory
Parameters
- from: string - Inventory from where to get the sword
- slot: number - The slot for the sword
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation
pushSword(to)
Description
Pushes a sword to the target inventory
Parameters
- to: string - Inventory from where to send the sword
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation