@minecraft/server 1.4.0-beta.1.20.0-preview.24 → 1.4.0-beta.1.20.10-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 +537 -248
- 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.4.0-internal.1.20.
|
|
19
|
+
* "version": "1.4.0-internal.1.20.10-preview.20"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -417,6 +417,7 @@ export class AfterEvents {
|
|
|
417
417
|
*
|
|
418
418
|
*/
|
|
419
419
|
readonly entityDie: EntityDieAfterEventSignal;
|
|
420
|
+
readonly entityHealthChanged: EntityHealthChangedAfterEventSignal;
|
|
420
421
|
/**
|
|
421
422
|
* @remarks
|
|
422
423
|
* This event fires when an entity hits (makes a melee attack)
|
|
@@ -529,12 +530,16 @@ export class AfterEvents {
|
|
|
529
530
|
*
|
|
530
531
|
*/
|
|
531
532
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
533
|
+
readonly pressurePlatePop: PressurePlatePopAfterEventSignal;
|
|
534
|
+
readonly pressurePlatePush: PressurePlatePushAfterEventSignal;
|
|
532
535
|
/**
|
|
533
536
|
* @remarks
|
|
534
537
|
* This event fires when a projectile hits an entity or block.
|
|
535
538
|
*
|
|
536
539
|
*/
|
|
537
540
|
readonly projectileHit: ProjectileHitAfterEventSignal;
|
|
541
|
+
readonly targetBlockHit: TargetBlockHitAfterEventSignal;
|
|
542
|
+
readonly tripWireTrip: TripWireTripAfterEventSignal;
|
|
538
543
|
/**
|
|
539
544
|
* @remarks
|
|
540
545
|
* This event will be triggered when the weather changes within
|
|
@@ -771,15 +776,14 @@ export class Block {
|
|
|
771
776
|
* @throws This function can throw errors.
|
|
772
777
|
* @example check_block_tags.js
|
|
773
778
|
* ```typescript
|
|
774
|
-
*
|
|
779
|
+
* import { world } from "@minecraft/server";
|
|
775
780
|
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
* console.log(`Block is dirt: ${block.hasTag("dirt")}`);
|
|
780
|
-
* console.log(`Block is wood: ${block.hasTag("wood")}`);
|
|
781
|
-
* console.log(`Block is stone: ${block.hasTag("stone")}`);
|
|
781
|
+
* // Fetch the block
|
|
782
|
+
* const block = world.getDimension("overworld").getBlock({ x: 1, y: 2, z: 3 });
|
|
782
783
|
*
|
|
784
|
+
* console.log(`Block is dirt: ${block.hasTag("dirt")}`);
|
|
785
|
+
* console.log(`Block is wood: ${block.hasTag("wood")}`);
|
|
786
|
+
* console.log(`Block is stone: ${block.hasTag("stone")}`);
|
|
783
787
|
* ```
|
|
784
788
|
*/
|
|
785
789
|
hasTag(tag: string): boolean;
|
|
@@ -1159,16 +1163,15 @@ export class BlockPermutation {
|
|
|
1159
1163
|
* Returns `true` if the permutation has the tag, else `false`.
|
|
1160
1164
|
* @example check_block_tags.js
|
|
1161
1165
|
* ```typescript
|
|
1162
|
-
*
|
|
1163
|
-
*
|
|
1164
|
-
* // Fetch the block
|
|
1165
|
-
* const block = world.getDimension("overworld").getBlock({ x: 1, y: 2, z: 3 });
|
|
1166
|
-
* const blockPerm = block.getPermutation();
|
|
1166
|
+
* import { world } from "@minecraft/server";
|
|
1167
1167
|
*
|
|
1168
|
-
*
|
|
1169
|
-
*
|
|
1170
|
-
*
|
|
1168
|
+
* // Fetch the block
|
|
1169
|
+
* const block = world.getDimension("overworld").getBlock({ x: 1, y: 2, z: 3 });
|
|
1170
|
+
* const blockPerm = block.getPermutation();
|
|
1171
1171
|
*
|
|
1172
|
+
* console.log(`Block is dirt: ${blockPerm.hasTag("dirt")}`);
|
|
1173
|
+
* console.log(`Block is wood: ${blockPerm.hasTag("wood")}`);
|
|
1174
|
+
* console.log(`Block is stone: ${blockPerm.hasTag("stone")}`);
|
|
1172
1175
|
* ```
|
|
1173
1176
|
*/
|
|
1174
1177
|
hasTag(tag: string): boolean;
|
|
@@ -1435,27 +1438,27 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
1435
1438
|
* @throws This function can throw errors.
|
|
1436
1439
|
* @example SetRawMessage.ts
|
|
1437
1440
|
* ```typescript
|
|
1438
|
-
*
|
|
1439
|
-
*
|
|
1441
|
+
* const helloWorldMessage: RawMessage = { text: 'Hello World' };
|
|
1442
|
+
* sign.setText(helloWorldMessage);
|
|
1440
1443
|
*
|
|
1441
|
-
*
|
|
1442
|
-
*
|
|
1443
|
-
*
|
|
1444
|
+
* // Sign text will be saved as a RawText
|
|
1445
|
+
* const result: RawText = sign.getRawText();
|
|
1446
|
+
* JSON.stringify(result); // { rawtext: [{ text: 'Hello World' }] };
|
|
1444
1447
|
* ```
|
|
1445
1448
|
* @example SetRawText.ts
|
|
1446
1449
|
* ```typescript
|
|
1447
|
-
*
|
|
1448
|
-
*
|
|
1450
|
+
* const helloWorldText: RawText = { rawtext: [{ text: 'Hello World' }] };
|
|
1451
|
+
* sign.setText(helloWorldText);
|
|
1449
1452
|
*
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
+
* // There will be no data transformation unlike calling setText with a RawMessage
|
|
1454
|
+
* const result: RawText = sign.getRawText();
|
|
1455
|
+
* JSON.stringify(result); // { rawtext: [{ text: 'Hello World' }] };
|
|
1453
1456
|
* ```
|
|
1454
1457
|
* @example SetString.ts
|
|
1455
1458
|
* ```typescript
|
|
1456
|
-
*
|
|
1457
|
-
*
|
|
1458
|
-
*
|
|
1459
|
+
* // Set sign to say 'Hello'
|
|
1460
|
+
* sign.setText('Hello');
|
|
1461
|
+
* sign.getText(); // 'Hello'
|
|
1459
1462
|
* ```
|
|
1460
1463
|
*/
|
|
1461
1464
|
setText(message: RawMessage | RawText | string, side?: SignSide): void;
|
|
@@ -2240,10 +2243,9 @@ export class Container {
|
|
|
2240
2243
|
* out of bounds.
|
|
2241
2244
|
* @example getItem.ts
|
|
2242
2245
|
* ```typescript
|
|
2243
|
-
*
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2246
|
+
* // Get a copy of the first item in the player's hotbar
|
|
2247
|
+
* const inventory = player.getComponent("inventory") as EntityInventoryComponent;
|
|
2248
|
+
* const itemStack = inventory.container.getItem(0);
|
|
2247
2249
|
* ```
|
|
2248
2250
|
*/
|
|
2249
2251
|
getItem(slot: number): ItemStack | undefined;
|
|
@@ -2282,11 +2284,10 @@ export class Container {
|
|
|
2282
2284
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
2283
2285
|
* @example moveItem.ts
|
|
2284
2286
|
* ```typescript
|
|
2285
|
-
*
|
|
2286
|
-
*
|
|
2287
|
-
*
|
|
2288
|
-
*
|
|
2289
|
-
*
|
|
2287
|
+
* // Move an item from the first slot of fromPlayer's inventory to the fifth slot of toPlayer's inventory
|
|
2288
|
+
* const fromInventory = fromPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
2289
|
+
* const toInventory = toPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
2290
|
+
* fromInventory.container.moveItem(0, 4, toInventory.container);
|
|
2290
2291
|
* ```
|
|
2291
2292
|
*/
|
|
2292
2293
|
moveItem(fromSlot: number, toSlot: number, toContainer: Container): void;
|
|
@@ -2324,10 +2325,9 @@ export class Container {
|
|
|
2324
2325
|
* invalid or if the `slot` or `otherSlot` are out of bounds.
|
|
2325
2326
|
* @example swapItems.ts
|
|
2326
2327
|
* ```typescript
|
|
2327
|
-
*
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2330
|
-
*
|
|
2328
|
+
* // Swaps an item between slots 0 and 4 in the player's inventory
|
|
2329
|
+
* const inventory = fromPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
2330
|
+
* inventory.container.swapItems(0, 4, inventory);
|
|
2331
2331
|
* ```
|
|
2332
2332
|
*/
|
|
2333
2333
|
swapItems(slot: number, otherSlot: number, otherContainer: Container): void;
|
|
@@ -2349,11 +2349,10 @@ export class Container {
|
|
|
2349
2349
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
2350
2350
|
* @example transferItem.ts
|
|
2351
2351
|
* ```typescript
|
|
2352
|
-
*
|
|
2353
|
-
*
|
|
2354
|
-
*
|
|
2355
|
-
*
|
|
2356
|
-
*
|
|
2352
|
+
* // Transfer an item from the first slot of fromPlayer's inventory to toPlayer's inventory
|
|
2353
|
+
* const fromInventory = fromPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
2354
|
+
* const toInventory = toPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
2355
|
+
* fromInventory.container.transferItem(0, toInventory.container);
|
|
2357
2356
|
* ```
|
|
2358
2357
|
*/
|
|
2359
2358
|
transferItem(fromSlot: number, toContainer: Container): ItemStack;
|
|
@@ -2753,43 +2752,41 @@ export class Dimension {
|
|
|
2753
2752
|
* @throws This function can throw errors.
|
|
2754
2753
|
* @example createExplosion.ts
|
|
2755
2754
|
* ```typescript
|
|
2756
|
-
*
|
|
2755
|
+
* overworld.createExplosion(targetLocation, 10, new mc.ExplosionOptions());
|
|
2757
2756
|
* ```
|
|
2758
2757
|
* @example createFireAndWaterExplosions.ts
|
|
2759
2758
|
* ```typescript
|
|
2760
|
-
*
|
|
2759
|
+
* const explosionLoc: mc.Vector3 = { x: targetLocation.x + 0.5, y: targetLocation.y + 0.5, z: targetLocation.z + 0.5 };
|
|
2761
2760
|
*
|
|
2762
|
-
*
|
|
2761
|
+
* const fireExplosionOptions = new mc.ExplosionOptions();
|
|
2763
2762
|
*
|
|
2764
|
-
*
|
|
2765
|
-
*
|
|
2763
|
+
* // Explode with fire
|
|
2764
|
+
* fireExplosionOptions.causesFire = true;
|
|
2766
2765
|
*
|
|
2767
|
-
*
|
|
2768
|
-
*
|
|
2766
|
+
* overworld.createExplosion(explosionLoc, 15, fireExplosionOptions);
|
|
2767
|
+
* const waterExplosionOptions = new mc.ExplosionOptions();
|
|
2769
2768
|
*
|
|
2770
|
-
*
|
|
2771
|
-
*
|
|
2769
|
+
* // Explode in water
|
|
2770
|
+
* waterExplosionOptions.allowUnderwater = true;
|
|
2772
2771
|
*
|
|
2773
|
-
*
|
|
2774
|
-
*
|
|
2775
|
-
* overworld.createExplosion(belowWaterLoc, 10, waterExplosionOptions);
|
|
2772
|
+
* const belowWaterLoc: mc.Vector3 = { x: targetLocation.x + 3, y: targetLocation.y + 1, z: targetLocation.z + 3 };
|
|
2776
2773
|
*
|
|
2774
|
+
* overworld.createExplosion(belowWaterLoc, 10, waterExplosionOptions);
|
|
2777
2775
|
* ```
|
|
2778
2776
|
* @example createNoBlockExplosion.ts
|
|
2779
2777
|
* ```typescript
|
|
2780
|
-
*
|
|
2781
|
-
*
|
|
2782
|
-
* // Start by exploding without breaking blocks
|
|
2783
|
-
* explosionOptions.breaksBlocks = false;
|
|
2778
|
+
* const explosionOptions = new mc.ExplosionOptions();
|
|
2784
2779
|
*
|
|
2785
|
-
*
|
|
2786
|
-
*
|
|
2787
|
-
* y: Math.floor(targetLocation.y + 2),
|
|
2788
|
-
* z: Math.floor(targetLocation.z + 1),
|
|
2789
|
-
* };
|
|
2780
|
+
* // Start by exploding without breaking blocks
|
|
2781
|
+
* explosionOptions.breaksBlocks = false;
|
|
2790
2782
|
*
|
|
2791
|
-
*
|
|
2783
|
+
* const explodeNoBlocksLoc: mc.Vector3 = {
|
|
2784
|
+
* x: Math.floor(targetLocation.x + 1),
|
|
2785
|
+
* y: Math.floor(targetLocation.y + 2),
|
|
2786
|
+
* z: Math.floor(targetLocation.z + 1),
|
|
2787
|
+
* };
|
|
2792
2788
|
*
|
|
2789
|
+
* overworld.createExplosion(explodeNoBlocksLoc, 15, explosionOptions);
|
|
2793
2790
|
* ```
|
|
2794
2791
|
*/
|
|
2795
2792
|
createExplosion(location: Vector3, radius: number, explosionOptions?: ExplosionOptions): void;
|
|
@@ -2856,22 +2853,21 @@ export class Dimension {
|
|
|
2856
2853
|
* @throws This function can throw errors.
|
|
2857
2854
|
* @example testThatEntityIsFeatherItem.ts
|
|
2858
2855
|
* ```typescript
|
|
2859
|
-
*
|
|
2860
|
-
*
|
|
2861
|
-
*
|
|
2862
|
-
*
|
|
2863
|
-
*
|
|
2864
|
-
*
|
|
2865
|
-
*
|
|
2866
|
-
*
|
|
2867
|
-
*
|
|
2868
|
-
*
|
|
2869
|
-
*
|
|
2870
|
-
*
|
|
2871
|
-
*
|
|
2872
|
-
*
|
|
2873
|
-
*
|
|
2874
|
-
*
|
|
2856
|
+
* const query = {
|
|
2857
|
+
* type: "item",
|
|
2858
|
+
* location: targetLocation,
|
|
2859
|
+
* };
|
|
2860
|
+
* const items = overworld.getEntities(query);
|
|
2861
|
+
*
|
|
2862
|
+
* for (const item of items) {
|
|
2863
|
+
* const itemComp = item.getComponent("item") as any;
|
|
2864
|
+
*
|
|
2865
|
+
* if (itemComp) {
|
|
2866
|
+
* if (itemComp.itemStack.id.endsWith("feather")) {
|
|
2867
|
+
* console.log("Success! Found a feather", 1);
|
|
2868
|
+
* }
|
|
2869
|
+
* }
|
|
2870
|
+
* }
|
|
2875
2871
|
* ```
|
|
2876
2872
|
*/
|
|
2877
2873
|
getEntities(options?: EntityQueryOptions): Entity[];
|
|
@@ -2960,41 +2956,40 @@ export class Dimension {
|
|
|
2960
2956
|
* @throws This function can throw errors.
|
|
2961
2957
|
* @example createOldHorse.ts
|
|
2962
2958
|
* ```typescript
|
|
2963
|
-
*
|
|
2964
|
-
*
|
|
2959
|
+
* // create a horse and trigger the 'ageable_grow_up' event, ensuring the horse is created as an adult
|
|
2960
|
+
* overworld.spawnEntity("minecraft:horse<minecraft:ageable_grow_up>", targetLocation);
|
|
2965
2961
|
* ```
|
|
2966
2962
|
* @example quickFoxLazyDog.ts
|
|
2967
2963
|
* ```typescript
|
|
2968
|
-
*
|
|
2969
|
-
*
|
|
2970
|
-
*
|
|
2971
|
-
*
|
|
2972
|
-
*
|
|
2973
|
-
*
|
|
2974
|
-
*
|
|
2975
|
-
*
|
|
2976
|
-
*
|
|
2977
|
-
*
|
|
2978
|
-
*
|
|
2979
|
-
*
|
|
2980
|
-
*
|
|
2981
|
-
*
|
|
2982
|
-
*
|
|
2983
|
-
*
|
|
2984
|
-
*
|
|
2964
|
+
* const fox = overworld.spawnEntity("minecraft:fox", {
|
|
2965
|
+
* x: targetLocation.x + 1,
|
|
2966
|
+
* y: targetLocation.y + 2,
|
|
2967
|
+
* z: targetLocation.z + 3,
|
|
2968
|
+
* });
|
|
2969
|
+
* fox.addEffect(mc.MinecraftEffectTypes.Speed, 10, 20);
|
|
2970
|
+
* log("Created a fox.");
|
|
2971
|
+
*
|
|
2972
|
+
* const wolf = overworld.spawnEntity("minecraft:wolf", {
|
|
2973
|
+
* x: targetLocation.x + 4,
|
|
2974
|
+
* y: targetLocation.y + 2,
|
|
2975
|
+
* z: targetLocation.z + 3,
|
|
2976
|
+
* });
|
|
2977
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.Slowness, 10, 20);
|
|
2978
|
+
* wolf.isSneaking = true;
|
|
2979
|
+
* log("Created a sneaking wolf.", 1);
|
|
2985
2980
|
* ```
|
|
2986
2981
|
* @example trapTick.ts
|
|
2987
2982
|
* ```typescript
|
|
2988
|
-
*
|
|
2983
|
+
* let ticks = 0;
|
|
2989
2984
|
*
|
|
2990
|
-
*
|
|
2991
|
-
*
|
|
2985
|
+
* mc.world.events.tick.subscribe((event: mc.TickEvent) => {
|
|
2986
|
+
* ticks++;
|
|
2992
2987
|
*
|
|
2993
|
-
*
|
|
2994
|
-
*
|
|
2995
|
-
*
|
|
2996
|
-
*
|
|
2997
|
-
*
|
|
2988
|
+
* // Minecraft runs at 20 ticks per second
|
|
2989
|
+
* if (ticks % 1200 === 0) {
|
|
2990
|
+
* overworld.runCommand("say Another minute passes...");
|
|
2991
|
+
* }
|
|
2992
|
+
* });
|
|
2998
2993
|
* ```
|
|
2999
2994
|
*/
|
|
3000
2995
|
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
@@ -3013,25 +3008,24 @@ export class Dimension {
|
|
|
3013
3008
|
* @throws This function can throw errors.
|
|
3014
3009
|
* @example itemStacks.ts
|
|
3015
3010
|
* ```typescript
|
|
3016
|
-
*
|
|
3017
|
-
*
|
|
3018
|
-
*
|
|
3011
|
+
* const oneItemLoc: mc.Vector3 = { x: 3, y: 2, z: 1 };
|
|
3012
|
+
* const fiveItemsLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
3013
|
+
* const diamondPickaxeLoc: mc.Vector3 = { x: 2, y: 2, z: 4 };
|
|
3019
3014
|
*
|
|
3020
|
-
*
|
|
3021
|
-
*
|
|
3022
|
-
*
|
|
3023
|
-
*
|
|
3024
|
-
* overworld.spawnItem(oneEmerald, oneItemLoc);
|
|
3025
|
-
* overworld.spawnItem(fiveEmeralds, fiveItemsLoc);
|
|
3026
|
-
* overworld.spawnItem(onePickaxe, diamondPickaxeLoc);
|
|
3015
|
+
* const oneEmerald = new mc.ItemStack(mc.MinecraftItemTypes.emerald, 1, 0);
|
|
3016
|
+
* const onePickaxe = new mc.ItemStack(mc.MinecraftItemTypes.diamondPickaxe, 1, 0);
|
|
3017
|
+
* const fiveEmeralds = new mc.ItemStack(mc.MinecraftItemTypes.emerald, 5, 0);
|
|
3027
3018
|
*
|
|
3019
|
+
* overworld.spawnItem(oneEmerald, oneItemLoc);
|
|
3020
|
+
* overworld.spawnItem(fiveEmeralds, fiveItemsLoc);
|
|
3021
|
+
* overworld.spawnItem(onePickaxe, diamondPickaxeLoc);
|
|
3028
3022
|
* ```
|
|
3029
3023
|
* @example spawnItem.ts
|
|
3030
3024
|
* ```typescript
|
|
3031
|
-
*
|
|
3025
|
+
* const featherItem = new mc.ItemStack(mc.MinecraftItemTypes.feather, 1, 0);
|
|
3032
3026
|
*
|
|
3033
|
-
*
|
|
3034
|
-
*
|
|
3027
|
+
* overworld.spawnItem(featherItem, targetLocation);
|
|
3028
|
+
* log("New feather created!");
|
|
3035
3029
|
* ```
|
|
3036
3030
|
*/
|
|
3037
3031
|
spawnItem(itemStack: ItemStack, location: Vector3): Entity;
|
|
@@ -3554,7 +3548,7 @@ export class Entity {
|
|
|
3554
3548
|
/**
|
|
3555
3549
|
* @beta
|
|
3556
3550
|
* @remarks
|
|
3557
|
-
* Adds an effect, like poison, to the entity.
|
|
3551
|
+
* Adds or updates an effect, like poison, to the entity.
|
|
3558
3552
|
*
|
|
3559
3553
|
* This function can't be called in read-only mode.
|
|
3560
3554
|
*
|
|
@@ -3568,42 +3562,41 @@ export class Entity {
|
|
|
3568
3562
|
* @param options
|
|
3569
3563
|
* Additional options for the effect.
|
|
3570
3564
|
* @returns
|
|
3571
|
-
* Returns
|
|
3572
|
-
*
|
|
3573
|
-
* ranges
|
|
3565
|
+
* Returns nothing if the effect was added or updated
|
|
3566
|
+
* successfully. This can throw an error if the duration or
|
|
3567
|
+
* amplifier are outside of the valid ranges, or if the effect
|
|
3568
|
+
* does not exist.
|
|
3574
3569
|
* @throws This function can throw errors.
|
|
3575
3570
|
* @example addEffect.js
|
|
3576
3571
|
* ```typescript
|
|
3577
|
-
*
|
|
3578
|
-
*
|
|
3579
|
-
*
|
|
3580
|
-
*
|
|
3581
|
-
*
|
|
3582
|
-
* villager.addEffect(EffectTypes.get('poison'), duration, { amplifier: 1 });
|
|
3572
|
+
* const villagerId = 'minecraft:villager_v2<minecraft:ageable_grow_up>';
|
|
3573
|
+
* const villagerLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
3574
|
+
* const villager = test.spawn(villagerId, villagerLoc);
|
|
3575
|
+
* const duration = 20;
|
|
3583
3576
|
*
|
|
3577
|
+
* villager.addEffect(EffectTypes.get('poison'), duration, { amplifier: 1 });
|
|
3584
3578
|
* ```
|
|
3585
3579
|
* @example quickFoxLazyDog.ts
|
|
3586
3580
|
* ```typescript
|
|
3587
|
-
*
|
|
3588
|
-
*
|
|
3589
|
-
*
|
|
3590
|
-
*
|
|
3591
|
-
*
|
|
3592
|
-
*
|
|
3593
|
-
*
|
|
3594
|
-
*
|
|
3595
|
-
*
|
|
3596
|
-
*
|
|
3597
|
-
*
|
|
3598
|
-
*
|
|
3599
|
-
*
|
|
3600
|
-
*
|
|
3601
|
-
*
|
|
3602
|
-
*
|
|
3603
|
-
*
|
|
3581
|
+
* const fox = overworld.spawnEntity('minecraft:fox', {
|
|
3582
|
+
* x: targetLocation.x + 1,
|
|
3583
|
+
* y: targetLocation.y + 2,
|
|
3584
|
+
* z: targetLocation.z + 3,
|
|
3585
|
+
* });
|
|
3586
|
+
* fox.addEffect(mc.MinecraftEffectTypes.Speed, 10, { amplifier: 20 });
|
|
3587
|
+
* log('Created a fox.');
|
|
3588
|
+
*
|
|
3589
|
+
* const wolf = overworld.spawnEntity('minecraft:wolf', {
|
|
3590
|
+
* x: targetLocation.x + 4,
|
|
3591
|
+
* y: targetLocation.y + 2,
|
|
3592
|
+
* z: targetLocation.z + 3,
|
|
3593
|
+
* });
|
|
3594
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.Slowness, 10, { amplifier: 20 });
|
|
3595
|
+
* wolf.isSneaking = true;
|
|
3596
|
+
* log('Created a sneaking wolf.', 1);
|
|
3604
3597
|
* ```
|
|
3605
3598
|
*/
|
|
3606
|
-
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions):
|
|
3599
|
+
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
|
|
3607
3600
|
/**
|
|
3608
3601
|
* @beta
|
|
3609
3602
|
* @remarks
|
|
@@ -3757,13 +3750,15 @@ export class Entity {
|
|
|
3757
3750
|
* @beta
|
|
3758
3751
|
* @remarks
|
|
3759
3752
|
* Returns the effect for the specified EffectType on the
|
|
3760
|
-
* entity,
|
|
3753
|
+
* entity, undefined if the effect is not present, or throws an
|
|
3754
|
+
* error if the effect does not exist.
|
|
3761
3755
|
*
|
|
3762
3756
|
* @param effectType
|
|
3763
3757
|
* The effect identifier.
|
|
3764
3758
|
* @returns
|
|
3765
|
-
* Effect object for the specified effect,
|
|
3766
|
-
* effect is not present
|
|
3759
|
+
* Effect object for the specified effect, undefined if the
|
|
3760
|
+
* effect is not present, or throws an error if the effect does
|
|
3761
|
+
* not exist.
|
|
3767
3762
|
* @throws This function can throw errors.
|
|
3768
3763
|
*/
|
|
3769
3764
|
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
@@ -3921,8 +3916,9 @@ export class Entity {
|
|
|
3921
3916
|
* @param effectType
|
|
3922
3917
|
* The effect identifier.
|
|
3923
3918
|
* @returns
|
|
3924
|
-
* Returns true if the effect has been removed
|
|
3925
|
-
* effect is not present
|
|
3919
|
+
* Returns true if the effect has been removed, false if the
|
|
3920
|
+
* effect is not present, or will throw an error if the effect
|
|
3921
|
+
* does not exist.
|
|
3926
3922
|
* @throws This function can throw errors.
|
|
3927
3923
|
*/
|
|
3928
3924
|
removeEffect(effectType: EffectType | string): boolean;
|
|
@@ -4603,6 +4599,43 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
4603
4599
|
getFeedItems(): FeedItem[];
|
|
4604
4600
|
}
|
|
4605
4601
|
|
|
4602
|
+
/**
|
|
4603
|
+
* @beta
|
|
4604
|
+
* Contains information related to an entity when its health
|
|
4605
|
+
* changes. Warning: don't change the health of an entity in
|
|
4606
|
+
* this event, or it will cause an infinite loop!
|
|
4607
|
+
*/
|
|
4608
|
+
export class EntityHealthChangedAfterEvent {
|
|
4609
|
+
protected constructor();
|
|
4610
|
+
/**
|
|
4611
|
+
* @remarks
|
|
4612
|
+
* Entity whose health changed.
|
|
4613
|
+
*
|
|
4614
|
+
*/
|
|
4615
|
+
readonly entity: Entity;
|
|
4616
|
+
/**
|
|
4617
|
+
* @remarks
|
|
4618
|
+
* New health value of the entity.
|
|
4619
|
+
*
|
|
4620
|
+
*/
|
|
4621
|
+
readonly newValue: number;
|
|
4622
|
+
/**
|
|
4623
|
+
* @remarks
|
|
4624
|
+
* Old health value of the entity.
|
|
4625
|
+
*
|
|
4626
|
+
*/
|
|
4627
|
+
readonly oldValue: number;
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4630
|
+
/**
|
|
4631
|
+
* @beta
|
|
4632
|
+
* Manages callbacks that are connected to when the health of
|
|
4633
|
+
* an entity changes.
|
|
4634
|
+
*/
|
|
4635
|
+
export class EntityHealthChangedAfterEventSignal extends IEntityHealthChangedAfterEventSignal {
|
|
4636
|
+
protected constructor();
|
|
4637
|
+
}
|
|
4638
|
+
|
|
4606
4639
|
/**
|
|
4607
4640
|
* @beta
|
|
4608
4641
|
* Defines the health properties of an entity.
|
|
@@ -6405,6 +6438,29 @@ export class IEntityDieAfterEventSignal {
|
|
|
6405
6438
|
unsubscribe(callback: (arg: EntityDieAfterEvent) => void): void;
|
|
6406
6439
|
}
|
|
6407
6440
|
|
|
6441
|
+
/**
|
|
6442
|
+
* @beta
|
|
6443
|
+
*/
|
|
6444
|
+
export class IEntityHealthChangedAfterEventSignal {
|
|
6445
|
+
protected constructor();
|
|
6446
|
+
/**
|
|
6447
|
+
* @remarks
|
|
6448
|
+
* This function can't be called in read-only mode.
|
|
6449
|
+
*
|
|
6450
|
+
*/
|
|
6451
|
+
subscribe(
|
|
6452
|
+
callback: (arg: EntityHealthChangedAfterEvent) => void,
|
|
6453
|
+
options?: EntityEventOptions,
|
|
6454
|
+
): (arg: EntityHealthChangedAfterEvent) => void;
|
|
6455
|
+
/**
|
|
6456
|
+
* @remarks
|
|
6457
|
+
* This function can't be called in read-only mode.
|
|
6458
|
+
*
|
|
6459
|
+
* @throws This function can throw errors.
|
|
6460
|
+
*/
|
|
6461
|
+
unsubscribe(callback: (arg: EntityHealthChangedAfterEvent) => void): void;
|
|
6462
|
+
}
|
|
6463
|
+
|
|
6408
6464
|
/**
|
|
6409
6465
|
* @beta
|
|
6410
6466
|
* Provides an adaptable interface for callers to subscribe to
|
|
@@ -6939,6 +6995,46 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
6939
6995
|
unsubscribe(callback: (arg: PlayerSpawnAfterEvent) => void): void;
|
|
6940
6996
|
}
|
|
6941
6997
|
|
|
6998
|
+
/**
|
|
6999
|
+
* @beta
|
|
7000
|
+
*/
|
|
7001
|
+
export class IPressurePlatePopAfterEventSignal {
|
|
7002
|
+
protected constructor();
|
|
7003
|
+
/**
|
|
7004
|
+
* @remarks
|
|
7005
|
+
* This function can't be called in read-only mode.
|
|
7006
|
+
*
|
|
7007
|
+
*/
|
|
7008
|
+
subscribe(callback: (arg: PressurePlatePopAfterEvent) => void): (arg: PressurePlatePopAfterEvent) => void;
|
|
7009
|
+
/**
|
|
7010
|
+
* @remarks
|
|
7011
|
+
* This function can't be called in read-only mode.
|
|
7012
|
+
*
|
|
7013
|
+
* @throws This function can throw errors.
|
|
7014
|
+
*/
|
|
7015
|
+
unsubscribe(callback: (arg: PressurePlatePopAfterEvent) => void): void;
|
|
7016
|
+
}
|
|
7017
|
+
|
|
7018
|
+
/**
|
|
7019
|
+
* @beta
|
|
7020
|
+
*/
|
|
7021
|
+
export class IPressurePlatePushAfterEventSignal {
|
|
7022
|
+
protected constructor();
|
|
7023
|
+
/**
|
|
7024
|
+
* @remarks
|
|
7025
|
+
* This function can't be called in read-only mode.
|
|
7026
|
+
*
|
|
7027
|
+
*/
|
|
7028
|
+
subscribe(callback: (arg: PressurePlatePushAfterEvent) => void): (arg: PressurePlatePushAfterEvent) => void;
|
|
7029
|
+
/**
|
|
7030
|
+
* @remarks
|
|
7031
|
+
* This function can't be called in read-only mode.
|
|
7032
|
+
*
|
|
7033
|
+
* @throws This function can throw errors.
|
|
7034
|
+
*/
|
|
7035
|
+
unsubscribe(callback: (arg: PressurePlatePushAfterEvent) => void): void;
|
|
7036
|
+
}
|
|
7037
|
+
|
|
6942
7038
|
/**
|
|
6943
7039
|
* @beta
|
|
6944
7040
|
* Provides an adaptable interface for callers to subscribe to
|
|
@@ -7009,6 +7105,26 @@ export class IServerMessageAfterEventSignal {
|
|
|
7009
7105
|
unsubscribe(callback: (arg: MessageReceiveAfterEvent) => void): void;
|
|
7010
7106
|
}
|
|
7011
7107
|
|
|
7108
|
+
/**
|
|
7109
|
+
* @beta
|
|
7110
|
+
*/
|
|
7111
|
+
export class ITargetBlockHitAfterEventSignal {
|
|
7112
|
+
protected constructor();
|
|
7113
|
+
/**
|
|
7114
|
+
* @remarks
|
|
7115
|
+
* This function can't be called in read-only mode.
|
|
7116
|
+
*
|
|
7117
|
+
*/
|
|
7118
|
+
subscribe(callback: (arg: TargetBlockHitAfterEvent) => void): (arg: TargetBlockHitAfterEvent) => void;
|
|
7119
|
+
/**
|
|
7120
|
+
* @remarks
|
|
7121
|
+
* This function can't be called in read-only mode.
|
|
7122
|
+
*
|
|
7123
|
+
* @throws This function can throw errors.
|
|
7124
|
+
*/
|
|
7125
|
+
unsubscribe(callback: (arg: TargetBlockHitAfterEvent) => void): void;
|
|
7126
|
+
}
|
|
7127
|
+
|
|
7012
7128
|
/**
|
|
7013
7129
|
* @beta
|
|
7014
7130
|
* Contains information related to a chargeable item completing
|
|
@@ -7448,11 +7564,10 @@ export class ItemStack {
|
|
|
7448
7564
|
* stack, undefined is returned.
|
|
7449
7565
|
* @example durability.ts
|
|
7450
7566
|
* ```typescript
|
|
7451
|
-
*
|
|
7452
|
-
*
|
|
7453
|
-
*
|
|
7454
|
-
*
|
|
7455
|
-
*
|
|
7567
|
+
* // Get the maximum durability of a custom sword item
|
|
7568
|
+
* const itemStack = new ItemStack("custom:sword");
|
|
7569
|
+
* const durability = itemStack.getComponent("minecraft:durability") as ItemDurabilityComponent;
|
|
7570
|
+
* const maxDurability = durability.maxDurability;
|
|
7456
7571
|
* ```
|
|
7457
7572
|
*/
|
|
7458
7573
|
getComponent(componentId: string): ItemComponent | undefined;
|
|
@@ -7528,10 +7643,9 @@ export class ItemStack {
|
|
|
7528
7643
|
* Throws if any of the provided block identifiers are invalid.
|
|
7529
7644
|
* @example example.ts
|
|
7530
7645
|
* ```typescript
|
|
7531
|
-
*
|
|
7532
|
-
*
|
|
7533
|
-
*
|
|
7534
|
-
*
|
|
7646
|
+
* // Creates a diamond pickaxe that can destroy cobblestone and obsidian
|
|
7647
|
+
* const specialPickaxe = new ItemStack("minecraft:diamond_pickaxe");
|
|
7648
|
+
* specialPickaxe.setCanDestroy(["minecraft:cobblestone", "minecraft:obsidian"]);
|
|
7535
7649
|
* ```
|
|
7536
7650
|
*/
|
|
7537
7651
|
setCanDestroy(blockIdentifiers?: string[]): void;
|
|
@@ -7549,10 +7663,9 @@ export class ItemStack {
|
|
|
7549
7663
|
* Throws if any of the provided block identifiers are invalid.
|
|
7550
7664
|
* @example example.ts
|
|
7551
7665
|
* ```typescript
|
|
7552
|
-
*
|
|
7553
|
-
*
|
|
7554
|
-
*
|
|
7555
|
-
*
|
|
7666
|
+
* // Creates a gold block that can be placed on grass and dirt
|
|
7667
|
+
* const specialGoldBlock = new ItemStack("minecraft:gold_block");
|
|
7668
|
+
* specialPickaxe.setCanPlaceOn(["minecraft:grass", "minecraft:dirt"]);
|
|
7556
7669
|
* ```
|
|
7557
7670
|
*/
|
|
7558
7671
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
@@ -7566,10 +7679,9 @@ export class ItemStack {
|
|
|
7566
7679
|
*
|
|
7567
7680
|
* @example multilineLore.ts
|
|
7568
7681
|
* ```typescript
|
|
7569
|
-
*
|
|
7570
|
-
*
|
|
7571
|
-
*
|
|
7572
|
-
*
|
|
7682
|
+
* // Set the lore of an item to multiple lines of text
|
|
7683
|
+
* const itemStack = new ItemStack("minecraft:diamond_sword");
|
|
7684
|
+
* itemStack.setLore(["Line 1", "Line 2", "Line 3"]);
|
|
7573
7685
|
* ```
|
|
7574
7686
|
*/
|
|
7575
7687
|
setLore(loreList?: string[]): void;
|
|
@@ -7932,6 +8044,26 @@ export class ItemUseOnBeforeEventSignal extends IItemUseOnBeforeEventSignal {
|
|
|
7932
8044
|
protected constructor();
|
|
7933
8045
|
}
|
|
7934
8046
|
|
|
8047
|
+
/**
|
|
8048
|
+
* @beta
|
|
8049
|
+
*/
|
|
8050
|
+
export class ITripWireTripAfterEventSignal {
|
|
8051
|
+
protected constructor();
|
|
8052
|
+
/**
|
|
8053
|
+
* @remarks
|
|
8054
|
+
* This function can't be called in read-only mode.
|
|
8055
|
+
*
|
|
8056
|
+
*/
|
|
8057
|
+
subscribe(callback: (arg: TripWireTripAfterEvent) => void): (arg: TripWireTripAfterEvent) => void;
|
|
8058
|
+
/**
|
|
8059
|
+
* @remarks
|
|
8060
|
+
* This function can't be called in read-only mode.
|
|
8061
|
+
*
|
|
8062
|
+
* @throws This function can throw errors.
|
|
8063
|
+
*/
|
|
8064
|
+
unsubscribe(callback: (arg: TripWireTripAfterEvent) => void): void;
|
|
8065
|
+
}
|
|
8066
|
+
|
|
7935
8067
|
/**
|
|
7936
8068
|
* @beta
|
|
7937
8069
|
* An event that fires before the watchdog is about to
|
|
@@ -8327,6 +8459,7 @@ export class MinecraftBlockTypes {
|
|
|
8327
8459
|
*/
|
|
8328
8460
|
static readonly blackCandleCake: BlockType;
|
|
8329
8461
|
static readonly blackCarpet: BlockType;
|
|
8462
|
+
static readonly blackConcrete: BlockType;
|
|
8330
8463
|
/**
|
|
8331
8464
|
* @remarks
|
|
8332
8465
|
* Represents a black glazed terracotta block within Minecraft.
|
|
@@ -8384,6 +8517,7 @@ export class MinecraftBlockTypes {
|
|
|
8384
8517
|
*/
|
|
8385
8518
|
static readonly blueCandleCake: BlockType;
|
|
8386
8519
|
static readonly blueCarpet: BlockType;
|
|
8520
|
+
static readonly blueConcrete: BlockType;
|
|
8387
8521
|
/**
|
|
8388
8522
|
* @remarks
|
|
8389
8523
|
* Represents a blue glazed terracotta block within Minecraft.
|
|
@@ -8448,6 +8582,7 @@ export class MinecraftBlockTypes {
|
|
|
8448
8582
|
*/
|
|
8449
8583
|
static readonly brownCandleCake: BlockType;
|
|
8450
8584
|
static readonly brownCarpet: BlockType;
|
|
8585
|
+
static readonly brownConcrete: BlockType;
|
|
8451
8586
|
/**
|
|
8452
8587
|
* @remarks
|
|
8453
8588
|
* Represents a brown glazed terracotta block within Minecraft.
|
|
@@ -8745,12 +8880,6 @@ export class MinecraftBlockTypes {
|
|
|
8745
8880
|
*
|
|
8746
8881
|
*/
|
|
8747
8882
|
static readonly composter: BlockType;
|
|
8748
|
-
/**
|
|
8749
|
-
* @remarks
|
|
8750
|
-
* Represents a block of concrete powder within Minecraft.
|
|
8751
|
-
*
|
|
8752
|
-
*/
|
|
8753
|
-
static readonly concrete: BlockType;
|
|
8754
8883
|
/**
|
|
8755
8884
|
* @remarks
|
|
8756
8885
|
* Represents a block of concrete powder within Minecraft.
|
|
@@ -8989,6 +9118,7 @@ export class MinecraftBlockTypes {
|
|
|
8989
9118
|
*/
|
|
8990
9119
|
static readonly cyanCandleCake: BlockType;
|
|
8991
9120
|
static readonly cyanCarpet: BlockType;
|
|
9121
|
+
static readonly cyanConcrete: BlockType;
|
|
8992
9122
|
/**
|
|
8993
9123
|
* @remarks
|
|
8994
9124
|
* Represents a block of cyan-colored glazed terracotta within
|
|
@@ -10423,6 +10553,7 @@ export class MinecraftBlockTypes {
|
|
|
10423
10553
|
*/
|
|
10424
10554
|
static readonly grayCandleCake: BlockType;
|
|
10425
10555
|
static readonly grayCarpet: BlockType;
|
|
10556
|
+
static readonly grayConcrete: BlockType;
|
|
10426
10557
|
/**
|
|
10427
10558
|
* @remarks
|
|
10428
10559
|
* Represents a gray-colored block of glazed terracotta within
|
|
@@ -10445,6 +10576,7 @@ export class MinecraftBlockTypes {
|
|
|
10445
10576
|
*/
|
|
10446
10577
|
static readonly greenCandleCake: BlockType;
|
|
10447
10578
|
static readonly greenCarpet: BlockType;
|
|
10579
|
+
static readonly greenConcrete: BlockType;
|
|
10448
10580
|
/**
|
|
10449
10581
|
* @remarks
|
|
10450
10582
|
* Represents a green block of glazed terracotta within
|
|
@@ -10737,6 +10869,7 @@ export class MinecraftBlockTypes {
|
|
|
10737
10869
|
*/
|
|
10738
10870
|
static readonly lightBlueCandleCake: BlockType;
|
|
10739
10871
|
static readonly lightBlueCarpet: BlockType;
|
|
10872
|
+
static readonly lightBlueConcrete: BlockType;
|
|
10740
10873
|
/**
|
|
10741
10874
|
* @remarks
|
|
10742
10875
|
* Represents a light blue block of glazed terracotta within
|
|
@@ -10759,6 +10892,7 @@ export class MinecraftBlockTypes {
|
|
|
10759
10892
|
*/
|
|
10760
10893
|
static readonly lightGrayCandleCake: BlockType;
|
|
10761
10894
|
static readonly lightGrayCarpet: BlockType;
|
|
10895
|
+
static readonly lightGrayConcrete: BlockType;
|
|
10762
10896
|
static readonly lightGrayShulkerBox: BlockType;
|
|
10763
10897
|
static readonly lightGrayWool: BlockType;
|
|
10764
10898
|
/**
|
|
@@ -10786,6 +10920,7 @@ export class MinecraftBlockTypes {
|
|
|
10786
10920
|
*/
|
|
10787
10921
|
static readonly limeCandleCake: BlockType;
|
|
10788
10922
|
static readonly limeCarpet: BlockType;
|
|
10923
|
+
static readonly limeConcrete: BlockType;
|
|
10789
10924
|
/**
|
|
10790
10925
|
* @remarks
|
|
10791
10926
|
* Represents a lime-colored block of glazed terracotta within
|
|
@@ -10862,6 +10997,7 @@ export class MinecraftBlockTypes {
|
|
|
10862
10997
|
*/
|
|
10863
10998
|
static readonly magentaCandleCake: BlockType;
|
|
10864
10999
|
static readonly magentaCarpet: BlockType;
|
|
11000
|
+
static readonly magentaConcrete: BlockType;
|
|
10865
11001
|
/**
|
|
10866
11002
|
* @remarks
|
|
10867
11003
|
* Represents a block of magenta-colored glazed terracotta
|
|
@@ -11080,6 +11216,7 @@ export class MinecraftBlockTypes {
|
|
|
11080
11216
|
*/
|
|
11081
11217
|
static readonly orangeCandleCake: BlockType;
|
|
11082
11218
|
static readonly orangeCarpet: BlockType;
|
|
11219
|
+
static readonly orangeConcrete: BlockType;
|
|
11083
11220
|
/**
|
|
11084
11221
|
* @remarks
|
|
11085
11222
|
* Represents a block of orange-colored glazed terracotta
|
|
@@ -11142,6 +11279,7 @@ export class MinecraftBlockTypes {
|
|
|
11142
11279
|
*/
|
|
11143
11280
|
static readonly pinkCandleCake: BlockType;
|
|
11144
11281
|
static readonly pinkCarpet: BlockType;
|
|
11282
|
+
static readonly pinkConcrete: BlockType;
|
|
11145
11283
|
/**
|
|
11146
11284
|
* @remarks
|
|
11147
11285
|
* Represents a pink-colored block of glazed terracotta within
|
|
@@ -11390,6 +11528,7 @@ export class MinecraftBlockTypes {
|
|
|
11390
11528
|
*/
|
|
11391
11529
|
static readonly purpleCandleCake: BlockType;
|
|
11392
11530
|
static readonly purpleCarpet: BlockType;
|
|
11531
|
+
static readonly purpleConcrete: BlockType;
|
|
11393
11532
|
/**
|
|
11394
11533
|
* @remarks
|
|
11395
11534
|
* Represents a purple-colored block of glazed terracotta
|
|
@@ -11473,6 +11612,7 @@ export class MinecraftBlockTypes {
|
|
|
11473
11612
|
*/
|
|
11474
11613
|
static readonly redCandleCake: BlockType;
|
|
11475
11614
|
static readonly redCarpet: BlockType;
|
|
11615
|
+
static readonly redConcrete: BlockType;
|
|
11476
11616
|
/**
|
|
11477
11617
|
* @remarks
|
|
11478
11618
|
* Represents a red flower within Minecraft.
|
|
@@ -12478,6 +12618,7 @@ export class MinecraftBlockTypes {
|
|
|
12478
12618
|
*/
|
|
12479
12619
|
static readonly whiteCandleCake: BlockType;
|
|
12480
12620
|
static readonly whiteCarpet: BlockType;
|
|
12621
|
+
static readonly whiteConcrete: BlockType;
|
|
12481
12622
|
/**
|
|
12482
12623
|
* @remarks
|
|
12483
12624
|
* Represents a block of white glazed terracotta within
|
|
@@ -12536,6 +12677,7 @@ export class MinecraftBlockTypes {
|
|
|
12536
12677
|
*/
|
|
12537
12678
|
static readonly yellowCandleCake: BlockType;
|
|
12538
12679
|
static readonly yellowCarpet: BlockType;
|
|
12680
|
+
static readonly yellowConcrete: BlockType;
|
|
12539
12681
|
/**
|
|
12540
12682
|
* @remarks
|
|
12541
12683
|
* Represents a yellow flower within Minecraft.
|
|
@@ -12607,7 +12749,6 @@ export class MinecraftDimensionTypes {
|
|
|
12607
12749
|
|
|
12608
12750
|
/**
|
|
12609
12751
|
* @beta
|
|
12610
|
-
* Returns available installed effect types within Minecraft.
|
|
12611
12752
|
*/
|
|
12612
12753
|
export class MinecraftEffectTypes {
|
|
12613
12754
|
protected constructor();
|
|
@@ -13071,6 +13212,7 @@ export class MinecraftItemTypes {
|
|
|
13071
13212
|
*/
|
|
13072
13213
|
static readonly blackCandle: ItemType;
|
|
13073
13214
|
static readonly blackCarpet: ItemType;
|
|
13215
|
+
static readonly blackConcrete: ItemType;
|
|
13074
13216
|
static readonly blackDye: ItemType;
|
|
13075
13217
|
/**
|
|
13076
13218
|
* @remarks
|
|
@@ -13127,6 +13269,7 @@ export class MinecraftItemTypes {
|
|
|
13127
13269
|
*/
|
|
13128
13270
|
static readonly blueCandle: ItemType;
|
|
13129
13271
|
static readonly blueCarpet: ItemType;
|
|
13272
|
+
static readonly blueConcrete: ItemType;
|
|
13130
13273
|
static readonly blueDye: ItemType;
|
|
13131
13274
|
/**
|
|
13132
13275
|
* @remarks
|
|
@@ -13204,6 +13347,7 @@ export class MinecraftItemTypes {
|
|
|
13204
13347
|
*/
|
|
13205
13348
|
static readonly brownCandle: ItemType;
|
|
13206
13349
|
static readonly brownCarpet: ItemType;
|
|
13350
|
+
static readonly brownConcrete: ItemType;
|
|
13207
13351
|
static readonly brownDye: ItemType;
|
|
13208
13352
|
/**
|
|
13209
13353
|
* @remarks
|
|
@@ -13711,6 +13855,7 @@ export class MinecraftItemTypes {
|
|
|
13711
13855
|
*/
|
|
13712
13856
|
static readonly cyanCandle: ItemType;
|
|
13713
13857
|
static readonly cyanCarpet: ItemType;
|
|
13858
|
+
static readonly cyanConcrete: ItemType;
|
|
13714
13859
|
static readonly cyanDye: ItemType;
|
|
13715
13860
|
/**
|
|
13716
13861
|
* @remarks
|
|
@@ -14341,6 +14486,7 @@ export class MinecraftItemTypes {
|
|
|
14341
14486
|
*/
|
|
14342
14487
|
static readonly grayCandle: ItemType;
|
|
14343
14488
|
static readonly grayCarpet: ItemType;
|
|
14489
|
+
static readonly grayConcrete: ItemType;
|
|
14344
14490
|
static readonly grayDye: ItemType;
|
|
14345
14491
|
/**
|
|
14346
14492
|
* @remarks
|
|
@@ -14359,6 +14505,7 @@ export class MinecraftItemTypes {
|
|
|
14359
14505
|
*/
|
|
14360
14506
|
static readonly greenCandle: ItemType;
|
|
14361
14507
|
static readonly greenCarpet: ItemType;
|
|
14508
|
+
static readonly greenConcrete: ItemType;
|
|
14362
14509
|
static readonly greenDye: ItemType;
|
|
14363
14510
|
/**
|
|
14364
14511
|
* @remarks
|
|
@@ -14658,6 +14805,7 @@ export class MinecraftItemTypes {
|
|
|
14658
14805
|
*/
|
|
14659
14806
|
static readonly lightBlueCandle: ItemType;
|
|
14660
14807
|
static readonly lightBlueCarpet: ItemType;
|
|
14808
|
+
static readonly lightBlueConcrete: ItemType;
|
|
14661
14809
|
static readonly lightBlueDye: ItemType;
|
|
14662
14810
|
/**
|
|
14663
14811
|
* @remarks
|
|
@@ -14676,6 +14824,7 @@ export class MinecraftItemTypes {
|
|
|
14676
14824
|
*/
|
|
14677
14825
|
static readonly lightGrayCandle: ItemType;
|
|
14678
14826
|
static readonly lightGrayCarpet: ItemType;
|
|
14827
|
+
static readonly lightGrayConcrete: ItemType;
|
|
14679
14828
|
static readonly lightGrayDye: ItemType;
|
|
14680
14829
|
static readonly lightGrayShulkerBox: ItemType;
|
|
14681
14830
|
static readonly lightGrayWool: ItemType;
|
|
@@ -14701,6 +14850,7 @@ export class MinecraftItemTypes {
|
|
|
14701
14850
|
*/
|
|
14702
14851
|
static readonly limeCandle: ItemType;
|
|
14703
14852
|
static readonly limeCarpet: ItemType;
|
|
14853
|
+
static readonly limeConcrete: ItemType;
|
|
14704
14854
|
static readonly limeDye: ItemType;
|
|
14705
14855
|
/**
|
|
14706
14856
|
* @remarks
|
|
@@ -14755,6 +14905,7 @@ export class MinecraftItemTypes {
|
|
|
14755
14905
|
*/
|
|
14756
14906
|
static readonly magentaCandle: ItemType;
|
|
14757
14907
|
static readonly magentaCarpet: ItemType;
|
|
14908
|
+
static readonly magentaConcrete: ItemType;
|
|
14758
14909
|
static readonly magentaDye: ItemType;
|
|
14759
14910
|
/**
|
|
14760
14911
|
* @remarks
|
|
@@ -15028,6 +15179,7 @@ export class MinecraftItemTypes {
|
|
|
15028
15179
|
*/
|
|
15029
15180
|
static readonly orangeCandle: ItemType;
|
|
15030
15181
|
static readonly orangeCarpet: ItemType;
|
|
15182
|
+
static readonly orangeConcrete: ItemType;
|
|
15031
15183
|
static readonly orangeDye: ItemType;
|
|
15032
15184
|
/**
|
|
15033
15185
|
* @remarks
|
|
@@ -15094,6 +15246,7 @@ export class MinecraftItemTypes {
|
|
|
15094
15246
|
*/
|
|
15095
15247
|
static readonly pinkCandle: ItemType;
|
|
15096
15248
|
static readonly pinkCarpet: ItemType;
|
|
15249
|
+
static readonly pinkConcrete: ItemType;
|
|
15097
15250
|
static readonly pinkDye: ItemType;
|
|
15098
15251
|
/**
|
|
15099
15252
|
* @remarks
|
|
@@ -15310,6 +15463,7 @@ export class MinecraftItemTypes {
|
|
|
15310
15463
|
*/
|
|
15311
15464
|
static readonly purpleCandle: ItemType;
|
|
15312
15465
|
static readonly purpleCarpet: ItemType;
|
|
15466
|
+
static readonly purpleConcrete: ItemType;
|
|
15313
15467
|
static readonly purpleDye: ItemType;
|
|
15314
15468
|
/**
|
|
15315
15469
|
* @remarks
|
|
@@ -15410,6 +15564,7 @@ export class MinecraftItemTypes {
|
|
|
15410
15564
|
*/
|
|
15411
15565
|
static readonly redCandle: ItemType;
|
|
15412
15566
|
static readonly redCarpet: ItemType;
|
|
15567
|
+
static readonly redConcrete: ItemType;
|
|
15413
15568
|
static readonly redDye: ItemType;
|
|
15414
15569
|
/**
|
|
15415
15570
|
* @remarks
|
|
@@ -16393,6 +16548,7 @@ export class MinecraftItemTypes {
|
|
|
16393
16548
|
*/
|
|
16394
16549
|
static readonly whiteCandle: ItemType;
|
|
16395
16550
|
static readonly whiteCarpet: ItemType;
|
|
16551
|
+
static readonly whiteConcrete: ItemType;
|
|
16396
16552
|
static readonly whiteDye: ItemType;
|
|
16397
16553
|
/**
|
|
16398
16554
|
* @remarks
|
|
@@ -16470,6 +16626,7 @@ export class MinecraftItemTypes {
|
|
|
16470
16626
|
*/
|
|
16471
16627
|
static readonly yellowCandle: ItemType;
|
|
16472
16628
|
static readonly yellowCarpet: ItemType;
|
|
16629
|
+
static readonly yellowConcrete: ItemType;
|
|
16473
16630
|
static readonly yellowDye: ItemType;
|
|
16474
16631
|
/**
|
|
16475
16632
|
* @remarks
|
|
@@ -16855,33 +17012,29 @@ export class Player extends Entity {
|
|
|
16855
17012
|
* is provided to `score`.
|
|
16856
17013
|
* @example nestedTranslation.ts
|
|
16857
17014
|
* ```typescript
|
|
16858
|
-
*
|
|
16859
|
-
*
|
|
16860
|
-
*
|
|
16861
|
-
*
|
|
16862
|
-
*
|
|
16863
|
-
*
|
|
16864
|
-
*
|
|
17015
|
+
* // Displays "Apple or Coal"
|
|
17016
|
+
* let rawMessage = {
|
|
17017
|
+
* translate: "accessibility.list.or.two",
|
|
17018
|
+
* with: { rawtext: [{ translate: "item.apple.name" }, { translate: "item.coal.name" }] },
|
|
17019
|
+
* };
|
|
17020
|
+
* player.sendMessage(rawMessage);
|
|
16865
17021
|
* ```
|
|
16866
17022
|
* @example scoreWildcard.ts
|
|
16867
17023
|
* ```typescript
|
|
16868
|
-
*
|
|
16869
|
-
*
|
|
16870
|
-
*
|
|
16871
|
-
*
|
|
17024
|
+
* // Displays the player's score for objective "obj". Each player will see their own score.
|
|
17025
|
+
* const rawMessage = { score: { name: "*", objective: "obj" } };
|
|
17026
|
+
* world.sendMessage(rawMessage);
|
|
16872
17027
|
* ```
|
|
16873
17028
|
* @example simpleString.ts
|
|
16874
17029
|
* ```typescript
|
|
16875
|
-
*
|
|
16876
|
-
*
|
|
16877
|
-
*
|
|
17030
|
+
* // Displays "Hello, world!"
|
|
17031
|
+
* world.sendMessage("Hello, world!");
|
|
16878
17032
|
* ```
|
|
16879
17033
|
* @example translation.ts
|
|
16880
17034
|
* ```typescript
|
|
16881
|
-
*
|
|
16882
|
-
*
|
|
16883
|
-
*
|
|
16884
|
-
*
|
|
17035
|
+
* // Displays "First or Second"
|
|
17036
|
+
* const rawMessage = { translate: "accessibility.list.or.two", with: ["First", "Second"] };
|
|
17037
|
+
* player.sendMessage(rawMessage);
|
|
16885
17038
|
* ```
|
|
16886
17039
|
*/
|
|
16887
17040
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
@@ -17055,6 +17208,76 @@ export class PlayerSpawnAfterEventSignal extends IPlayerSpawnAfterEventSignal {
|
|
|
17055
17208
|
protected constructor();
|
|
17056
17209
|
}
|
|
17057
17210
|
|
|
17211
|
+
/**
|
|
17212
|
+
* @beta
|
|
17213
|
+
* Contains information related to changes to a pressure plate
|
|
17214
|
+
* pop.
|
|
17215
|
+
*/
|
|
17216
|
+
export class PressurePlatePopAfterEvent extends BlockEvent {
|
|
17217
|
+
protected constructor();
|
|
17218
|
+
/**
|
|
17219
|
+
* @remarks
|
|
17220
|
+
* The redstone power of the pressure plate before it was
|
|
17221
|
+
* popped.
|
|
17222
|
+
*
|
|
17223
|
+
*/
|
|
17224
|
+
readonly previousRedstonePower: number;
|
|
17225
|
+
/**
|
|
17226
|
+
* @remarks
|
|
17227
|
+
* The redstone power of the pressure plate at the time of the
|
|
17228
|
+
* pop.
|
|
17229
|
+
*
|
|
17230
|
+
*/
|
|
17231
|
+
readonly redstonePower: number;
|
|
17232
|
+
}
|
|
17233
|
+
|
|
17234
|
+
/**
|
|
17235
|
+
* @beta
|
|
17236
|
+
* Manages callbacks that are connected to when a pressure
|
|
17237
|
+
* plate is popped.
|
|
17238
|
+
*/
|
|
17239
|
+
export class PressurePlatePopAfterEventSignal extends IPressurePlatePopAfterEventSignal {
|
|
17240
|
+
protected constructor();
|
|
17241
|
+
}
|
|
17242
|
+
|
|
17243
|
+
/**
|
|
17244
|
+
* @beta
|
|
17245
|
+
* Contains information related to changes to a pressure plate
|
|
17246
|
+
* push.
|
|
17247
|
+
*/
|
|
17248
|
+
export class PressurePlatePushAfterEvent extends BlockEvent {
|
|
17249
|
+
protected constructor();
|
|
17250
|
+
/**
|
|
17251
|
+
* @remarks
|
|
17252
|
+
* The redstone power of the pressure plate before it was
|
|
17253
|
+
* pushed.
|
|
17254
|
+
*
|
|
17255
|
+
*/
|
|
17256
|
+
readonly previousRedstonePower: number;
|
|
17257
|
+
/**
|
|
17258
|
+
* @remarks
|
|
17259
|
+
* The redstone power of the pressure plate at the time of the
|
|
17260
|
+
* push.
|
|
17261
|
+
*
|
|
17262
|
+
*/
|
|
17263
|
+
readonly redstonePower: number;
|
|
17264
|
+
/**
|
|
17265
|
+
* @remarks
|
|
17266
|
+
* Source that triggered the pressure plate push.
|
|
17267
|
+
*
|
|
17268
|
+
*/
|
|
17269
|
+
readonly source: Entity;
|
|
17270
|
+
}
|
|
17271
|
+
|
|
17272
|
+
/**
|
|
17273
|
+
* @beta
|
|
17274
|
+
* Manages callbacks that are connected to when a pressure
|
|
17275
|
+
* plate is pushed.
|
|
17276
|
+
*/
|
|
17277
|
+
export class PressurePlatePushAfterEventSignal extends IPressurePlatePushAfterEventSignal {
|
|
17278
|
+
protected constructor();
|
|
17279
|
+
}
|
|
17280
|
+
|
|
17058
17281
|
/**
|
|
17059
17282
|
* @beta
|
|
17060
17283
|
* Contains information related to a projectile hitting an
|
|
@@ -17429,15 +17652,6 @@ export class ScoreboardScoreInfo {
|
|
|
17429
17652
|
*/
|
|
17430
17653
|
export class ScreenDisplay {
|
|
17431
17654
|
protected constructor();
|
|
17432
|
-
/**
|
|
17433
|
-
* @remarks
|
|
17434
|
-
* Clears the title and subtitle, if currently displayed.
|
|
17435
|
-
*
|
|
17436
|
-
* This function can't be called in read-only mode.
|
|
17437
|
-
*
|
|
17438
|
-
* @throws This function can throw errors.
|
|
17439
|
-
*/
|
|
17440
|
-
clearTitle(): void;
|
|
17441
17655
|
/**
|
|
17442
17656
|
* @remarks
|
|
17443
17657
|
* Set the action bar text - a piece of text that displays
|
|
@@ -17447,18 +17661,19 @@ export class ScreenDisplay {
|
|
|
17447
17661
|
*
|
|
17448
17662
|
* @throws This function can throw errors.
|
|
17449
17663
|
*/
|
|
17450
|
-
setActionBar(text: string): void;
|
|
17664
|
+
setActionBar(text: (RawMessage | string)[] | RawMessage | string): void;
|
|
17451
17665
|
/**
|
|
17452
17666
|
* @remarks
|
|
17453
17667
|
* Will cause a title to show up on the player's on screen
|
|
17454
|
-
* display.
|
|
17455
|
-
*
|
|
17668
|
+
* display. Will clear the title if set to empty string. You
|
|
17669
|
+
* can optionally specify an additional subtitle as well as
|
|
17670
|
+
* fade in, stay and fade out times.
|
|
17456
17671
|
*
|
|
17457
17672
|
* This function can't be called in read-only mode.
|
|
17458
17673
|
*
|
|
17459
17674
|
* @throws This function can throw errors.
|
|
17460
17675
|
*/
|
|
17461
|
-
setTitle(title: string, options?: TitleDisplayOptions): void;
|
|
17676
|
+
setTitle(title: (RawMessage | string)[] | RawMessage | string, options?: TitleDisplayOptions): void;
|
|
17462
17677
|
/**
|
|
17463
17678
|
* @remarks
|
|
17464
17679
|
* Updates the subtitle if the subtitle was previously
|
|
@@ -17468,7 +17683,7 @@ export class ScreenDisplay {
|
|
|
17468
17683
|
*
|
|
17469
17684
|
* @throws This function can throw errors.
|
|
17470
17685
|
*/
|
|
17471
|
-
updateSubtitle(subtitle: string): void;
|
|
17686
|
+
updateSubtitle(subtitle: (RawMessage | string)[] | RawMessage | string): void;
|
|
17472
17687
|
}
|
|
17473
17688
|
|
|
17474
17689
|
/**
|
|
@@ -17676,6 +17891,48 @@ export class SystemEvents {
|
|
|
17676
17891
|
readonly scriptEventReceive: ScriptEventCommandMessageAfterEventSignal;
|
|
17677
17892
|
}
|
|
17678
17893
|
|
|
17894
|
+
/**
|
|
17895
|
+
* @beta
|
|
17896
|
+
* Contains information related to changes to a target block
|
|
17897
|
+
* hit.
|
|
17898
|
+
*/
|
|
17899
|
+
export class TargetBlockHitAfterEvent extends BlockEvent {
|
|
17900
|
+
protected constructor();
|
|
17901
|
+
/**
|
|
17902
|
+
* @remarks
|
|
17903
|
+
* The position where the source hit the block.
|
|
17904
|
+
*
|
|
17905
|
+
*/
|
|
17906
|
+
readonly hitVector: Vector3;
|
|
17907
|
+
/**
|
|
17908
|
+
* @remarks
|
|
17909
|
+
* The redstone power before the block is hit.
|
|
17910
|
+
*
|
|
17911
|
+
*/
|
|
17912
|
+
readonly previousRedstonePower: number;
|
|
17913
|
+
/**
|
|
17914
|
+
* @remarks
|
|
17915
|
+
* The redstone power at the time the block is hit.
|
|
17916
|
+
*
|
|
17917
|
+
*/
|
|
17918
|
+
readonly redstonePower: number;
|
|
17919
|
+
/**
|
|
17920
|
+
* @remarks
|
|
17921
|
+
* Optional source that hit the target block.
|
|
17922
|
+
*
|
|
17923
|
+
*/
|
|
17924
|
+
readonly source: Entity;
|
|
17925
|
+
}
|
|
17926
|
+
|
|
17927
|
+
/**
|
|
17928
|
+
* @beta
|
|
17929
|
+
* Manages callbacks that are connected to when a target block
|
|
17930
|
+
* is hit.
|
|
17931
|
+
*/
|
|
17932
|
+
export class TargetBlockHitAfterEventSignal extends ITargetBlockHitAfterEventSignal {
|
|
17933
|
+
protected constructor();
|
|
17934
|
+
}
|
|
17935
|
+
|
|
17679
17936
|
/**
|
|
17680
17937
|
* @beta
|
|
17681
17938
|
* Represents a trigger for firing an event.
|
|
@@ -17695,6 +17952,35 @@ export class Trigger {
|
|
|
17695
17952
|
constructor(eventName: string);
|
|
17696
17953
|
}
|
|
17697
17954
|
|
|
17955
|
+
/**
|
|
17956
|
+
* @beta
|
|
17957
|
+
* Contains information related to changes to a trip wire trip.
|
|
17958
|
+
*/
|
|
17959
|
+
export class TripWireTripAfterEvent extends BlockEvent {
|
|
17960
|
+
protected constructor();
|
|
17961
|
+
/**
|
|
17962
|
+
* @remarks
|
|
17963
|
+
* Whether or not the block has redstone power.
|
|
17964
|
+
*
|
|
17965
|
+
*/
|
|
17966
|
+
readonly isPowered: boolean;
|
|
17967
|
+
/**
|
|
17968
|
+
* @remarks
|
|
17969
|
+
* The sources that triggered the trip wire to trip.
|
|
17970
|
+
*
|
|
17971
|
+
*/
|
|
17972
|
+
readonly sources: Entity[];
|
|
17973
|
+
}
|
|
17974
|
+
|
|
17975
|
+
/**
|
|
17976
|
+
* @beta
|
|
17977
|
+
* Manages callbacks that are connected to when a trip wire is
|
|
17978
|
+
* tripped.
|
|
17979
|
+
*/
|
|
17980
|
+
export class TripWireTripAfterEventSignal extends ITripWireTripAfterEventSignal {
|
|
17981
|
+
protected constructor();
|
|
17982
|
+
}
|
|
17983
|
+
|
|
17698
17984
|
/**
|
|
17699
17985
|
* @beta
|
|
17700
17986
|
* Contains a description of a vector.
|
|
@@ -17828,6 +18114,7 @@ export class Vector {
|
|
|
17828
18114
|
* @remarks
|
|
17829
18115
|
* Returns the component-wise division of these vectors.
|
|
17830
18116
|
*
|
|
18117
|
+
* @throws This function can throw errors.
|
|
17831
18118
|
*/
|
|
17832
18119
|
static divide(a: Vector3, b: number | Vector3): Vector;
|
|
17833
18120
|
/**
|
|
@@ -18120,33 +18407,29 @@ export class World {
|
|
|
18120
18407
|
* is provided to `score`.
|
|
18121
18408
|
* @example nestedTranslation.ts
|
|
18122
18409
|
* ```typescript
|
|
18123
|
-
*
|
|
18124
|
-
*
|
|
18125
|
-
*
|
|
18126
|
-
*
|
|
18127
|
-
*
|
|
18128
|
-
*
|
|
18129
|
-
*
|
|
18410
|
+
* // Displays "Apple or Coal"
|
|
18411
|
+
* let rawMessage = {
|
|
18412
|
+
* translate: "accessibility.list.or.two",
|
|
18413
|
+
* with: { rawtext: [{ translate: "item.apple.name" }, { translate: "item.coal.name" }] },
|
|
18414
|
+
* };
|
|
18415
|
+
* world.sendMessage(rawMessage);
|
|
18130
18416
|
* ```
|
|
18131
18417
|
* @example scoreWildcard.ts
|
|
18132
18418
|
* ```typescript
|
|
18133
|
-
*
|
|
18134
|
-
*
|
|
18135
|
-
*
|
|
18136
|
-
*
|
|
18419
|
+
* // Displays the player's score for objective "obj". Each player will see their own score.
|
|
18420
|
+
* const rawMessage = { score: { name: "*", objective: "obj" } };
|
|
18421
|
+
* world.sendMessage(rawMessage);
|
|
18137
18422
|
* ```
|
|
18138
18423
|
* @example simpleString.ts
|
|
18139
18424
|
* ```typescript
|
|
18140
|
-
*
|
|
18141
|
-
*
|
|
18142
|
-
*
|
|
18425
|
+
* // Displays "Hello, world!"
|
|
18426
|
+
* world.sendMessage("Hello, world!");
|
|
18143
18427
|
* ```
|
|
18144
18428
|
* @example translation.ts
|
|
18145
18429
|
* ```typescript
|
|
18146
|
-
*
|
|
18147
|
-
*
|
|
18148
|
-
*
|
|
18149
|
-
*
|
|
18430
|
+
* // Displays "First or Second"
|
|
18431
|
+
* const rawMessage = { translate: "accessibility.list.or.two", with: ["First", "Second"] };
|
|
18432
|
+
* world.sendMessage(rawMessage);
|
|
18150
18433
|
* ```
|
|
18151
18434
|
*/
|
|
18152
18435
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
@@ -18214,18 +18497,17 @@ export class WorldInitializeAfterEvent {
|
|
|
18214
18497
|
*
|
|
18215
18498
|
* @example propertyRegistration.js
|
|
18216
18499
|
* ```typescript
|
|
18217
|
-
*
|
|
18500
|
+
* import { DynamicPropertiesDefinition, MinecraftEntityTypes, world } from "@minecraft/server";
|
|
18218
18501
|
*
|
|
18219
|
-
*
|
|
18220
|
-
*
|
|
18502
|
+
* world.afterEvents.worldInitialize.subscribe((e) => {
|
|
18503
|
+
* let def = new DynamicPropertiesDefinition();
|
|
18221
18504
|
*
|
|
18222
|
-
*
|
|
18223
|
-
*
|
|
18224
|
-
*
|
|
18225
|
-
*
|
|
18226
|
-
* e.propertyRegistry.registerEntityTypeDynamicProperties(def, MinecraftEntityTypes.skeleton);
|
|
18227
|
-
* });
|
|
18505
|
+
* def.defineNumber("rpgStrength");
|
|
18506
|
+
* def.defineString("rpgRole", 16);
|
|
18507
|
+
* def.defineBoolean("rpgIsHero");
|
|
18228
18508
|
*
|
|
18509
|
+
* e.propertyRegistry.registerEntityTypeDynamicProperties(def, MinecraftEntityTypes.skeleton);
|
|
18510
|
+
* });
|
|
18229
18511
|
* ```
|
|
18230
18512
|
*/
|
|
18231
18513
|
readonly propertyRegistry: PropertyRegistry;
|
|
@@ -19087,28 +19369,35 @@ export interface TeleportOptions {
|
|
|
19087
19369
|
export interface TitleDisplayOptions {
|
|
19088
19370
|
/**
|
|
19089
19371
|
* @remarks
|
|
19090
|
-
* Fade-in
|
|
19372
|
+
* Fade-in duration for the title and subtitle, in ticks. There
|
|
19373
|
+
* are 20 ticks per second. Use {@link TicksPerSecond} constant
|
|
19374
|
+
* to convert between ticks and seconds.
|
|
19091
19375
|
*
|
|
19092
19376
|
*/
|
|
19093
|
-
|
|
19377
|
+
fadeInDuration: number;
|
|
19094
19378
|
/**
|
|
19095
19379
|
* @remarks
|
|
19096
|
-
* Fade-out time for the title and subtitle, in
|
|
19380
|
+
* Fade-out time for the title and subtitle, in ticks. There
|
|
19381
|
+
* are 20 ticks per second. Use {@link TicksPerSecond} constant
|
|
19382
|
+
* to convert between ticks and seconds.
|
|
19097
19383
|
*
|
|
19098
19384
|
*/
|
|
19099
|
-
|
|
19385
|
+
fadeOutDuration: number;
|
|
19100
19386
|
/**
|
|
19101
19387
|
* @remarks
|
|
19102
|
-
* Amount of time for the title and subtitle to stay in place
|
|
19388
|
+
* Amount of time for the title and subtitle to stay in place,
|
|
19389
|
+
* in ticks. There are 20 ticks per second. Use {@link
|
|
19390
|
+
* TicksPerSecond} constant to convert between ticks and
|
|
19391
|
+
* seconds.
|
|
19103
19392
|
*
|
|
19104
19393
|
*/
|
|
19105
|
-
|
|
19394
|
+
stayDuration: number;
|
|
19106
19395
|
/**
|
|
19107
19396
|
* @remarks
|
|
19108
19397
|
* Optional subtitle text.
|
|
19109
19398
|
*
|
|
19110
19399
|
*/
|
|
19111
|
-
subtitle?: string;
|
|
19400
|
+
subtitle?: (RawMessage | string)[] | RawMessage | string;
|
|
19112
19401
|
}
|
|
19113
19402
|
|
|
19114
19403
|
/**
|