@minecraft/server 1.3.0-beta.1.20.0-preview.23 → 1.4.0-beta.1.20.0-preview.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +629 -85
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server",
19
- * "version": "1.3.0-internal.1.20.0-preview.23"
19
+ * "version": "1.4.0-internal.1.20.0-preview.24"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -443,12 +443,7 @@ export class AfterEvents {
443
443
  *
444
444
  */
445
445
  readonly explosion: ExplosionAfterEventSignal;
446
- /**
447
- * @remarks
448
- * This event fires when a chargeable item completes charging.
449
- *
450
- */
451
- readonly itemCompleteCharge: ItemCompleteChargeAfterEventSignal;
446
+ readonly itemCompleteUse: ItemCompleteUseAfterEventSignal;
452
447
  /**
453
448
  * @remarks
454
449
  * For custom items, this event is triggered when the
@@ -458,19 +453,8 @@ export class AfterEvents {
458
453
  *
459
454
  */
460
455
  readonly itemDefinitionEvent: ItemDefinitionAfterEventSignal;
461
- /**
462
- * @remarks
463
- * This event fires when a chargeable item is released from
464
- * charging.
465
- *
466
- */
467
- readonly itemReleaseCharge: ItemReleaseChargeAfterEventSignal;
468
- /**
469
- * @remarks
470
- * This event fires when a chargeable item starts charging.
471
- *
472
- */
473
- readonly itemStartCharge: ItemStartChargeAfterEventSignal;
456
+ readonly itemReleaseUse: ItemReleaseUseAfterEventSignal;
457
+ readonly itemStartUse: ItemStartUseAfterEventSignal;
474
458
  /**
475
459
  * @remarks
476
460
  * This event fires when a player successfully uses an item or
@@ -481,12 +465,7 @@ export class AfterEvents {
481
465
  *
482
466
  */
483
467
  readonly itemStartUseOn: ItemStartUseOnAfterEventSignal;
484
- /**
485
- * @remarks
486
- * This event fires when a chargeable item stops charging.
487
- *
488
- */
489
- readonly itemStopCharge: ItemStopChargeAfterEventSignal;
468
+ readonly itemStopUse: ItemStopUseAfterEventSignal;
490
469
  /**
491
470
  * @remarks
492
471
  * This event fires when a player releases the Use Item / Place
@@ -1072,6 +1051,21 @@ export class BlockLiquidContainerComponent extends BlockComponent {
1072
1051
 
1073
1052
  /**
1074
1053
  * @beta
1054
+ * A BlockLocationIterator returns the next block location of
1055
+ * the block volume across which it is iterating.
1056
+ * The BlockLocationIterator is used to abstract the shape of
1057
+ * the block volume it was fetched from (so it can represent
1058
+ * all the block locations that make up rectangles, cubes,
1059
+ * spheres, lines and complex shapes).
1060
+ * Each iteration pass returns the next valid block location in
1061
+ * the parent shape.
1062
+ * Unless otherwise specified by the parent shape - the
1063
+ * BlockLocationIterator will iterate over a 3D space in the
1064
+ * order of increasing X, followed by increasing Z followed by
1065
+ * increasing Y.
1066
+ * (Effectively stepping across the XZ plane, and when all the
1067
+ * locations in that plane are exhausted, increasing the Y
1068
+ * coordinate to the next XZ slice)
1075
1069
  */
1076
1070
  export class BlockLocationIterator implements Iterable<Vector3> {
1077
1071
  protected constructor();
@@ -1575,79 +1569,139 @@ export class BlockType {
1575
1569
 
1576
1570
  /**
1577
1571
  * @beta
1572
+ * Block Volume Utils is a utility class that provides a number
1573
+ * of useful functions for the creation and utility of {@link
1574
+ * @minecraft-server.BlockVolume} objects
1578
1575
  */
1579
1576
  export class BlockVolumeUtils {
1580
1577
  protected constructor();
1581
1578
  /**
1582
1579
  * @remarks
1580
+ * Check to see if the given location is directly adjacent to
1581
+ * the outer surface of a BlockVolume.
1582
+ *
1583
+ *
1583
1584
  * This function can't be called in read-only mode.
1584
1585
  *
1586
+ * @param volume
1587
+ * The volume to test against
1588
+ * @param pos
1589
+ * The world block location to test
1590
+ * @returns
1591
+ * If the location is either inside or more than 0 blocks away,
1592
+ * the function will return false.
1593
+ * If the location is directly contacting the outer surface of
1594
+ * the BlockVolume, the function will return true.
1585
1595
  */
1586
1596
  static doesLocationTouchFaces(volume: BlockVolume, pos: Vector3): boolean;
1587
1597
  /**
1588
1598
  * @remarks
1599
+ * Check to see if a two block volumes are directly adjacent
1600
+ * and two faces touch.
1601
+ *
1589
1602
  * This function can't be called in read-only mode.
1590
1603
  *
1604
+ * @param volume
1605
+ * The volume to test against
1606
+ * @param other
1607
+ * The volume to test
1608
+ * @returns
1609
+ * If the outer faces of both block volumes touch and are
1610
+ * directly adjacent at any point, return true.
1591
1611
  */
1592
1612
  static doesVolumeTouchFaces(volume: BlockVolume, other: BlockVolume): boolean;
1593
1613
  /**
1594
1614
  * @remarks
1615
+ * Test the equality of two block volumes
1616
+ *
1595
1617
  * This function can't be called in read-only mode.
1596
1618
  *
1619
+ * @returns
1620
+ * Return true if two block volumes are identical
1597
1621
  */
1598
1622
  static equals(volume: BlockVolume, other: BlockVolume): boolean;
1599
1623
  /**
1600
1624
  * @remarks
1625
+ * Fetch a {@link BlockLocationIterator} that represents all of
1626
+ * the block world locations within the specified volume
1627
+ *
1601
1628
  * This function can't be called in read-only mode.
1602
1629
  *
1603
1630
  */
1604
1631
  static getBlockLocationIterator(volume: BlockVolume): BlockLocationIterator;
1605
1632
  /**
1606
1633
  * @remarks
1634
+ * Return a {@link BoundingBox} object which represents the
1635
+ * validated min and max coordinates of the volume
1636
+ *
1607
1637
  * This function can't be called in read-only mode.
1608
1638
  *
1609
1639
  */
1610
1640
  static getBoundingBox(volume: BlockVolume): BoundingBox;
1611
1641
  /**
1612
1642
  * @remarks
1643
+ * Return the capacity (volume) of the BlockVolume (W*D*H)
1644
+ *
1613
1645
  * This function can't be called in read-only mode.
1614
1646
  *
1615
1647
  */
1616
1648
  static getCapacity(volume: BlockVolume): number;
1617
1649
  /**
1618
1650
  * @remarks
1651
+ * Get the largest corner position of the volume (guaranteed to
1652
+ * be >= min)
1653
+ *
1619
1654
  * This function can't be called in read-only mode.
1620
1655
  *
1621
1656
  */
1622
1657
  static getMax(volume: BlockVolume): Vector3;
1623
1658
  /**
1624
1659
  * @remarks
1660
+ * Get the smallest corner position of the volume (guaranteed
1661
+ * to be <= max)
1662
+ *
1625
1663
  * This function can't be called in read-only mode.
1626
1664
  *
1627
1665
  */
1628
1666
  static getMin(volume: BlockVolume): Vector3;
1629
1667
  /**
1630
1668
  * @remarks
1669
+ * Get a {@link Vector3} object where each component represents
1670
+ * the number of blocks along that axis
1671
+ *
1631
1672
  * This function can't be called in read-only mode.
1632
1673
  *
1633
1674
  */
1634
1675
  static getSpan(volume: BlockVolume): Vector3;
1635
1676
  /**
1636
1677
  * @remarks
1678
+ * Return an enumeration which represents the intersection
1679
+ * between two BlockVolume objects
1680
+ *
1637
1681
  * This function can't be called in read-only mode.
1638
1682
  *
1639
1683
  */
1640
1684
  static intersects(volume: BlockVolume, other: BlockVolume): BlockVolumeIntersection;
1641
1685
  /**
1642
1686
  * @remarks
1687
+ * Check to see if a given world block location is inside a
1688
+ * BlockVolume
1689
+ *
1643
1690
  * This function can't be called in read-only mode.
1644
1691
  *
1645
1692
  */
1646
- static isInside(volume: BlockVolume, pos: Vector3): number;
1693
+ static isInside(volume: BlockVolume, pos: Vector3): boolean;
1647
1694
  /**
1648
1695
  * @remarks
1696
+ * Move a BlockVolume by a specified amount
1697
+ *
1649
1698
  * This function can't be called in read-only mode.
1650
1699
  *
1700
+ * @param delta
1701
+ * Amount of blocks to move by
1702
+ * @returns
1703
+ * Returns a new BlockVolume object which represents the new
1704
+ * volume
1651
1705
  */
1652
1706
  static translate(volume: BlockVolume, delta: Vector3): BlockVolume;
1653
1707
  }
@@ -1697,74 +1751,130 @@ export class BlockWaterContainerComponent extends BlockLiquidContainerComponent
1697
1751
 
1698
1752
  /**
1699
1753
  * @beta
1754
+ * Bounding Box Utils is a utility class that provides a number
1755
+ * of useful functions for the creation and utility of {@link
1756
+ * @minecraft-server.BoundingBox} objects
1700
1757
  */
1701
1758
  export class BoundingBoxUtils {
1702
1759
  protected constructor();
1703
1760
  /**
1704
1761
  * @remarks
1762
+ * Create a validated instance of a {@link
1763
+ * @minecraft-server.BoundingBox} where the min and max
1764
+ * components are guaranteed to be (min <= max)
1765
+ *
1705
1766
  * This function can't be called in read-only mode.
1706
1767
  *
1768
+ * @param min
1769
+ * A corner world location
1770
+ * @param max
1771
+ * A corner world location diametrically opposite
1707
1772
  */
1708
1773
  static createValid(min: Vector3, max: Vector3): BoundingBox;
1709
1774
  /**
1710
1775
  * @remarks
1776
+ * Expand a {@link @minecraft-server.BoundingBox} by a given
1777
+ * amount along each axis.
1778
+ * Sizes can be negative to perform contraction.
1779
+ * Note: corners can be inverted if the contraction size is
1780
+ * greater than the span, but the min/max relationship will
1781
+ * remain correct
1782
+ *
1711
1783
  * This function can't be called in read-only mode.
1712
1784
  *
1785
+ * @returns
1786
+ * Return a new {@link @minecraft-server.BoundingBox} object
1787
+ * representing the changes
1713
1788
  */
1714
1789
  static dilate(box: BoundingBox, size: Vector3): BoundingBox;
1715
1790
  /**
1716
1791
  * @remarks
1792
+ * Check if two {@link @minecraft-server.BoundingBox} objects
1793
+ * are identical
1794
+ *
1717
1795
  * This function can't be called in read-only mode.
1718
1796
  *
1719
1797
  */
1720
1798
  static equals(box: BoundingBox, other: BoundingBox): boolean;
1721
1799
  /**
1722
1800
  * @remarks
1801
+ * Expand the initial box object bounds to include the 2nd box
1802
+ * argument. The resultant {@link
1803
+ * @minecraft-server.BoundingBox} object will be a BoundingBox
1804
+ * which exactly encompasses the two boxes.
1805
+ *
1723
1806
  * This function can't be called in read-only mode.
1724
1807
  *
1808
+ * @returns
1809
+ * A new {@link @minecraft-server.BoundingBox} instance
1810
+ * representing the smallest possible bounding box which can
1811
+ * encompass both
1725
1812
  */
1726
1813
  static expand(box: BoundingBox, other: BoundingBox): BoundingBox;
1727
1814
  /**
1728
1815
  * @remarks
1816
+ * Calculate the center block of a given {@link
1817
+ * @minecraft-server.BoundingBox} object.
1818
+ *
1729
1819
  * This function can't be called in read-only mode.
1730
1820
  *
1821
+ * @returns
1822
+ * Note that {@link @minecraft-server.BoundingBox} objects
1823
+ * represent whole blocks, so the center of boxes which have
1824
+ * odd numbered bounds are not mathematically centered...
1825
+ * i.e. a BoundingBox( 0,0,0 -> 3,3,3 ) would have a center of
1826
+ * (1,1,1) (not (1.5, 1.5, 1.5) as expected)
1731
1827
  */
1732
1828
  static getCenter(box: BoundingBox): Vector3;
1733
1829
  /**
1734
1830
  * @remarks
1831
+ * Calculate the BoundingBox which represents the union area of
1832
+ * two intersecting BoundingBoxes
1833
+ *
1735
1834
  * This function can't be called in read-only mode.
1736
1835
  *
1737
- * @throws This function can throw errors.
1738
1836
  */
1739
- static getIntersection(box: BoundingBox, other: BoundingBox): BoundingBox;
1837
+ static getIntersection(box: BoundingBox, other: BoundingBox): BoundingBox | undefined;
1740
1838
  /**
1741
1839
  * @remarks
1840
+ * Get the Span of each of the BoundingBox Axis components
1841
+ *
1742
1842
  * This function can't be called in read-only mode.
1743
1843
  *
1744
1844
  */
1745
1845
  static getSpan(box: BoundingBox): Vector3;
1746
1846
  /**
1747
1847
  * @remarks
1848
+ * Check to see if two BoundingBox objects intersect
1849
+ *
1748
1850
  * This function can't be called in read-only mode.
1749
1851
  *
1750
1852
  */
1751
1853
  static intersects(box: BoundingBox, other: BoundingBox): boolean;
1752
1854
  /**
1753
1855
  * @remarks
1856
+ * Check to see if a given coordinate is inside a BoundingBox
1857
+ *
1754
1858
  * This function can't be called in read-only mode.
1755
1859
  *
1756
1860
  */
1757
1861
  static isInside(box: BoundingBox, pos: Vector3): boolean;
1758
1862
  /**
1759
1863
  * @remarks
1864
+ * Check to see if a BoundingBox is valid (i.e. (min <= max))
1865
+ *
1760
1866
  * This function can't be called in read-only mode.
1761
1867
  *
1762
1868
  */
1763
1869
  static isValid(box: BoundingBox): boolean;
1764
1870
  /**
1765
1871
  * @remarks
1872
+ * Move a BoundingBox by a given amount
1873
+ *
1766
1874
  * This function can't be called in read-only mode.
1767
1875
  *
1876
+ * @returns
1877
+ * Return a new BoundingBox object which represents the change
1768
1878
  */
1769
1879
  static translate(box: BoundingBox, delta: Vector3): BoundingBox;
1770
1880
  }
@@ -1902,74 +2012,164 @@ export class Component {
1902
2012
 
1903
2013
  /**
1904
2014
  * @beta
2015
+ * The Compound Block Volume is a collection of individual
2016
+ * block volume definitions which, as a collection, define a
2017
+ * larger volume of (sometimes non-contiguous) irregular
2018
+ * shapes.
2019
+ * This class is loosely based on the concept of CSG
2020
+ * (Computational Solid Geometry) and allows a user to create
2021
+ * complex volumes by building a stack of volumes and voids to
2022
+ * make a larger single volume.
2023
+ * For example - normally a creator would create a hollow cube
2024
+ * by creating 6 "wall" surfaces for each face.
2025
+ * With a Compound Block Volume, a creator can define a hollow
2026
+ * cube by creating a single outer solid cube, and then
2027
+ * defining a further single 'void' cube inside the larger one.
2028
+ * Similarly, the Compound Block Volume can represent irregular
2029
+ * shaped volumes (e.g. a tree consists of a trunk and lots of
2030
+ * leaf cubes which are not necessarily contiguously placed)
1905
2031
  */
1906
2032
  export class CompoundBlockVolume {
2033
+ /**
2034
+ * @remarks
2035
+ * Return the 'capacity' of the bounding rectangle which
2036
+ * represents the collection of volumes in the stack
2037
+ *
2038
+ */
1907
2039
  readonly capacity: number;
2040
+ /**
2041
+ * @remarks
2042
+ * Return the number of volumes (positive and negative) in the
2043
+ * volume stack
2044
+ *
2045
+ */
1908
2046
  readonly volumeCount: number;
1909
2047
  /**
1910
2048
  * @remarks
2049
+ * Clear the contents of the volume stack
2050
+ *
1911
2051
  * This function can't be called in read-only mode.
1912
2052
  *
1913
2053
  */
1914
2054
  clear(): void;
1915
2055
  /**
1916
2056
  * @remarks
2057
+ * Fetch a Block Location Iterator for the Compound Block
2058
+ * Volume. This iterator will allow a creator to iterate
2059
+ * across all of the selected volumes within the larger
2060
+ * bounding area.
2061
+ * Areas of a volume which have been overridden by a
2062
+ * subtractive volume will not be included in the iterator
2063
+ * step.
2064
+ * (i.e. if you push a cube to the stack, and then push a
2065
+ * subtractive volume to the same location, then the iterator
2066
+ * will step over the initial volume because it is considered
2067
+ * negative space)
2068
+ *
2069
+ *
1917
2070
  * This function can't be called in read-only mode.
1918
2071
  *
1919
2072
  */
1920
2073
  getBlockLocationIterator(): BlockLocationIterator;
1921
2074
  /**
1922
2075
  * @remarks
2076
+ * Get the largest bounding box that represents a container for
2077
+ * all of the volumes on the stack
2078
+ *
1923
2079
  * This function can't be called in read-only mode.
1924
2080
  *
1925
2081
  */
1926
2082
  getBoundingBox(): BoundingBox;
1927
2083
  /**
1928
2084
  * @remarks
2085
+ * Get the max block location of the outermost bounding
2086
+ * rectangle which represents the volumes on the stack
2087
+ *
1929
2088
  * This function can't be called in read-only mode.
1930
2089
  *
1931
2090
  */
1932
2091
  getMax(): Vector3;
1933
2092
  /**
1934
2093
  * @remarks
2094
+ * Get the min block location of the outermost bounding
2095
+ * rectangle which represents the volumes on the stack
2096
+ *
1935
2097
  * This function can't be called in read-only mode.
1936
2098
  *
1937
2099
  */
1938
2100
  getMin(): Vector3;
1939
2101
  /**
1940
2102
  * @remarks
2103
+ * Return a boolean representing whether or not a given block
2104
+ * location is inside a positive block volume.
2105
+ * E.g. if the stack contains a large cube followed by a
2106
+ * slightly smaller negative cube, and the test location is
2107
+ * within the negative cube - the function will return false
2108
+ * because it's not 'inside' a volume (it IS inside the
2109
+ * bounding rectangle, but it is not inside a positively
2110
+ * defined location)
2111
+ *
1941
2112
  * This function can't be called in read-only mode.
1942
2113
  *
2114
+ * @param delta
2115
+ * block location to test
1943
2116
  */
1944
2117
  isInside(delta: Vector3): boolean;
1945
2118
  /**
1946
2119
  * @remarks
2120
+ * Inspect the last entry pushed to the volume stack without
2121
+ * affecting the stack contents
2122
+ *
1947
2123
  * This function can't be called in read-only mode.
1948
2124
  *
2125
+ * @returns
2126
+ * Returns undefined if the stack is empty
1949
2127
  */
1950
2128
  peekLastVolume(): CompoundBlockVolumeItem | undefined;
1951
2129
  /**
1952
2130
  * @remarks
2131
+ * Remove the last entry from the volume stack. This will
2132
+ * reduce the stack size by one
2133
+ *
1953
2134
  * This function can't be called in read-only mode.
1954
2135
  *
1955
2136
  */
1956
2137
  popVolume(): boolean;
1957
2138
  /**
1958
2139
  * @remarks
2140
+ * Push a volume item to the stack. The volume item contains
2141
+ * an 'action' parameter which determines whether this volume
2142
+ * is a positive or negative space
2143
+ *
1959
2144
  * This function can't be called in read-only mode.
1960
2145
  *
2146
+ * @param item
2147
+ * Item to push to the end of the stack
1961
2148
  */
1962
2149
  pushVolume(item: CompoundBlockVolumeItem): void;
1963
2150
  /**
1964
2151
  * @remarks
2152
+ * If the volume stack is empty, this function will push the
2153
+ * specified item to the stack.
2154
+ * If the volume stack is NOT empty, this function will replace
2155
+ * the last item on the stack with the new item.
2156
+ *
1965
2157
  * This function can't be called in read-only mode.
1966
2158
  *
2159
+ * @param item
2160
+ * Item to add or replace
1967
2161
  */
1968
2162
  replaceOrAddLastVolume(item: CompoundBlockVolumeItem): boolean;
1969
2163
  /**
1970
2164
  * @remarks
2165
+ * Move the root block location of the volume by a given
2166
+ * amount. This effectively adds the specified delta to the
2167
+ * block location of all of the volumes in the stack
2168
+ *
1971
2169
  * This function can't be called in read-only mode.
1972
2170
  *
2171
+ * @param delta
2172
+ * Amount to move
1973
2173
  */
1974
2174
  translate(delta: Vector3): void;
1975
2175
  }
@@ -2188,6 +2388,13 @@ export class ContainerSlot {
2188
2388
  * Throws if the slot's container is invalid.
2189
2389
  */
2190
2390
  readonly isStackable: boolean;
2391
+ /**
2392
+ * @remarks
2393
+ * Returns whether the ContainerSlot is valid. The container
2394
+ * slot is valid if the container exists and is loaded, and the
2395
+ * slot index is valid.
2396
+ *
2397
+ */
2191
2398
  readonly isValid: boolean;
2192
2399
  /**
2193
2400
  * @remarks
@@ -2256,12 +2463,11 @@ export class ContainerSlot {
2256
2463
  * Creates an exact copy of the item stack, including any
2257
2464
  * custom data or properties.
2258
2465
  *
2259
- * This function can't be called in read-only mode.
2260
- *
2261
- * @throws
2262
- * Throws if the slot's container is invalid.
2466
+ * @returns
2467
+ * Returns a copy of the item in the slot. Returns undefined if
2468
+ * the slot is empty.
2469
+ * @throws This function can throw errors.
2263
2470
  */
2264
- clone(): ItemStack;
2265
2471
  getItem(): ItemStack | undefined;
2266
2472
  /**
2267
2473
  * @remarks
@@ -2275,7 +2481,27 @@ export class ContainerSlot {
2275
2481
  * Throws if the slot's container is invalid.
2276
2482
  */
2277
2483
  getLore(): string[];
2484
+ /**
2485
+ * @remarks
2486
+ * Returns all tags for the item in the slot.
2487
+ *
2488
+ * @returns
2489
+ * Returns all tags for the item in the slot. Return an empty
2490
+ * array if the the slot is empty.
2491
+ * @throws This function can throw errors.
2492
+ */
2278
2493
  getTags(): string[];
2494
+ /**
2495
+ * @remarks
2496
+ * Returns whether the item in the slot slot has the given tag.
2497
+ *
2498
+ * @param tag
2499
+ * The item tag.
2500
+ * @returns
2501
+ * Returns false when the slot is empty or the item in the slot
2502
+ * does not have the given tag.
2503
+ * @throws This function can throw errors.
2504
+ */
2279
2505
  hasTag(tag: string): boolean;
2280
2506
  /**
2281
2507
  * @remarks
@@ -2285,6 +2511,11 @@ export class ContainerSlot {
2285
2511
  * item stacks. The amount of each item stack is not taken into
2286
2512
  * consideration.
2287
2513
  *
2514
+ * @param itemStack
2515
+ * The ItemStack that is being compared.
2516
+ * @returns
2517
+ * Returns whether this item stack can be stacked with the
2518
+ * given `itemStack`.
2288
2519
  * @throws
2289
2520
  * Throws if the slot's container is invalid.
2290
2521
  */
@@ -2297,6 +2528,8 @@ export class ContainerSlot {
2297
2528
  *
2298
2529
  * This function can't be called in read-only mode.
2299
2530
  *
2531
+ * @param blockIdentifiers
2532
+ * The list of blocks, given by their identifiers.
2300
2533
  * @throws
2301
2534
  * Throws if the slot's container is invalid. Also throws if
2302
2535
  * any of the provided block identifiers are invalid.
@@ -2311,6 +2544,8 @@ export class ContainerSlot {
2311
2544
  *
2312
2545
  * This function can't be called in read-only mode.
2313
2546
  *
2547
+ * @param blockIdentifiers
2548
+ * The list of blocks, given by their identifiers.
2314
2549
  * @throws
2315
2550
  * Throws if the slot's container is invalid. Also throws if
2316
2551
  * any of the provided block identifiers are invalid.
@@ -2318,8 +2553,13 @@ export class ContainerSlot {
2318
2553
  setCanPlaceOn(blockIdentifiers?: string[]): void;
2319
2554
  /**
2320
2555
  * @remarks
2556
+ * Sets the given ItemStack in the slot, replacing any existing
2557
+ * item.
2558
+ *
2321
2559
  * This function can't be called in read-only mode.
2322
2560
  *
2561
+ * @param itemStack
2562
+ * The ItemStack to be placed in the slot.
2323
2563
  * @throws This function can throw errors.
2324
2564
  */
2325
2565
  setItem(itemStack?: ItemStack): void;
@@ -2330,6 +2570,9 @@ export class ContainerSlot {
2330
2570
  *
2331
2571
  * This function can't be called in read-only mode.
2332
2572
  *
2573
+ * @param loreList
2574
+ * A list of lore strings. Setting this argument to undefined
2575
+ * will clear the lore.
2333
2576
  * @throws
2334
2577
  * Throws if the slot's container is invalid.
2335
2578
  */
@@ -2827,21 +3070,21 @@ export class DynamicPropertiesDefinition {
2827
3070
  *
2828
3071
  * @throws This function can throw errors.
2829
3072
  */
2830
- defineBoolean(identifier: string): DynamicPropertiesDefinition;
3073
+ defineBoolean(identifier: string, defaultValue?: boolean): DynamicPropertiesDefinition;
2831
3074
  /**
2832
3075
  * @remarks
2833
3076
  * Defines a number dynamic property.
2834
3077
  *
2835
3078
  * @throws This function can throw errors.
2836
3079
  */
2837
- defineNumber(identifier: string): DynamicPropertiesDefinition;
3080
+ defineNumber(identifier: string, defaultValue?: number): DynamicPropertiesDefinition;
2838
3081
  /**
2839
3082
  * @remarks
2840
3083
  * Defines a string dynamic property.
2841
3084
  *
2842
3085
  * @throws This function can throw errors.
2843
3086
  */
2844
- defineString(identifier: string, maxLength: number): DynamicPropertiesDefinition;
3087
+ defineString(identifier: string, maxLength: number, defaultValue?: string): DynamicPropertiesDefinition;
2845
3088
  }
2846
3089
 
2847
3090
  /**
@@ -3172,6 +3415,16 @@ export class Entity {
3172
3415
  * @throws This property can throw when used.
3173
3416
  */
3174
3417
  readonly dimension: Dimension;
3418
+ /**
3419
+ * @beta
3420
+ * @remarks
3421
+ * The distance an entity has fallen. The value is reset when
3422
+ * the entity is teleported. The value is always 1 when gliding
3423
+ * with Elytra.
3424
+ *
3425
+ * @throws This property can throw when used.
3426
+ */
3427
+ readonly fallDistance: number;
3175
3428
  /**
3176
3429
  * @remarks
3177
3430
  * Unique identifier of the entity. This identifier is intended
@@ -3182,6 +3435,41 @@ export class Entity {
3182
3435
  * @throws This property can throw when used.
3183
3436
  */
3184
3437
  readonly id: string;
3438
+ /**
3439
+ * @beta
3440
+ * @remarks
3441
+ * Whether the entity is touching a climbable block. For
3442
+ * example, a player next to a ladder or a spider next to a
3443
+ * stone wall.
3444
+ *
3445
+ * @throws This property can throw when used.
3446
+ */
3447
+ readonly isClimbing: boolean;
3448
+ /**
3449
+ * @beta
3450
+ * @remarks
3451
+ * Whether the entity has a fall distance greater than 0, or
3452
+ * greater than 1 while gliding.
3453
+ *
3454
+ * @throws This property can throw when used.
3455
+ */
3456
+ readonly isFalling: boolean;
3457
+ /**
3458
+ * @beta
3459
+ * @remarks
3460
+ * Whether any part of the entity is inside a water block.
3461
+ *
3462
+ * @throws This property can throw when used.
3463
+ */
3464
+ readonly isInWater: boolean;
3465
+ /**
3466
+ * @beta
3467
+ * @remarks
3468
+ * Whether the entity is on top of a solid block.
3469
+ *
3470
+ * @throws This property can throw when used.
3471
+ */
3472
+ readonly isOnGround: boolean;
3185
3473
  /**
3186
3474
  * @beta
3187
3475
  * @remarks
@@ -3192,6 +3480,25 @@ export class Entity {
3192
3480
  *
3193
3481
  */
3194
3482
  isSneaking: boolean;
3483
+ /**
3484
+ * @beta
3485
+ * @remarks
3486
+ * Whether the entity is sprinting. For example, a player using
3487
+ * the sprint action, an ocelot running away or a pig boosting
3488
+ * with Carrot on a Stick.
3489
+ *
3490
+ * @throws This property can throw when used.
3491
+ */
3492
+ readonly isSprinting: boolean;
3493
+ /**
3494
+ * @beta
3495
+ * @remarks
3496
+ * Whether the entity is in the swimming state. For example, a
3497
+ * player using the swim action or a fish in water.
3498
+ *
3499
+ * @throws This property can throw when used.
3500
+ */
3501
+ readonly isSwimming: boolean;
3195
3502
  /**
3196
3503
  * @beta
3197
3504
  * @remarks
@@ -3256,9 +3563,14 @@ export class Entity {
3256
3563
  * @param duration
3257
3564
  * Amount of time, in ticks, for the effect to apply. There are
3258
3565
  * 20 ticks per second. Use {@link TicksPerSecond} constant to
3259
- * convert between ticks and seconds.
3566
+ * convert between ticks and seconds. The value must be within
3567
+ * the range [0, 20000000].
3260
3568
  * @param options
3261
3569
  * Additional options for the effect.
3570
+ * @returns
3571
+ * Returns true if the effect was added successfully. This can
3572
+ * fail if the duration or amplifier are outside of the valid
3573
+ * ranges.
3262
3574
  * @throws This function can throw errors.
3263
3575
  * @example addEffect.js
3264
3576
  * ```typescript
@@ -3301,6 +3613,9 @@ export class Entity {
3301
3613
  *
3302
3614
  * @param tag
3303
3615
  * Content of the tag to add.
3616
+ * @returns
3617
+ * Returns true if the tag was added successfully. This can
3618
+ * fail if the tag already exists on the entity.
3304
3619
  * @throws This function can throw errors.
3305
3620
  */
3306
3621
  addTag(tag: string): boolean;
@@ -3317,6 +3632,10 @@ export class Entity {
3317
3632
  * Additional options about the source of damage, which may add
3318
3633
  * additional effects or spur additional behaviors on this
3319
3634
  * entity.
3635
+ * @returns
3636
+ * Whether the entity takes any damage. This can return false
3637
+ * if the entity is invulnerable or if the damage applied is
3638
+ * less than or equal to 0.
3320
3639
  * @throws This function can throw errors.
3321
3640
  */
3322
3641
  applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
@@ -3375,6 +3694,8 @@ export class Entity {
3375
3694
  * @param useEffects
3376
3695
  * Whether to show any visual effects connected to the
3377
3696
  * extinguishing.
3697
+ * @returns
3698
+ * Returns whether the entity was on fire.
3378
3699
  * @throws This function can throw errors.
3379
3700
  */
3380
3701
  extinguishFire(useEffects?: boolean): boolean;
@@ -3384,6 +3705,11 @@ export class Entity {
3384
3705
  * Returns the first intersecting block from the direction that
3385
3706
  * this entity is looking at.
3386
3707
  *
3708
+ * @param options
3709
+ * Additional configuration options for the ray cast.
3710
+ * @returns
3711
+ * Returns the first intersecting block from the direction that
3712
+ * this entity is looking at.
3387
3713
  * @throws This function can throw errors.
3388
3714
  */
3389
3715
  getBlockFromViewDirection(options?: BlockRaycastOptions): Block;
@@ -3398,6 +3724,9 @@ export class Entity {
3398
3724
  * to retrieve. If no namespace prefix is specified,
3399
3725
  * 'minecraft:' is assumed. If the component is not present on
3400
3726
  * the entity, undefined is returned.
3727
+ * @returns
3728
+ * Returns the component if it exists on the entity, otherwise
3729
+ * undefined.
3401
3730
  */
3402
3731
  getComponent(componentId: string): EntityComponent | undefined;
3403
3732
  /**
@@ -3406,6 +3735,9 @@ export class Entity {
3406
3735
  * Returns all components that are both present on this entity
3407
3736
  * and supported by the API.
3408
3737
  *
3738
+ * @returns
3739
+ * Returns all components that are both present on this entity
3740
+ * and supported by the API.
3409
3741
  */
3410
3742
  getComponents(): EntityComponent[];
3411
3743
  /**
@@ -3413,6 +3745,8 @@ export class Entity {
3413
3745
  * @remarks
3414
3746
  * Returns a property value.
3415
3747
  *
3748
+ * @param identifier
3749
+ * The property identifier.
3416
3750
  * @returns
3417
3751
  * Returns the value for the property, or undefined if the
3418
3752
  * property has not been set.
@@ -3425,6 +3759,8 @@ export class Entity {
3425
3759
  * Returns the effect for the specified EffectType on the
3426
3760
  * entity, or undefined if the effect is not present.
3427
3761
  *
3762
+ * @param effectType
3763
+ * The effect identifier.
3428
3764
  * @returns
3429
3765
  * Effect object for the specified effect, or undefined if the
3430
3766
  * effect is not present.
@@ -3444,9 +3780,14 @@ export class Entity {
3444
3780
  /**
3445
3781
  * @beta
3446
3782
  * @remarks
3447
- * Returns a potential set of entities from the direction that
3448
- * this entity is looking at.
3783
+ * Gets the entities that this entity is looking at by
3784
+ * performing a ray cast from the view of this entity.
3449
3785
  *
3786
+ * @param options
3787
+ * Additional configuration options for the ray cast.
3788
+ * @returns
3789
+ * Returns a set of entities from the direction that this
3790
+ * entity is looking at.
3450
3791
  * @throws This function can throw errors.
3451
3792
  */
3452
3793
  getEntitiesFromViewDirection(options?: EntityRaycastOptions): Entity[];
@@ -3456,6 +3797,9 @@ export class Entity {
3456
3797
  * Returns the current location of the head component of this
3457
3798
  * entity.
3458
3799
  *
3800
+ * @returns
3801
+ * Returns the current location of the head component of this
3802
+ * entity.
3459
3803
  * @throws This function can throw errors.
3460
3804
  */
3461
3805
  getHeadLocation(): Vector3;
@@ -3464,6 +3808,8 @@ export class Entity {
3464
3808
  * @remarks
3465
3809
  * Returns the current rotation component of this entity.
3466
3810
  *
3811
+ * @returns
3812
+ * Returns the current rotation component of this entity.
3467
3813
  * @throws This function can throw errors.
3468
3814
  */
3469
3815
  getRotation(): Vector2;
@@ -3472,6 +3818,8 @@ export class Entity {
3472
3818
  * @remarks
3473
3819
  * Returns all tags associated with an entity.
3474
3820
  *
3821
+ * @returns
3822
+ * Returns the current rotation component of this entity.
3475
3823
  * @throws This function can throw errors.
3476
3824
  */
3477
3825
  getTags(): string[];
@@ -3480,6 +3828,8 @@ export class Entity {
3480
3828
  * @remarks
3481
3829
  * Returns the current velocity vector of the entity.
3482
3830
  *
3831
+ * @returns
3832
+ * Returns the current velocity vector of the entity.
3483
3833
  * @throws This function can throw errors.
3484
3834
  */
3485
3835
  getVelocity(): Vector3;
@@ -3488,6 +3838,8 @@ export class Entity {
3488
3838
  * @remarks
3489
3839
  * Returns the current view direction of the entity.
3490
3840
  *
3841
+ * @returns
3842
+ * Returns the current view direction of the entity.
3491
3843
  * @throws This function can throw errors.
3492
3844
  */
3493
3845
  getViewDirection(): Vector3;
@@ -3501,15 +3853,20 @@ export class Entity {
3501
3853
  * The identifier of the component (e.g., 'minecraft:rideable')
3502
3854
  * to retrieve. If no namespace prefix is specified,
3503
3855
  * 'minecraft:' is assumed.
3856
+ * @returns
3857
+ * Returns true if the specified component is present on this
3858
+ * entity.
3504
3859
  */
3505
3860
  hasComponent(componentId: string): boolean;
3506
3861
  /**
3507
3862
  * @beta
3508
3863
  * @remarks
3509
- * Tests whether an entity has a particular tag.
3864
+ * Returns whether an entity has a particular tag.
3510
3865
  *
3511
3866
  * @param tag
3512
3867
  * Identifier of the tag to test for.
3868
+ * @returns
3869
+ * Returns whether an entity has a particular tag.
3513
3870
  * @throws This function can throw errors.
3514
3871
  */
3515
3872
  hasTag(tag: string): boolean;
@@ -3529,8 +3886,15 @@ export class Entity {
3529
3886
  /**
3530
3887
  * @beta
3531
3888
  * @remarks
3889
+ * Cause the entity to play the given animation.
3890
+ *
3532
3891
  * This function can't be called in read-only mode.
3533
3892
  *
3893
+ * @param animationName
3894
+ * The animation identifier. e.g. animation.creeper.swelling
3895
+ * @param options
3896
+ * Additional options to control the playback and transitions
3897
+ * of the animation.
3534
3898
  * @throws This function can throw errors.
3535
3899
  */
3536
3900
  playAnimation(animationName: string, options?: PlayAnimationOptions): void;
@@ -3539,6 +3903,10 @@ export class Entity {
3539
3903
  * @remarks
3540
3904
  * Removes a specified property.
3541
3905
  *
3906
+ * @param identifier
3907
+ * The property identifier.
3908
+ * @returns
3909
+ * Returns whether the given property existed on the entity.
3542
3910
  * @throws This function can throw errors.
3543
3911
  */
3544
3912
  removeDynamicProperty(identifier: string): boolean;
@@ -3550,6 +3918,8 @@ export class Entity {
3550
3918
  *
3551
3919
  * This function can't be called in read-only mode.
3552
3920
  *
3921
+ * @param effectType
3922
+ * The effect identifier.
3553
3923
  * @returns
3554
3924
  * Returns true if the effect has been removed and false if the
3555
3925
  * effect is not present.
@@ -3565,6 +3935,8 @@ export class Entity {
3565
3935
  *
3566
3936
  * @param tag
3567
3937
  * Content of the tag to remove.
3938
+ * @returns
3939
+ * Returns whether the tag existed on the entity.
3568
3940
  * @throws This function can throw errors.
3569
3941
  */
3570
3942
  removeTag(tag: string): boolean;
@@ -3575,6 +3947,12 @@ export class Entity {
3575
3947
  *
3576
3948
  * This function can't be called in read-only mode.
3577
3949
  *
3950
+ * @param commandString
3951
+ * The command string. Note: This should not include a leading
3952
+ * forward slash.
3953
+ * @returns
3954
+ * A command result containing whether the command was
3955
+ * successful.
3578
3956
  * @throws This function can throw errors.
3579
3957
  */
3580
3958
  runCommand(commandString: string): CommandResult;
@@ -3598,6 +3976,8 @@ export class Entity {
3598
3976
  * @remarks
3599
3977
  * Sets a specified property to a value.
3600
3978
  *
3979
+ * @param identifier
3980
+ * The property identifier.
3601
3981
  * @param value
3602
3982
  * Data value of the property to set.
3603
3983
  * @throws This function can throw errors.
@@ -3614,6 +3994,14 @@ export class Entity {
3614
3994
  *
3615
3995
  * @param seconds
3616
3996
  * Length of time to set the entity on fire.
3997
+ * @param useEffects
3998
+ * Whether side-effects should be applied (e.g. thawing freeze)
3999
+ * and other conditions such as rain or fire protection should
4000
+ * be taken into consideration.
4001
+ * @returns
4002
+ * Whether the entity was set on fire. This can fail if seconds
4003
+ * is less than or equal to zero, the entity is wet or the
4004
+ * entity is immune to fire.
3617
4005
  * @throws This function can throw errors.
3618
4006
  */
3619
4007
  setOnFire(seconds: number, useEffects?: boolean): boolean;
@@ -3624,6 +4012,10 @@ export class Entity {
3624
4012
  *
3625
4013
  * This function can't be called in read-only mode.
3626
4014
  *
4015
+ * @param rotation
4016
+ * The x and y rotation of the entity. For most mobs, the x
4017
+ * rotation controls the head tilt and the y rotation controls
4018
+ * the body rotation.
3627
4019
  * @throws This function can throw errors.
3628
4020
  */
3629
4021
  setRotation(rotation: Vector2): void;
@@ -3636,6 +4028,8 @@ export class Entity {
3636
4028
  *
3637
4029
  * @param location
3638
4030
  * New location for the entity.
4031
+ * @param teleportOptions
4032
+ * Options regarding the teleport operation.
3639
4033
  * @throws This function can throw errors.
3640
4034
  */
3641
4035
  teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
@@ -3668,6 +4062,10 @@ export class Entity {
3668
4062
  * Location to teleport the entity to.
3669
4063
  * @param teleportOptions
3670
4064
  * Options regarding the teleport operation.
4065
+ * @returns
4066
+ * Returns whether the teleport succeeded. This can fail if the
4067
+ * destination chunk is unloaded or if the teleport would
4068
+ * result in intersecting with blocks.
3671
4069
  * @throws This function can throw errors.
3672
4070
  */
3673
4071
  tryTeleport(location: Vector3, teleportOptions?: TeleportOptions): boolean;
@@ -3758,8 +4156,10 @@ export class EntityAgeableComponent extends EntityComponent {
3758
4156
  */
3759
4157
  export class EntityAttributeComponent extends EntityComponent {
3760
4158
  protected constructor();
3761
- readonly current: number;
3762
- readonly value: number;
4159
+ readonly currentValue: number;
4160
+ readonly defaultValue: number;
4161
+ readonly effectiveMax: number;
4162
+ readonly effectiveMin: number;
3763
4163
  /**
3764
4164
  * @remarks
3765
4165
  * This function can't be called in read-only mode.
@@ -3787,7 +4187,7 @@ export class EntityAttributeComponent extends EntityComponent {
3787
4187
  *
3788
4188
  * @throws This function can throw errors.
3789
4189
  */
3790
- setCurrent(value: number): boolean;
4190
+ setCurrentValue(value: number): boolean;
3791
4191
  }
3792
4192
 
3793
4193
  /**
@@ -4025,28 +4425,51 @@ export class EntityDieAfterEventSignal extends IEntityDieAfterEventSignal {
4025
4425
 
4026
4426
  /**
4027
4427
  * @beta
4428
+ * Provides access to a mob's equipment slots. This component
4429
+ * exists for all mob entities.
4028
4430
  */
4029
4431
  export class EntityEquipmentInventoryComponent extends EntityComponent {
4030
4432
  protected constructor();
4031
4433
  static readonly componentId = 'minecraft:equipment_inventory';
4032
4434
  /**
4033
4435
  * @remarks
4436
+ * Gets the equipped item for the given EquipmentSlot.
4437
+ *
4034
4438
  * This function can't be called in read-only mode.
4035
4439
  *
4440
+ * @param equipmentSlot
4441
+ * The equipment slot. e.g. "head", "chest", "offhand"
4442
+ * @returns
4443
+ * Returns the item equipped to the given EquipmentSlot. If
4444
+ * empty, returns undefined.
4036
4445
  * @throws This function can throw errors.
4037
4446
  */
4038
4447
  getEquipment(equipmentSlot: EquipmentSlot): ItemStack | undefined;
4039
4448
  /**
4040
4449
  * @remarks
4450
+ * Gets the ContainerSlot corresponding to the given
4451
+ * EquipmentSlot.
4452
+ *
4041
4453
  * This function can't be called in read-only mode.
4042
4454
  *
4455
+ * @param equipmentSlot
4456
+ * The equipment slot. e.g. "head", "chest", "offhand".
4457
+ * @returns
4458
+ * Returns the ContainerSlot corresponding to the given
4459
+ * EquipmentSlot.
4043
4460
  * @throws This function can throw errors.
4044
4461
  */
4045
4462
  getEquipmentSlot(equipmentSlot: EquipmentSlot): ContainerSlot;
4046
4463
  /**
4047
4464
  * @remarks
4465
+ * Replaces the item in the given EquipmentSlot.
4466
+ *
4048
4467
  * This function can't be called in read-only mode.
4049
4468
  *
4469
+ * @param equipmentSlot
4470
+ * The equipment slot. e.g. "head", "chest", "offhand".
4471
+ * @param itemStack
4472
+ * The item to equip. If undefined, clears the slot.
4050
4473
  * @throws This function can throw errors.
4051
4474
  */
4052
4475
  setEquipment(equipmentSlot: EquipmentSlot, itemStack?: ItemStack): void;
@@ -4154,13 +4577,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
4154
4577
  */
4155
4578
  export class EntityHealableComponent extends EntityComponent {
4156
4579
  protected constructor();
4157
- /**
4158
- * @remarks
4159
- * A set of filters for when these Healable items would apply.
4160
- *
4161
- * @throws This property can throw when used.
4162
- */
4163
- readonly filters: FilterGroup;
4164
4580
  /**
4165
4581
  * @remarks
4166
4582
  * Determines if an item can be used regardless of the entity
@@ -6131,24 +6547,22 @@ export class IExplosionBeforeEventSignal {
6131
6547
 
6132
6548
  /**
6133
6549
  * @beta
6134
- * Provides an adaptable interface for callers to subscribe to
6135
- * an event that fires after an item has completed charging.
6136
6550
  */
6137
- export class IItemCompleteChargeAfterEventSignal {
6551
+ export class IItemCompleteUseAfterEventSignal {
6138
6552
  protected constructor();
6139
6553
  /**
6140
6554
  * @remarks
6141
6555
  * This function can't be called in read-only mode.
6142
6556
  *
6143
6557
  */
6144
- subscribe(callback: (arg: ItemCompleteChargeAfterEvent) => void): (arg: ItemCompleteChargeAfterEvent) => void;
6558
+ subscribe(callback: (arg: ItemCompleteUseAfterEvent) => void): (arg: ItemCompleteUseAfterEvent) => void;
6145
6559
  /**
6146
6560
  * @remarks
6147
6561
  * This function can't be called in read-only mode.
6148
6562
  *
6149
6563
  * @throws This function can throw errors.
6150
6564
  */
6151
- unsubscribe(callback: (arg: ItemCompleteChargeAfterEvent) => void): void;
6565
+ unsubscribe(callback: (arg: ItemCompleteUseAfterEvent) => void): void;
6152
6566
  }
6153
6567
 
6154
6568
  /**
@@ -6201,46 +6615,42 @@ export class IItemDefinitionBeforeEventSignal {
6201
6615
 
6202
6616
  /**
6203
6617
  * @beta
6204
- * Provides an adaptable interface for callers to subscribe to
6205
- * an event that fires after a charged item is released.
6206
6618
  */
6207
- export class IItemReleaseChargeAfterEventSignal {
6619
+ export class IItemReleaseUseAfterEventSignal {
6208
6620
  protected constructor();
6209
6621
  /**
6210
6622
  * @remarks
6211
6623
  * This function can't be called in read-only mode.
6212
6624
  *
6213
6625
  */
6214
- subscribe(callback: (arg: ItemReleaseChargeAfterEvent) => void): (arg: ItemReleaseChargeAfterEvent) => void;
6626
+ subscribe(callback: (arg: ItemReleaseUseAfterEvent) => void): (arg: ItemReleaseUseAfterEvent) => void;
6215
6627
  /**
6216
6628
  * @remarks
6217
6629
  * This function can't be called in read-only mode.
6218
6630
  *
6219
6631
  * @throws This function can throw errors.
6220
6632
  */
6221
- unsubscribe(callback: (arg: ItemReleaseChargeAfterEvent) => void): void;
6633
+ unsubscribe(callback: (arg: ItemReleaseUseAfterEvent) => void): void;
6222
6634
  }
6223
6635
 
6224
6636
  /**
6225
6637
  * @beta
6226
- * Provides an adaptable interface for callers to subscribe to
6227
- * an event that fires when a chargeable item starts charging.
6228
6638
  */
6229
- export class IItemStartChargeAfterEventSignal {
6639
+ export class IItemStartUseAfterEventSignal {
6230
6640
  protected constructor();
6231
6641
  /**
6232
6642
  * @remarks
6233
6643
  * This function can't be called in read-only mode.
6234
6644
  *
6235
6645
  */
6236
- subscribe(callback: (arg: ItemStartChargeAfterEvent) => void): (arg: ItemStartChargeAfterEvent) => void;
6646
+ subscribe(callback: (arg: ItemStartUseAfterEvent) => void): (arg: ItemStartUseAfterEvent) => void;
6237
6647
  /**
6238
6648
  * @remarks
6239
6649
  * This function can't be called in read-only mode.
6240
6650
  *
6241
6651
  * @throws This function can throw errors.
6242
6652
  */
6243
- unsubscribe(callback: (arg: ItemStartChargeAfterEvent) => void): void;
6653
+ unsubscribe(callback: (arg: ItemStartUseAfterEvent) => void): void;
6244
6654
  }
6245
6655
 
6246
6656
  /**
@@ -6268,24 +6678,22 @@ export class IItemStartUseOnAfterEventSignal {
6268
6678
 
6269
6679
  /**
6270
6680
  * @beta
6271
- * Provides an adaptable interface for callers to subscribe to
6272
- * an event that fires when an item stops charging.
6273
6681
  */
6274
- export class IItemStopChargeAfterEventSignal {
6682
+ export class IItemStopUseAfterEventSignal {
6275
6683
  protected constructor();
6276
6684
  /**
6277
6685
  * @remarks
6278
6686
  * This function can't be called in read-only mode.
6279
6687
  *
6280
6688
  */
6281
- subscribe(callback: (arg: ItemStopChargeAfterEvent) => void): (arg: ItemStopChargeAfterEvent) => void;
6689
+ subscribe(callback: (arg: ItemStopUseAfterEvent) => void): (arg: ItemStopUseAfterEvent) => void;
6282
6690
  /**
6283
6691
  * @remarks
6284
6692
  * This function can't be called in read-only mode.
6285
6693
  *
6286
6694
  * @throws This function can throw errors.
6287
6695
  */
6288
- unsubscribe(callback: (arg: ItemStopChargeAfterEvent) => void): void;
6696
+ unsubscribe(callback: (arg: ItemStopUseAfterEvent) => void): void;
6289
6697
  }
6290
6698
 
6291
6699
  /**
@@ -6606,7 +7014,7 @@ export class IServerMessageAfterEventSignal {
6606
7014
  * Contains information related to a chargeable item completing
6607
7015
  * being charged.
6608
7016
  */
6609
- export class ItemCompleteChargeAfterEvent {
7017
+ export class ItemCompleteUseAfterEvent {
6610
7018
  protected constructor();
6611
7019
  /**
6612
7020
  * @remarks
@@ -6634,7 +7042,7 @@ export class ItemCompleteChargeAfterEvent {
6634
7042
  * Manages callbacks that are connected to the completion of
6635
7043
  * charging for a chargeable item.
6636
7044
  */
6637
- export class ItemCompleteChargeAfterEventSignal extends IItemCompleteChargeAfterEventSignal {
7045
+ export class ItemCompleteUseAfterEventSignal extends IItemCompleteUseAfterEventSignal {
6638
7046
  protected constructor();
6639
7047
  }
6640
7048
 
@@ -6891,7 +7299,7 @@ export class ItemFoodComponent extends ItemComponent {
6891
7299
  * player has finished using the item and released the build
6892
7300
  * action.
6893
7301
  */
6894
- export class ItemReleaseChargeAfterEvent {
7302
+ export class ItemReleaseUseAfterEvent {
6895
7303
  protected constructor();
6896
7304
  /**
6897
7305
  * @remarks
@@ -6919,7 +7327,7 @@ export class ItemReleaseChargeAfterEvent {
6919
7327
  * Manages callbacks that are connected to the releasing of
6920
7328
  * charging for a chargeable item.
6921
7329
  */
6922
- export class ItemReleaseChargeAfterEventSignal extends IItemReleaseChargeAfterEventSignal {
7330
+ export class ItemReleaseUseAfterEventSignal extends IItemReleaseUseAfterEventSignal {
6923
7331
  protected constructor();
6924
7332
  }
6925
7333
 
@@ -7186,7 +7594,7 @@ export class ItemStack {
7186
7594
  * Contains information related to a chargeable item starting
7187
7595
  * to be charged.
7188
7596
  */
7189
- export class ItemStartChargeAfterEvent {
7597
+ export class ItemStartUseAfterEvent {
7190
7598
  protected constructor();
7191
7599
  /**
7192
7600
  * @remarks
@@ -7214,7 +7622,7 @@ export class ItemStartChargeAfterEvent {
7214
7622
  * Manages callbacks that are connected to the start of
7215
7623
  * charging for a chargeable item.
7216
7624
  */
7217
- export class ItemStartChargeAfterEventSignal extends IItemStartChargeAfterEventSignal {
7625
+ export class ItemStartUseAfterEventSignal extends IItemStartUseAfterEventSignal {
7218
7626
  protected constructor();
7219
7627
  }
7220
7628
 
@@ -7269,7 +7677,7 @@ export class ItemStartUseOnAfterEventSignal extends IItemStartUseOnAfterEventSig
7269
7677
  * finished an items use cycle, or when the player has released
7270
7678
  * the use action with the item.
7271
7679
  */
7272
- export class ItemStopChargeAfterEvent {
7680
+ export class ItemStopUseAfterEvent {
7273
7681
  protected constructor();
7274
7682
  /**
7275
7683
  * @remarks
@@ -7298,7 +7706,7 @@ export class ItemStopChargeAfterEvent {
7298
7706
  * charging for an item that has a registered
7299
7707
  * minecraft:chargeable component.
7300
7708
  */
7301
- export class ItemStopChargeAfterEventSignal extends IItemStopChargeAfterEventSignal {
7709
+ export class ItemStopUseAfterEventSignal extends IItemStopUseAfterEventSignal {
7302
7710
  protected constructor();
7303
7711
  }
7304
7712
 
@@ -7925,6 +8333,7 @@ export class MinecraftBlockTypes {
7925
8333
  *
7926
8334
  */
7927
8335
  static readonly blackGlazedTerracotta: BlockType;
8336
+ static readonly blackShulkerBox: BlockType;
7928
8337
  /**
7929
8338
  * @remarks
7930
8339
  * Represents a blackstone block within Minecraft.
@@ -7987,6 +8396,7 @@ export class MinecraftBlockTypes {
7987
8396
  *
7988
8397
  */
7989
8398
  static readonly blueIce: BlockType;
8399
+ static readonly blueShulkerBox: BlockType;
7990
8400
  static readonly blueWool: BlockType;
7991
8401
  /**
7992
8402
  * @remarks
@@ -8056,6 +8466,7 @@ export class MinecraftBlockTypes {
8056
8466
  *
8057
8467
  */
8058
8468
  static readonly brownMushroomBlock: BlockType;
8469
+ static readonly brownShulkerBox: BlockType;
8059
8470
  static readonly brownWool: BlockType;
8060
8471
  /**
8061
8472
  * @remarks
@@ -8585,6 +8996,7 @@ export class MinecraftBlockTypes {
8585
8996
  *
8586
8997
  */
8587
8998
  static readonly cyanGlazedTerracotta: BlockType;
8999
+ static readonly cyanShulkerBox: BlockType;
8588
9000
  static readonly cyanWool: BlockType;
8589
9001
  /**
8590
9002
  * @remarks
@@ -10018,6 +10430,7 @@ export class MinecraftBlockTypes {
10018
10430
  *
10019
10431
  */
10020
10432
  static readonly grayGlazedTerracotta: BlockType;
10433
+ static readonly grayShulkerBox: BlockType;
10021
10434
  static readonly grayWool: BlockType;
10022
10435
  /**
10023
10436
  * @remarks
@@ -10039,6 +10452,7 @@ export class MinecraftBlockTypes {
10039
10452
  *
10040
10453
  */
10041
10454
  static readonly greenGlazedTerracotta: BlockType;
10455
+ static readonly greenShulkerBox: BlockType;
10042
10456
  static readonly greenWool: BlockType;
10043
10457
  /**
10044
10458
  * @remarks
@@ -10330,6 +10744,7 @@ export class MinecraftBlockTypes {
10330
10744
  *
10331
10745
  */
10332
10746
  static readonly lightBlueGlazedTerracotta: BlockType;
10747
+ static readonly lightBlueShulkerBox: BlockType;
10333
10748
  static readonly lightBlueWool: BlockType;
10334
10749
  /**
10335
10750
  * @remarks
@@ -10344,6 +10759,7 @@ export class MinecraftBlockTypes {
10344
10759
  */
10345
10760
  static readonly lightGrayCandleCake: BlockType;
10346
10761
  static readonly lightGrayCarpet: BlockType;
10762
+ static readonly lightGrayShulkerBox: BlockType;
10347
10763
  static readonly lightGrayWool: BlockType;
10348
10764
  /**
10349
10765
  * @remarks
@@ -10377,6 +10793,7 @@ export class MinecraftBlockTypes {
10377
10793
  *
10378
10794
  */
10379
10795
  static readonly limeGlazedTerracotta: BlockType;
10796
+ static readonly limeShulkerBox: BlockType;
10380
10797
  static readonly limeWool: BlockType;
10381
10798
  /**
10382
10799
  * @remarks
@@ -10452,6 +10869,7 @@ export class MinecraftBlockTypes {
10452
10869
  *
10453
10870
  */
10454
10871
  static readonly magentaGlazedTerracotta: BlockType;
10872
+ static readonly magentaShulkerBox: BlockType;
10455
10873
  static readonly magentaWool: BlockType;
10456
10874
  /**
10457
10875
  * @remarks
@@ -10669,6 +11087,7 @@ export class MinecraftBlockTypes {
10669
11087
  *
10670
11088
  */
10671
11089
  static readonly orangeGlazedTerracotta: BlockType;
11090
+ static readonly orangeShulkerBox: BlockType;
10672
11091
  static readonly orangeWool: BlockType;
10673
11092
  /**
10674
11093
  * @remarks
@@ -10731,6 +11150,7 @@ export class MinecraftBlockTypes {
10731
11150
  */
10732
11151
  static readonly pinkGlazedTerracotta: BlockType;
10733
11152
  static readonly pinkPetals: BlockType;
11153
+ static readonly pinkShulkerBox: BlockType;
10734
11154
  static readonly pinkWool: BlockType;
10735
11155
  /**
10736
11156
  * @remarks
@@ -10977,6 +11397,7 @@ export class MinecraftBlockTypes {
10977
11397
  *
10978
11398
  */
10979
11399
  static readonly purpleGlazedTerracotta: BlockType;
11400
+ static readonly purpleShulkerBox: BlockType;
10980
11401
  static readonly purpleWool: BlockType;
10981
11402
  /**
10982
11403
  * @remarks
@@ -11102,6 +11523,7 @@ export class MinecraftBlockTypes {
11102
11523
  *
11103
11524
  */
11104
11525
  static readonly redSandstoneStairs: BlockType;
11526
+ static readonly redShulkerBox: BlockType;
11105
11527
  /**
11106
11528
  * @remarks
11107
11529
  * Represents a block of redstone within Minecraft.
@@ -11223,12 +11645,6 @@ export class MinecraftBlockTypes {
11223
11645
  *
11224
11646
  */
11225
11647
  static readonly shroomlight: BlockType;
11226
- /**
11227
- * @remarks
11228
- * Represents a shulker box within Minecraft.
11229
- *
11230
- */
11231
- static readonly shulkerBox: BlockType;
11232
11648
  /**
11233
11649
  * @remarks
11234
11650
  * Represents a silver-colored block of glazed terracotta
@@ -12069,6 +12485,7 @@ export class MinecraftBlockTypes {
12069
12485
  *
12070
12486
  */
12071
12487
  static readonly whiteGlazedTerracotta: BlockType;
12488
+ static readonly whiteShulkerBox: BlockType;
12072
12489
  static readonly whiteWool: BlockType;
12073
12490
  /**
12074
12491
  * @remarks
@@ -12132,6 +12549,7 @@ export class MinecraftBlockTypes {
12132
12549
  *
12133
12550
  */
12134
12551
  static readonly yellowGlazedTerracotta: BlockType;
12552
+ static readonly yellowShulkerBox: BlockType;
12135
12553
  static readonly yellowWool: BlockType;
12136
12554
  /**
12137
12555
  * @remarks
@@ -12661,6 +13079,7 @@ export class MinecraftItemTypes {
12661
13079
  *
12662
13080
  */
12663
13081
  static readonly blackGlazedTerracotta: ItemType;
13082
+ static readonly blackShulkerBox: ItemType;
12664
13083
  /**
12665
13084
  * @remarks
12666
13085
  * Represents an item that can place a blackstone block within
@@ -12723,6 +13142,7 @@ export class MinecraftItemTypes {
12723
13142
  *
12724
13143
  */
12725
13144
  static readonly blueIce: ItemType;
13145
+ static readonly blueShulkerBox: ItemType;
12726
13146
  static readonly blueWool: ItemType;
12727
13147
  static readonly boat: ItemType;
12728
13148
  static readonly bone: ItemType;
@@ -12806,6 +13226,7 @@ export class MinecraftItemTypes {
12806
13226
  *
12807
13227
  */
12808
13228
  static readonly brownMushroomBlock: ItemType;
13229
+ static readonly brownShulkerBox: ItemType;
12809
13230
  static readonly brownWool: ItemType;
12810
13231
  static readonly brush: ItemType;
12811
13232
  static readonly bubbleCoral: ItemType;
@@ -13298,6 +13719,7 @@ export class MinecraftItemTypes {
13298
13719
  *
13299
13720
  */
13300
13721
  static readonly cyanGlazedTerracotta: ItemType;
13722
+ static readonly cyanShulkerBox: ItemType;
13301
13723
  static readonly cyanWool: ItemType;
13302
13724
  static readonly dangerPotterySherd: ItemType;
13303
13725
  static readonly darkOakBoat: ItemType;
@@ -13927,6 +14349,7 @@ export class MinecraftItemTypes {
13927
14349
  *
13928
14350
  */
13929
14351
  static readonly grayGlazedTerracotta: ItemType;
14352
+ static readonly grayShulkerBox: ItemType;
13930
14353
  static readonly grayWool: ItemType;
13931
14354
  /**
13932
14355
  * @remarks
@@ -13944,6 +14367,7 @@ export class MinecraftItemTypes {
13944
14367
  *
13945
14368
  */
13946
14369
  static readonly greenGlazedTerracotta: ItemType;
14370
+ static readonly greenShulkerBox: ItemType;
13947
14371
  static readonly greenWool: ItemType;
13948
14372
  /**
13949
14373
  * @remarks
@@ -14242,6 +14666,7 @@ export class MinecraftItemTypes {
14242
14666
  *
14243
14667
  */
14244
14668
  static readonly lightBlueGlazedTerracotta: ItemType;
14669
+ static readonly lightBlueShulkerBox: ItemType;
14245
14670
  static readonly lightBlueWool: ItemType;
14246
14671
  /**
14247
14672
  * @remarks
@@ -14252,6 +14677,7 @@ export class MinecraftItemTypes {
14252
14677
  static readonly lightGrayCandle: ItemType;
14253
14678
  static readonly lightGrayCarpet: ItemType;
14254
14679
  static readonly lightGrayDye: ItemType;
14680
+ static readonly lightGrayShulkerBox: ItemType;
14255
14681
  static readonly lightGrayWool: ItemType;
14256
14682
  /**
14257
14683
  * @remarks
@@ -14283,6 +14709,7 @@ export class MinecraftItemTypes {
14283
14709
  *
14284
14710
  */
14285
14711
  static readonly limeGlazedTerracotta: ItemType;
14712
+ static readonly limeShulkerBox: ItemType;
14286
14713
  static readonly limeWool: ItemType;
14287
14714
  static readonly lingeringPotion: ItemType;
14288
14715
  /**
@@ -14336,6 +14763,7 @@ export class MinecraftItemTypes {
14336
14763
  *
14337
14764
  */
14338
14765
  static readonly magentaGlazedTerracotta: ItemType;
14766
+ static readonly magentaShulkerBox: ItemType;
14339
14767
  static readonly magentaWool: ItemType;
14340
14768
  /**
14341
14769
  * @remarks
@@ -14608,6 +15036,7 @@ export class MinecraftItemTypes {
14608
15036
  *
14609
15037
  */
14610
15038
  static readonly orangeGlazedTerracotta: ItemType;
15039
+ static readonly orangeShulkerBox: ItemType;
14611
15040
  static readonly orangeWool: ItemType;
14612
15041
  /**
14613
15042
  * @remarks
@@ -14674,6 +15103,7 @@ export class MinecraftItemTypes {
14674
15103
  */
14675
15104
  static readonly pinkGlazedTerracotta: ItemType;
14676
15105
  static readonly pinkPetals: ItemType;
15106
+ static readonly pinkShulkerBox: ItemType;
14677
15107
  static readonly pinkWool: ItemType;
14678
15108
  /**
14679
15109
  * @remarks
@@ -14888,6 +15318,7 @@ export class MinecraftItemTypes {
14888
15318
  *
14889
15319
  */
14890
15320
  static readonly purpleGlazedTerracotta: ItemType;
15321
+ static readonly purpleShulkerBox: ItemType;
14891
15322
  static readonly purpleWool: ItemType;
14892
15323
  /**
14893
15324
  * @remarks
@@ -15036,6 +15467,7 @@ export class MinecraftItemTypes {
15036
15467
  *
15037
15468
  */
15038
15469
  static readonly redSandstoneStairs: ItemType;
15470
+ static readonly redShulkerBox: ItemType;
15039
15471
  static readonly redstone: ItemType;
15040
15472
  /**
15041
15473
  * @remarks
@@ -15969,6 +16401,7 @@ export class MinecraftItemTypes {
15969
16401
  *
15970
16402
  */
15971
16403
  static readonly whiteGlazedTerracotta: ItemType;
16404
+ static readonly whiteShulkerBox: ItemType;
15972
16405
  static readonly whiteWool: ItemType;
15973
16406
  static readonly wildArmorTrimSmithingTemplate: ItemType;
15974
16407
  static readonly witchSpawnEgg: ItemType;
@@ -16052,6 +16485,7 @@ export class MinecraftItemTypes {
16052
16485
  *
16053
16486
  */
16054
16487
  static readonly yellowGlazedTerracotta: ItemType;
16488
+ static readonly yellowShulkerBox: ItemType;
16055
16489
  static readonly yellowWool: ItemType;
16056
16490
  static readonly zoglinSpawnEgg: ItemType;
16057
16491
  static readonly zombieHorseSpawnEgg: ItemType;
@@ -16207,6 +16641,32 @@ export class PistonActivateBeforeEventSignal extends IPistonActivateBeforeEventS
16207
16641
  */
16208
16642
  export class Player extends Entity {
16209
16643
  protected constructor();
16644
+ /**
16645
+ * @beta
16646
+ * @remarks
16647
+ * Whether the player is flying. For example, in Creative or
16648
+ * Spectator mode.
16649
+ *
16650
+ * @throws This property can throw when used.
16651
+ */
16652
+ readonly isFlying: boolean;
16653
+ /**
16654
+ * @beta
16655
+ * @remarks
16656
+ * Whether the player is gliding with Elytra.
16657
+ *
16658
+ * @throws This property can throw when used.
16659
+ */
16660
+ readonly isGliding: boolean;
16661
+ /**
16662
+ * @beta
16663
+ * @remarks
16664
+ * Whether the player is jumping. This will remain true while
16665
+ * the player is holding the jump action.
16666
+ *
16667
+ * @throws This property can throw when used.
16668
+ */
16669
+ readonly isJumping: boolean;
16210
16670
  /**
16211
16671
  * @beta
16212
16672
  * @remarks
@@ -17852,17 +18312,83 @@ export interface BlockRaycastOptions {
17852
18312
 
17853
18313
  /**
17854
18314
  * @beta
18315
+ * A BlockVolume is a simple interface to an object which
18316
+ * represents a 3D rectangle of a given size (in blocks) at a
18317
+ * world block location.
18318
+ * Note that these are not analogous to "min" and "max" values,
18319
+ * in that the vector components are not guaranteed to be in
18320
+ * any order.
18321
+ * In addition, these vector positions are not interchangeable
18322
+ * with BlockLocation.
18323
+ * If you want to get this volume represented as range of of
18324
+ * BlockLocations, you can use the getBoundingBox utility
18325
+ * function.
18326
+ * This volume class will maintain the ordering of the corner
18327
+ * indexes as initially set. imagine that each corner is
18328
+ * assigned in Editor - as you move the corner around
18329
+ * (potentially inverting the min/max relationship of the
18330
+ * bounds) - what
18331
+ * you had originally selected as the top/left corner would
18332
+ * traditionally become the bottom/right.
18333
+ * When manually editing these kinds of volumes, you need to
18334
+ * maintain the identity of the corner as you edit - the
18335
+ * BlockVolume utility functions do this.
18336
+ *
18337
+ * Important to note that this measures block sizes (to/from) -
18338
+ * a normal AABB (0,0,0) to (0,0,0) would traditionally be of
18339
+ * size (0,0,0)
18340
+ * However, because we're measuring blocks - the size or span
18341
+ * of a BlockVolume would actually be (1,1,1)
18342
+ *
17855
18343
  */
17856
18344
  export interface BlockVolume {
18345
+ /**
18346
+ * @remarks
18347
+ * A world block location that represents a corner in a 3D
18348
+ * rectangle
18349
+ *
18350
+ */
17857
18351
  from: Vector3;
18352
+ /**
18353
+ * @remarks
18354
+ * A world block location that represents the opposite corner
18355
+ * in a 3D rectangle
18356
+ *
18357
+ */
17858
18358
  to: Vector3;
17859
18359
  }
17860
18360
 
17861
18361
  /**
17862
18362
  * @beta
18363
+ * A BoundingBox is an interface to an object which represents
18364
+ * an AABB aligned rectangle.
18365
+ * The BoundingBox assumes that it was created in a valid state
18366
+ * (min <= max) but cannot guarantee it (unless it was created
18367
+ * using the associated {@link
18368
+ * @minecraft-server.BoundingBoxUtils} utility functions.
18369
+ * The min/max coordinates represent the diametrically opposite
18370
+ * corners of the rectangle.
18371
+ * The BoundingBox is not a representation of blocks - it has
18372
+ * no association with any type, it is just a mathematical
18373
+ * construct - so a rectangle with
18374
+ * ( 0,0,0 ) -> ( 0,0,0 )
18375
+ * has a size of ( 0,0,0 ) (unlike the very similar {@link
18376
+ * BlockVolume} object)
17863
18377
  */
17864
18378
  export interface BoundingBox {
18379
+ /**
18380
+ * @remarks
18381
+ * A {@link @minecraft-server.Vector3} that represents the
18382
+ * largest corner of the rectangle
18383
+ *
18384
+ */
17865
18385
  max: Vector3;
18386
+ /**
18387
+ * @remarks
18388
+ * A {@link @minecraft-server.Vector3} that represents the
18389
+ * smallest corner of the rectangle
18390
+ *
18391
+ */
17866
18392
  min: Vector3;
17867
18393
  }
17868
18394
 
@@ -17903,9 +18429,27 @@ export interface Color {
17903
18429
 
17904
18430
  /**
17905
18431
  * @beta
18432
+ * This interface defines an entry into the {@link
18433
+ * @minecraft-server/CompoundBlockVolume} which represents a
18434
+ * volume of positive or negative space.
18435
+ *
17906
18436
  */
17907
18437
  export interface CompoundBlockVolumeItem {
18438
+ /**
18439
+ * @remarks
18440
+ * The 'action' defines how the block volume is represented in
18441
+ * the compound block volume stack.
18442
+ * 'Add' creates a block volume which is positively selected
18443
+ * 'Subtract' creates a block volume which represents a hole or
18444
+ * negative space in the overall compound block volume.
18445
+ *
18446
+ */
17908
18447
  action: CompoundBlockVolumeAction;
18448
+ /**
18449
+ * @remarks
18450
+ * The volume of space
18451
+ *
18452
+ */
17909
18453
  volume: BlockVolume;
17910
18454
  }
17911
18455