@minecraft/server 1.1.0-beta.preview.1.19.50.22 → 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 +49 -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.25"
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
@@ -666,6 +666,22 @@ 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
|
+
*/
|
|
684
|
+
canPlace(blockToPlace: BlockPermutation | BlockType, faceToPlaceOn?: Direction): boolean;
|
|
669
685
|
/**
|
|
670
686
|
* @remarks
|
|
671
687
|
* Gets additional configuration properties (a component) for
|
|
@@ -729,6 +745,19 @@ export class Block {
|
|
|
729
745
|
* @throws This function can throw errors.
|
|
730
746
|
*/
|
|
731
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
|
+
*/
|
|
760
|
+
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
732
761
|
}
|
|
733
762
|
/**
|
|
734
763
|
* Holds information for expressing the net size of a volume of
|
|
@@ -13681,9 +13710,27 @@ export class Seat {
|
|
|
13681
13710
|
*/
|
|
13682
13711
|
readonly position: Location;
|
|
13683
13712
|
}
|
|
13713
|
+
/**
|
|
13714
|
+
* Manages callbacks that are message passing to a server. This
|
|
13715
|
+
* event is not currently fully implemented, and should not be
|
|
13716
|
+
* used.
|
|
13717
|
+
*/
|
|
13684
13718
|
export class ServerMessageSignal {
|
|
13685
13719
|
protected constructor();
|
|
13720
|
+
/**
|
|
13721
|
+
* @remarks
|
|
13722
|
+
* Adds a callback that will be called when an item is used on
|
|
13723
|
+
* a block.
|
|
13724
|
+
* @param callback
|
|
13725
|
+
*/
|
|
13686
13726
|
subscribe(callback: (arg: MessageReceiveEvent) => void): (arg: MessageReceiveEvent) => void;
|
|
13727
|
+
/**
|
|
13728
|
+
* @remarks
|
|
13729
|
+
* Removes a callback from being called when an item is used on
|
|
13730
|
+
* a block.
|
|
13731
|
+
* @param callback
|
|
13732
|
+
* @throws This function can throw errors.
|
|
13733
|
+
*/
|
|
13687
13734
|
unsubscribe(callback: (arg: MessageReceiveEvent) => void): void;
|
|
13688
13735
|
}
|
|
13689
13736
|
/**
|
|
@@ -13745,19 +13792,11 @@ export class System {
|
|
|
13745
13792
|
* @param callback
|
|
13746
13793
|
* Function callback to run when the tickDelay time criteria is
|
|
13747
13794
|
* 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
13795
|
* @returns
|
|
13757
13796
|
* An opaque identifier that can be used with the `clearRun`
|
|
13758
13797
|
* function to cancel the execution of this run.
|
|
13759
13798
|
*/
|
|
13760
|
-
run(callback: () => void
|
|
13799
|
+
run(callback: () => void): number;
|
|
13761
13800
|
/**
|
|
13762
13801
|
* @remarks
|
|
13763
13802
|
* Runs a specified function at a scheduled interval. This is
|