@minecraft/server 1.9.0-beta.1.20.60-preview.26 → 1.10.0-beta.1.20.70-preview.20
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 +344 -13
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -884,6 +884,31 @@ export enum GameMode {
|
|
|
884
884
|
survival = 'survival',
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
+
/**
|
|
888
|
+
* @beta
|
|
889
|
+
*/
|
|
890
|
+
export enum HudElement {
|
|
891
|
+
PaperDoll = 0,
|
|
892
|
+
Armor = 1,
|
|
893
|
+
ToolTips = 2,
|
|
894
|
+
TouchControls = 3,
|
|
895
|
+
Crosshair = 4,
|
|
896
|
+
Hotbar = 5,
|
|
897
|
+
Health = 6,
|
|
898
|
+
ProgressBar = 7,
|
|
899
|
+
Hunger = 8,
|
|
900
|
+
AirBubbles = 9,
|
|
901
|
+
HorseHealth = 10,
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* @beta
|
|
906
|
+
*/
|
|
907
|
+
export enum HudVisibility {
|
|
908
|
+
Hide = 0,
|
|
909
|
+
Reset = 1,
|
|
910
|
+
}
|
|
911
|
+
|
|
887
912
|
/**
|
|
888
913
|
* @beta
|
|
889
914
|
* The types of item components that are accessible via
|
|
@@ -4213,6 +4238,7 @@ export class Dimension {
|
|
|
4213
4238
|
* Vector direction to cast the ray.
|
|
4214
4239
|
* @param options
|
|
4215
4240
|
* Additional options for processing this raycast query.
|
|
4241
|
+
* @throws This function can throw errors.
|
|
4216
4242
|
*/
|
|
4217
4243
|
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
4218
4244
|
/**
|
|
@@ -4327,6 +4353,14 @@ export class Dimension {
|
|
|
4327
4353
|
* weather that is currently going on.
|
|
4328
4354
|
*/
|
|
4329
4355
|
getWeather(): WeatherType;
|
|
4356
|
+
/**
|
|
4357
|
+
* @beta
|
|
4358
|
+
* @remarks
|
|
4359
|
+
* This function can't be called in read-only mode.
|
|
4360
|
+
*
|
|
4361
|
+
* @throws This function can throw errors.
|
|
4362
|
+
*/
|
|
4363
|
+
playSound(soundId: string, location: Vector3, soundOptions?: WorldSoundOptions): void;
|
|
4330
4364
|
/**
|
|
4331
4365
|
* @remarks
|
|
4332
4366
|
* Runs a command synchronously using the context of the
|
|
@@ -8211,6 +8245,223 @@ export class FluidContainer {
|
|
|
8211
8245
|
static readonly minFillLevel = 0;
|
|
8212
8246
|
}
|
|
8213
8247
|
|
|
8248
|
+
/**
|
|
8249
|
+
* @beta
|
|
8250
|
+
*/
|
|
8251
|
+
export class GameRules {
|
|
8252
|
+
private constructor();
|
|
8253
|
+
/**
|
|
8254
|
+
* @remarks
|
|
8255
|
+
* This property can't be edited in read-only mode.
|
|
8256
|
+
*
|
|
8257
|
+
*/
|
|
8258
|
+
commandBlockOutput: boolean;
|
|
8259
|
+
/**
|
|
8260
|
+
* @remarks
|
|
8261
|
+
* This property can't be edited in read-only mode.
|
|
8262
|
+
*
|
|
8263
|
+
*/
|
|
8264
|
+
commandBlocksEnabled: boolean;
|
|
8265
|
+
/**
|
|
8266
|
+
* @remarks
|
|
8267
|
+
* This property can't be edited in read-only mode.
|
|
8268
|
+
*
|
|
8269
|
+
*/
|
|
8270
|
+
doDayLightCycle: boolean;
|
|
8271
|
+
/**
|
|
8272
|
+
* @remarks
|
|
8273
|
+
* This property can't be edited in read-only mode.
|
|
8274
|
+
*
|
|
8275
|
+
*/
|
|
8276
|
+
doEntityDrops: boolean;
|
|
8277
|
+
/**
|
|
8278
|
+
* @remarks
|
|
8279
|
+
* This property can't be edited in read-only mode.
|
|
8280
|
+
*
|
|
8281
|
+
*/
|
|
8282
|
+
doFireTick: boolean;
|
|
8283
|
+
/**
|
|
8284
|
+
* @remarks
|
|
8285
|
+
* This property can't be edited in read-only mode.
|
|
8286
|
+
*
|
|
8287
|
+
*/
|
|
8288
|
+
doImmediateRespawn: boolean;
|
|
8289
|
+
/**
|
|
8290
|
+
* @remarks
|
|
8291
|
+
* This property can't be edited in read-only mode.
|
|
8292
|
+
*
|
|
8293
|
+
*/
|
|
8294
|
+
doInsomnia: boolean;
|
|
8295
|
+
/**
|
|
8296
|
+
* @remarks
|
|
8297
|
+
* This property can't be edited in read-only mode.
|
|
8298
|
+
*
|
|
8299
|
+
*/
|
|
8300
|
+
doLimitedCrafting: boolean;
|
|
8301
|
+
/**
|
|
8302
|
+
* @remarks
|
|
8303
|
+
* This property can't be edited in read-only mode.
|
|
8304
|
+
*
|
|
8305
|
+
*/
|
|
8306
|
+
doMobLoot: boolean;
|
|
8307
|
+
/**
|
|
8308
|
+
* @remarks
|
|
8309
|
+
* This property can't be edited in read-only mode.
|
|
8310
|
+
*
|
|
8311
|
+
*/
|
|
8312
|
+
doMobSpawning: boolean;
|
|
8313
|
+
/**
|
|
8314
|
+
* @remarks
|
|
8315
|
+
* This property can't be edited in read-only mode.
|
|
8316
|
+
*
|
|
8317
|
+
*/
|
|
8318
|
+
doTileDrops: boolean;
|
|
8319
|
+
/**
|
|
8320
|
+
* @remarks
|
|
8321
|
+
* This property can't be edited in read-only mode.
|
|
8322
|
+
*
|
|
8323
|
+
*/
|
|
8324
|
+
doWeatherCycle: boolean;
|
|
8325
|
+
/**
|
|
8326
|
+
* @remarks
|
|
8327
|
+
* This property can't be edited in read-only mode.
|
|
8328
|
+
*
|
|
8329
|
+
*/
|
|
8330
|
+
drowningDamage: boolean;
|
|
8331
|
+
/**
|
|
8332
|
+
* @remarks
|
|
8333
|
+
* This property can't be edited in read-only mode.
|
|
8334
|
+
*
|
|
8335
|
+
*/
|
|
8336
|
+
fallDamage: boolean;
|
|
8337
|
+
/**
|
|
8338
|
+
* @remarks
|
|
8339
|
+
* This property can't be edited in read-only mode.
|
|
8340
|
+
*
|
|
8341
|
+
*/
|
|
8342
|
+
fireDamage: boolean;
|
|
8343
|
+
/**
|
|
8344
|
+
* @remarks
|
|
8345
|
+
* This property can't be edited in read-only mode.
|
|
8346
|
+
*
|
|
8347
|
+
*/
|
|
8348
|
+
freezeDamage: boolean;
|
|
8349
|
+
/**
|
|
8350
|
+
* @remarks
|
|
8351
|
+
* This property can't be edited in read-only mode.
|
|
8352
|
+
*
|
|
8353
|
+
*/
|
|
8354
|
+
functionCommandLimit: number;
|
|
8355
|
+
/**
|
|
8356
|
+
* @remarks
|
|
8357
|
+
* This property can't be edited in read-only mode.
|
|
8358
|
+
*
|
|
8359
|
+
*/
|
|
8360
|
+
keepInventory: boolean;
|
|
8361
|
+
/**
|
|
8362
|
+
* @remarks
|
|
8363
|
+
* This property can't be edited in read-only mode.
|
|
8364
|
+
*
|
|
8365
|
+
*/
|
|
8366
|
+
maxCommandChainLength: number;
|
|
8367
|
+
/**
|
|
8368
|
+
* @remarks
|
|
8369
|
+
* This property can't be edited in read-only mode.
|
|
8370
|
+
*
|
|
8371
|
+
*/
|
|
8372
|
+
mobGriefing: boolean;
|
|
8373
|
+
/**
|
|
8374
|
+
* @remarks
|
|
8375
|
+
* This property can't be edited in read-only mode.
|
|
8376
|
+
*
|
|
8377
|
+
*/
|
|
8378
|
+
naturalRegeneration: boolean;
|
|
8379
|
+
/**
|
|
8380
|
+
* @remarks
|
|
8381
|
+
* This property can't be edited in read-only mode.
|
|
8382
|
+
*
|
|
8383
|
+
*/
|
|
8384
|
+
playersSleepingPercentage: number;
|
|
8385
|
+
/**
|
|
8386
|
+
* @remarks
|
|
8387
|
+
* This property can't be edited in read-only mode.
|
|
8388
|
+
*
|
|
8389
|
+
*/
|
|
8390
|
+
projectilesCanBreakBlocks: boolean;
|
|
8391
|
+
/**
|
|
8392
|
+
* @remarks
|
|
8393
|
+
* This property can't be edited in read-only mode.
|
|
8394
|
+
*
|
|
8395
|
+
*/
|
|
8396
|
+
pvp: boolean;
|
|
8397
|
+
/**
|
|
8398
|
+
* @remarks
|
|
8399
|
+
* This property can't be edited in read-only mode.
|
|
8400
|
+
*
|
|
8401
|
+
*/
|
|
8402
|
+
randomTickSpeed: number;
|
|
8403
|
+
/**
|
|
8404
|
+
* @remarks
|
|
8405
|
+
* This property can't be edited in read-only mode.
|
|
8406
|
+
*
|
|
8407
|
+
*/
|
|
8408
|
+
recipesUnlock: boolean;
|
|
8409
|
+
/**
|
|
8410
|
+
* @remarks
|
|
8411
|
+
* This property can't be edited in read-only mode.
|
|
8412
|
+
*
|
|
8413
|
+
*/
|
|
8414
|
+
respawnBlocksExplode: boolean;
|
|
8415
|
+
/**
|
|
8416
|
+
* @remarks
|
|
8417
|
+
* This property can't be edited in read-only mode.
|
|
8418
|
+
*
|
|
8419
|
+
*/
|
|
8420
|
+
sendCommandFeedback: boolean;
|
|
8421
|
+
/**
|
|
8422
|
+
* @remarks
|
|
8423
|
+
* This property can't be edited in read-only mode.
|
|
8424
|
+
*
|
|
8425
|
+
*/
|
|
8426
|
+
showBorderEffect: boolean;
|
|
8427
|
+
/**
|
|
8428
|
+
* @remarks
|
|
8429
|
+
* This property can't be edited in read-only mode.
|
|
8430
|
+
*
|
|
8431
|
+
*/
|
|
8432
|
+
showCoordinates: boolean;
|
|
8433
|
+
/**
|
|
8434
|
+
* @remarks
|
|
8435
|
+
* This property can't be edited in read-only mode.
|
|
8436
|
+
*
|
|
8437
|
+
*/
|
|
8438
|
+
showDeathMessages: boolean;
|
|
8439
|
+
/**
|
|
8440
|
+
* @remarks
|
|
8441
|
+
* This property can't be edited in read-only mode.
|
|
8442
|
+
*
|
|
8443
|
+
*/
|
|
8444
|
+
showRecipeMessages: boolean;
|
|
8445
|
+
/**
|
|
8446
|
+
* @remarks
|
|
8447
|
+
* This property can't be edited in read-only mode.
|
|
8448
|
+
*
|
|
8449
|
+
*/
|
|
8450
|
+
showTags: boolean;
|
|
8451
|
+
/**
|
|
8452
|
+
* @remarks
|
|
8453
|
+
* This property can't be edited in read-only mode.
|
|
8454
|
+
*
|
|
8455
|
+
*/
|
|
8456
|
+
spawnRadius: number;
|
|
8457
|
+
/**
|
|
8458
|
+
* @remarks
|
|
8459
|
+
* This property can't be edited in read-only mode.
|
|
8460
|
+
*
|
|
8461
|
+
*/
|
|
8462
|
+
tntExplodes: boolean;
|
|
8463
|
+
}
|
|
8464
|
+
|
|
8214
8465
|
/**
|
|
8215
8466
|
* Provides an adaptable interface for callers to subscribe to
|
|
8216
8467
|
* an event that fires when a button is pushed.
|
|
@@ -8423,6 +8674,28 @@ export class ItemCooldownComponent extends ItemComponent {
|
|
|
8423
8674
|
*/
|
|
8424
8675
|
readonly cooldownTicks: number;
|
|
8425
8676
|
static readonly componentId = 'minecraft:cooldown';
|
|
8677
|
+
/**
|
|
8678
|
+
* @remarks
|
|
8679
|
+
* This function can't be called in read-only mode.
|
|
8680
|
+
*
|
|
8681
|
+
* @throws This function can throw errors.
|
|
8682
|
+
*/
|
|
8683
|
+
getCooldownTicksRemaining(player: Player): number;
|
|
8684
|
+
/**
|
|
8685
|
+
* @remarks
|
|
8686
|
+
* Will return true if the item is the cooldown category passed
|
|
8687
|
+
* in and false otherwise.
|
|
8688
|
+
*
|
|
8689
|
+
* This function can't be called in read-only mode.
|
|
8690
|
+
*
|
|
8691
|
+
* @param cooldownCategory
|
|
8692
|
+
* The cooldown category that might be associated with this
|
|
8693
|
+
* item.
|
|
8694
|
+
* @returns
|
|
8695
|
+
* True if the item is the given cooldown category.
|
|
8696
|
+
* @throws This function can throw errors.
|
|
8697
|
+
*/
|
|
8698
|
+
isCooldownCategory(cooldownCategory: string): boolean;
|
|
8426
8699
|
/**
|
|
8427
8700
|
* @remarks
|
|
8428
8701
|
* Starts a new cooldown period for this item.
|
|
@@ -11560,6 +11833,30 @@ export class ScoreboardScoreInfo {
|
|
|
11560
11833
|
*/
|
|
11561
11834
|
export class ScreenDisplay {
|
|
11562
11835
|
private constructor();
|
|
11836
|
+
/**
|
|
11837
|
+
* @beta
|
|
11838
|
+
* @remarks
|
|
11839
|
+
* This function can't be called in read-only mode.
|
|
11840
|
+
*
|
|
11841
|
+
* @throws This function can throw errors.
|
|
11842
|
+
*/
|
|
11843
|
+
getHiddenHudElements(): HudElement[];
|
|
11844
|
+
/**
|
|
11845
|
+
* @beta
|
|
11846
|
+
* @remarks
|
|
11847
|
+
* This function can't be called in read-only mode.
|
|
11848
|
+
*
|
|
11849
|
+
* @throws This function can throw errors.
|
|
11850
|
+
*/
|
|
11851
|
+
hideAllExcept(hudElements?: HudElement[]): void;
|
|
11852
|
+
/**
|
|
11853
|
+
* @beta
|
|
11854
|
+
* @remarks
|
|
11855
|
+
* This function can't be called in read-only mode.
|
|
11856
|
+
*
|
|
11857
|
+
* @throws This function can throw errors.
|
|
11858
|
+
*/
|
|
11859
|
+
isForcedHidden(hudElement: HudElement): boolean;
|
|
11563
11860
|
/**
|
|
11564
11861
|
* @remarks
|
|
11565
11862
|
* Returns true if the current reference to this screen display
|
|
@@ -11567,6 +11864,14 @@ export class ScreenDisplay {
|
|
|
11567
11864
|
*
|
|
11568
11865
|
*/
|
|
11569
11866
|
isValid(): boolean;
|
|
11867
|
+
/**
|
|
11868
|
+
* @beta
|
|
11869
|
+
* @remarks
|
|
11870
|
+
* This function can't be called in read-only mode.
|
|
11871
|
+
*
|
|
11872
|
+
* @throws This function can throw errors.
|
|
11873
|
+
*/
|
|
11874
|
+
resetHudElements(): void;
|
|
11570
11875
|
/**
|
|
11571
11876
|
* @remarks
|
|
11572
11877
|
* Set the action bar text - a piece of text that displays
|
|
@@ -11579,6 +11884,14 @@ export class ScreenDisplay {
|
|
|
11579
11884
|
* @throws This function can throw errors.
|
|
11580
11885
|
*/
|
|
11581
11886
|
setActionBar(text: (RawMessage | string)[] | RawMessage | string): void;
|
|
11887
|
+
/**
|
|
11888
|
+
* @beta
|
|
11889
|
+
* @remarks
|
|
11890
|
+
* This function can't be called in read-only mode.
|
|
11891
|
+
*
|
|
11892
|
+
* @throws This function can throw errors.
|
|
11893
|
+
*/
|
|
11894
|
+
setHudVisibility(visible: HudVisibility, hudElements?: HudElement[]): void;
|
|
11582
11895
|
/**
|
|
11583
11896
|
* @remarks
|
|
11584
11897
|
* Will cause a title to show up on the player's on screen
|
|
@@ -11874,7 +12187,7 @@ export class System {
|
|
|
11874
12187
|
/**
|
|
11875
12188
|
* @beta
|
|
11876
12189
|
*/
|
|
11877
|
-
runJob(generator:
|
|
12190
|
+
runJob(generator: Generator<void, void, void>): number;
|
|
11878
12191
|
/**
|
|
11879
12192
|
* @remarks
|
|
11880
12193
|
* Runs a set of code at a future time specified by tickDelay.
|
|
@@ -12302,18 +12615,8 @@ export class WeatherChangeAfterEvent {
|
|
|
12302
12615
|
*
|
|
12303
12616
|
*/
|
|
12304
12617
|
readonly dimension: string;
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
* Whether it is lightning after the change in weather.
|
|
12308
|
-
*
|
|
12309
|
-
*/
|
|
12310
|
-
readonly lightning: boolean;
|
|
12311
|
-
/**
|
|
12312
|
-
* @remarks
|
|
12313
|
-
* Whether it is raining after the change in weather.
|
|
12314
|
-
*
|
|
12315
|
-
*/
|
|
12316
|
-
readonly raining: boolean;
|
|
12618
|
+
readonly newWeather: WeatherType;
|
|
12619
|
+
readonly previousWeather: WeatherType;
|
|
12317
12620
|
}
|
|
12318
12621
|
|
|
12319
12622
|
/**
|
|
@@ -12394,6 +12697,10 @@ export class World {
|
|
|
12394
12697
|
*
|
|
12395
12698
|
*/
|
|
12396
12699
|
readonly beforeEvents: WorldBeforeEvents;
|
|
12700
|
+
/**
|
|
12701
|
+
* @beta
|
|
12702
|
+
*/
|
|
12703
|
+
readonly gameRules: GameRules;
|
|
12397
12704
|
/**
|
|
12398
12705
|
* @remarks
|
|
12399
12706
|
* Returns the general global scoreboard that applies to the
|
|
@@ -13327,6 +13634,18 @@ export interface BlockFillOptions {
|
|
|
13327
13634
|
matchingBlock?: BlockPermutation;
|
|
13328
13635
|
}
|
|
13329
13636
|
|
|
13637
|
+
/**
|
|
13638
|
+
* @beta
|
|
13639
|
+
*/
|
|
13640
|
+
export interface BlockFilter {
|
|
13641
|
+
excludePermutations?: BlockPermutation[];
|
|
13642
|
+
excludeTags?: string[];
|
|
13643
|
+
excludeTypes?: string[];
|
|
13644
|
+
includePermutations?: BlockPermutation[];
|
|
13645
|
+
includeTags?: string[];
|
|
13646
|
+
includeTypes?: string[];
|
|
13647
|
+
}
|
|
13648
|
+
|
|
13330
13649
|
/**
|
|
13331
13650
|
* Contains more information for events where a block is hit.
|
|
13332
13651
|
*/
|
|
@@ -13382,6 +13701,10 @@ export interface BlockRaycastHit {
|
|
|
13382
13701
|
* query.
|
|
13383
13702
|
*/
|
|
13384
13703
|
export interface BlockRaycastOptions {
|
|
13704
|
+
/**
|
|
13705
|
+
* @beta
|
|
13706
|
+
*/
|
|
13707
|
+
blockFilter?: BlockFilter;
|
|
13385
13708
|
/**
|
|
13386
13709
|
* @remarks
|
|
13387
13710
|
* If true, liquid blocks will be considered as blocks that
|
|
@@ -14537,6 +14860,14 @@ export class LocationOutOfWorldBoundariesError extends Error {
|
|
|
14537
14860
|
private constructor();
|
|
14538
14861
|
}
|
|
14539
14862
|
|
|
14863
|
+
/**
|
|
14864
|
+
* @beta
|
|
14865
|
+
*/
|
|
14866
|
+
export const HudElementsCount = 11;
|
|
14867
|
+
/**
|
|
14868
|
+
* @beta
|
|
14869
|
+
*/
|
|
14870
|
+
export const HudVisibilityCount = 2;
|
|
14540
14871
|
/**
|
|
14541
14872
|
* @remarks
|
|
14542
14873
|
* Holds the number of MoonPhases
|