@minecraft/server 1.1.0-beta.preview.1.19.50.22 → 1.1.0-beta.preview.1.19.50.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.
- package/index.d.ts +22 -10
- 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.24"
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
@@ -666,6 +666,7 @@ export class Block {
|
|
|
666
666
|
* Z coordinate of the block.
|
|
667
667
|
*/
|
|
668
668
|
readonly z: number;
|
|
669
|
+
canPlace(blockToPlace: BlockPermutation | BlockType, faceToPlaceOn?: Direction): boolean;
|
|
669
670
|
/**
|
|
670
671
|
* @remarks
|
|
671
672
|
* Gets additional configuration properties (a component) for
|
|
@@ -729,6 +730,7 @@ export class Block {
|
|
|
729
730
|
* @throws This function can throw errors.
|
|
730
731
|
*/
|
|
731
732
|
setType(blockType: BlockType): void;
|
|
733
|
+
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
732
734
|
}
|
|
733
735
|
/**
|
|
734
736
|
* Holds information for expressing the net size of a volume of
|
|
@@ -13681,9 +13683,27 @@ export class Seat {
|
|
|
13681
13683
|
*/
|
|
13682
13684
|
readonly position: Location;
|
|
13683
13685
|
}
|
|
13686
|
+
/**
|
|
13687
|
+
* Manages callbacks that are message passing to a server. This
|
|
13688
|
+
* event is not currently fully implemented, and should not be
|
|
13689
|
+
* used.
|
|
13690
|
+
*/
|
|
13684
13691
|
export class ServerMessageSignal {
|
|
13685
13692
|
protected constructor();
|
|
13693
|
+
/**
|
|
13694
|
+
* @remarks
|
|
13695
|
+
* Adds a callback that will be called when an item is used on
|
|
13696
|
+
* a block.
|
|
13697
|
+
* @param callback
|
|
13698
|
+
*/
|
|
13686
13699
|
subscribe(callback: (arg: MessageReceiveEvent) => void): (arg: MessageReceiveEvent) => void;
|
|
13700
|
+
/**
|
|
13701
|
+
* @remarks
|
|
13702
|
+
* Removes a callback from being called when an item is used on
|
|
13703
|
+
* a block.
|
|
13704
|
+
* @param callback
|
|
13705
|
+
* @throws This function can throw errors.
|
|
13706
|
+
*/
|
|
13687
13707
|
unsubscribe(callback: (arg: MessageReceiveEvent) => void): void;
|
|
13688
13708
|
}
|
|
13689
13709
|
/**
|
|
@@ -13745,19 +13765,11 @@ export class System {
|
|
|
13745
13765
|
* @param callback
|
|
13746
13766
|
* Function callback to run when the tickDelay time criteria is
|
|
13747
13767
|
* met.
|
|
13748
|
-
* @param tickDelay
|
|
13749
|
-
* Number of ticks to wait before running this function. 1
|
|
13750
|
-
* means this function will run on the next tick. A value of 20
|
|
13751
|
-
* means that this function will run in 20 ticks (or
|
|
13752
|
-
* approximately one second). When the value of '0' is used
|
|
13753
|
-
* within an event handler, this funtion will run later within
|
|
13754
|
-
* the tick frame. Using the value of '0' within a System.run
|
|
13755
|
-
* function is not supported.
|
|
13756
13768
|
* @returns
|
|
13757
13769
|
* An opaque identifier that can be used with the `clearRun`
|
|
13758
13770
|
* function to cancel the execution of this run.
|
|
13759
13771
|
*/
|
|
13760
|
-
run(callback: () => void
|
|
13772
|
+
run(callback: () => void): number;
|
|
13761
13773
|
/**
|
|
13762
13774
|
* @remarks
|
|
13763
13775
|
* Runs a specified function at a scheduled interval. This is
|