You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -974,7 +974,7 @@ Default true, whether or not you receive color codes in chats from the server.
974
974
975
975
#### bot.settings.viewDistance
976
976
977
-
Can be a string listed below or a postive number.
977
+
Can be a string listed below or a positive number.
978
978
Choices:
979
979
*`far` (default)
980
980
*`normal`
@@ -1035,7 +1035,7 @@ saturation of 5.0. Eating food increases the saturation as well as the food bar.
1035
1035
1036
1036
#### bot.oxygenLevel
1037
1037
1038
-
Number in the range [0, 20]respresenting the number of water-icons known as oxygen level.
1038
+
Number in the range [0, 20]representing the number of water-icons known as oxygen level.
1039
1039
1040
1040
#### bot.physics
1041
1041
@@ -1554,7 +1554,7 @@ Fires when a particle is created
1554
1554
1555
1555
#### bot.blockAt(point, extraInfos=true)
1556
1556
1557
-
Returns the block at `point` or `null` if that point is not loaded. If `extraInfos` set to true, also returns informations about signs, paintings and block entities (slower).
1557
+
Returns the block at `point` or `null` if that point is not loaded. If `extraInfos` set to true, also returns information about signs, paintings and block entities (slower).
1558
1558
See `Block`.
1559
1559
1560
1560
#### bot.waitForChunksToLoad()
@@ -1596,8 +1596,8 @@ Finds the closest blocks from the given point.
1596
1596
-`point` - The start position of the search (center). Default is the bot position.
1597
1597
-`matching` - A function that returns true if the given block is a match. Also supports this value being a block id or array of block ids.
1598
1598
-`useExtraInfo` - To preserve backward compatibility can result in two behavior depending on the type
1599
-
-**boolean** - Provide your `matching` function more data - noticeably slower aproach
1600
-
-**function** - Creates two stage maching, if block passes `matching` function it is passed further to `useExtraInfo` with additional info
1599
+
-**boolean** - Provide your `matching` function more data - noticeably slower approach
1600
+
-**function** - Creates two stage matching, if block passes `matching` function it is passed further to `useExtraInfo` with additional info
1601
1601
-`maxDistance` - The furthest distance for the search, defaults to 16.
1602
1602
-`count` - Number of blocks to find before returning the search. Default to 1. Can return less if not enough blocks are found exploring the whole area.
Return the nearest entity to the bot, matching the function (default to all entities). Return null if no entity is found.
1635
1635
1636
1636
Example:
1637
1637
```js
1638
-
constcow=bot.nearestEntity(entity=>entity.name.toLowerCase() ==='cow') // we use .toLowercase() because in 1.8 cow was capitalized, for newer versions that can be ommitted
1638
+
constcow=bot.nearestEntity(entity=>entity.name.toLowerCase() ==='cow') // we use .toLowercase() because in 1.8 cow was capitalized, for newer versions that can be omitted
1639
1639
```
1640
1640
1641
1641
### Methods
@@ -1657,7 +1657,7 @@ Requests chat completion from the server.
1657
1657
*`str` - String to complete.
1658
1658
*`assumeCommand` - Field sent to server, defaults to false.
1659
1659
*`sendBlockInSight` - Field sent to server, defaults to true. Set this option to false if you want more performance.
1660
-
*`timeout` - Timeout in milliseconds, after which the function will return an ampty array, defaults to 5000.
1660
+
*`timeout` - Timeout in milliseconds, after which the function will return an empty array, defaults to 5000.
1661
1661
1662
1662
#### bot.chat(message)
1663
1663
@@ -1683,22 +1683,22 @@ Adds a regex pattern to the bot's chat matching. Useful for bukkit servers where
1683
1683
make an event that is called every time the pattern is matched to a message,
1684
1684
the event will be called `"chat:name"`, with name being the name passed
1685
1685
*`name` - the name used to listen for the event
1686
-
*`pattern` - regular expression to match to messages recieved
1686
+
*`pattern` - regular expression to match to messages received
1687
1687
*`chatPatternOptions` - object
1688
1688
*`repeat` - defaults to true, whether to listen for this event after the first match
1689
1689
*`parse` - instead of returning the actual message that was matched, return the capture groups from the regex
1690
-
*`deprecated` - (**unstable**) used by bot.chatAddPattern to keep compatability, likely to be removed
1690
+
*`deprecated` - (**unstable**) used by bot.chatAddPattern to keep compatibility, likely to be removed
1691
1691
1692
1692
returns a number which can be used with bot.removeChatPattern() to only delete this pattern
Copy file name to clipboardExpand all lines: examples/perfectShotBow.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ bot.on('spawn', function () {
30
30
31
31
// Auto attack every 1,2 secs with bow
32
32
// With crossbow attack when crossbow is charget (enchant 3 = 0.5s)
33
-
// ['snowball', 'ender_pearl', 'egg', 'splash_potion'] auto attack every 0,1 sec, no recomended use autoAttack for these items, instead use "bot.hawkEye.oneShot(target, weapon)"
33
+
// ['snowball', 'ender_pearl', 'egg', 'splash_potion'] auto attack every 0,1 sec, no recommended use autoAttack for these items, instead use "bot.hawkEye.oneShot(target, weapon)"
0 commit comments