@minecraft/server 1.1.0-beta.preview.1.19.50.24 → 1.1.0-beta.preview.1.19.50.25
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.
- package/index.d.ts +28 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ```json
|
|
16
16
|
* {
|
|
17
17
|
* "module_name": "@minecraft/server",
|
|
18
|
-
* "version": "1.1.0-internal.preview.1.19.50.
|
|
18
|
+
* "version": "1.1.0-internal.preview.1.19.50.25"
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
@@ -666,6 +666,21 @@ export class Block {
|
|
|
666
666
|
* Z coordinate of the block.
|
|
667
667
|
*/
|
|
668
668
|
readonly z: number;
|
|
669
|
+
/**
|
|
670
|
+
* @remarks
|
|
671
|
+
* Checks to see whether it is valid to place the specified
|
|
672
|
+
* block type or block permutation, on a specified face on this
|
|
673
|
+
* block
|
|
674
|
+
* @param blockToPlace
|
|
675
|
+
* Block type or block permutation to check placement for.
|
|
676
|
+
* @param faceToPlaceOn
|
|
677
|
+
* Optional specific face of this block to check placement
|
|
678
|
+
* against.
|
|
679
|
+
* @returns
|
|
680
|
+
* Returns `true` if the block type or permutation can be
|
|
681
|
+
* placed on this block, else `false`.
|
|
682
|
+
* @throws This function can throw errors.
|
|
683
|
+
*/
|
|
669
684
|
canPlace(blockToPlace: BlockPermutation | BlockType, faceToPlaceOn?: Direction): boolean;
|
|
670
685
|
/**
|
|
671
686
|
* @remarks
|
|
@@ -730,6 +745,18 @@ export class Block {
|
|
|
730
745
|
* @throws This function can throw errors.
|
|
731
746
|
*/
|
|
732
747
|
setType(blockType: BlockType): void;
|
|
748
|
+
/**
|
|
749
|
+
* @remarks
|
|
750
|
+
* Tries to set the block in the dimension to the state of the
|
|
751
|
+
* permutation by first checking if the placement is valid.
|
|
752
|
+
* @param permutation
|
|
753
|
+
* Permutation that contains a set of property states for the
|
|
754
|
+
* Block.
|
|
755
|
+
* @returns
|
|
756
|
+
* Returns `true` if the block permutation data was
|
|
757
|
+
* successfully set, else `false`.
|
|
758
|
+
* @throws This function can throw errors.
|
|
759
|
+
*/
|
|
733
760
|
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
734
761
|
}
|
|
735
762
|
/**
|