@minecraft/server 1.3.0-rc.1.20.10-preview.21 → 1.3.0-rc.1.20.10-preview.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 +948 -55
- 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.10-preview.
|
|
19
|
+
* "version": "1.4.0-internal.1.20.10-preview.24"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -115,7 +115,7 @@ export enum ItemLockMode {
|
|
|
115
115
|
* updated in version 1.17.10.21.
|
|
116
116
|
*/
|
|
117
117
|
export class Block {
|
|
118
|
-
|
|
118
|
+
private constructor();
|
|
119
119
|
/**
|
|
120
120
|
* @remarks
|
|
121
121
|
* Returns the dimension that the block is within.
|
|
@@ -155,6 +155,22 @@ export class Block {
|
|
|
155
155
|
*
|
|
156
156
|
*/
|
|
157
157
|
readonly z: number;
|
|
158
|
+
/**
|
|
159
|
+
* @beta
|
|
160
|
+
* @remarks
|
|
161
|
+
* Gets additional configuration properties (a component) for
|
|
162
|
+
* specific capabilities of particular blocks - for example, an
|
|
163
|
+
* inventory component of a chest block.
|
|
164
|
+
*
|
|
165
|
+
* @param componentName
|
|
166
|
+
* Identifier of the component. If a namespace is not
|
|
167
|
+
* specified, minecraft: is assumed.
|
|
168
|
+
* @returns
|
|
169
|
+
* Returns the component object if it is present on the
|
|
170
|
+
* particular block.
|
|
171
|
+
* @throws This function can throw errors.
|
|
172
|
+
*/
|
|
173
|
+
getComponent(componentName: string): BlockComponent | undefined;
|
|
158
174
|
/**
|
|
159
175
|
* @remarks
|
|
160
176
|
* Sets the block in the dimension to the state of the
|
|
@@ -170,13 +186,52 @@ export class Block {
|
|
|
170
186
|
setPermutation(permutation: BlockPermutation): void;
|
|
171
187
|
}
|
|
172
188
|
|
|
189
|
+
/**
|
|
190
|
+
* @beta
|
|
191
|
+
* Base type for components associated with blocks.
|
|
192
|
+
*/
|
|
193
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
194
|
+
export class BlockComponent extends Component {
|
|
195
|
+
private constructor();
|
|
196
|
+
/**
|
|
197
|
+
* @beta
|
|
198
|
+
* @remarks
|
|
199
|
+
* Block instance that this component pertains to.
|
|
200
|
+
*
|
|
201
|
+
*/
|
|
202
|
+
readonly block: Block;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @beta
|
|
207
|
+
* Contains information regarding an event that impacts a
|
|
208
|
+
* specific block.
|
|
209
|
+
*/
|
|
210
|
+
export class BlockEvent {
|
|
211
|
+
private constructor();
|
|
212
|
+
/**
|
|
213
|
+
* @remarks
|
|
214
|
+
* Block impacted by this event.
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
readonly block: Block;
|
|
218
|
+
/**
|
|
219
|
+
* @remarks
|
|
220
|
+
* Dimension that contains the block that is the subject of
|
|
221
|
+
* this event.
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
224
|
+
readonly dimension: Dimension;
|
|
225
|
+
}
|
|
226
|
+
|
|
173
227
|
/**
|
|
174
228
|
* @beta
|
|
175
229
|
* Represents the inventory of a block in the world. Used with
|
|
176
230
|
* blocks like chests.
|
|
177
231
|
*/
|
|
178
|
-
|
|
179
|
-
|
|
232
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
233
|
+
export class BlockInventoryComponent extends BlockComponent {
|
|
234
|
+
private constructor();
|
|
180
235
|
/**
|
|
181
236
|
* @remarks
|
|
182
237
|
* The container which holds an {@link ItemStack}.
|
|
@@ -201,7 +256,7 @@ export class BlockInventoryComponent {
|
|
|
201
256
|
* Block}). This type was introduced as of version 1.17.10.21.
|
|
202
257
|
*/
|
|
203
258
|
export class BlockPermutation {
|
|
204
|
-
|
|
259
|
+
private constructor();
|
|
205
260
|
/**
|
|
206
261
|
* @remarks
|
|
207
262
|
* Returns a boolean whether a specified permutation matches
|
|
@@ -225,11 +280,36 @@ export class BlockPermutation {
|
|
|
225
280
|
static resolve(blockName: string, states?: Record<string, boolean | number | string>): BlockPermutation;
|
|
226
281
|
}
|
|
227
282
|
|
|
283
|
+
/**
|
|
284
|
+
* @beta
|
|
285
|
+
* Contains information related to changes to a button push.
|
|
286
|
+
*/
|
|
287
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
288
|
+
export class ButtonPushAfterEvent extends BlockEvent {
|
|
289
|
+
private constructor();
|
|
290
|
+
/**
|
|
291
|
+
* @remarks
|
|
292
|
+
* Optional source that triggered the button push.
|
|
293
|
+
*
|
|
294
|
+
*/
|
|
295
|
+
readonly source: Entity;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @beta
|
|
300
|
+
* Manages callbacks that are connected to when a button is
|
|
301
|
+
* pushed.
|
|
302
|
+
*/
|
|
303
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
304
|
+
export class ButtonPushAfterEventSignal extends IButtonPushAfterEventSignal {
|
|
305
|
+
private constructor();
|
|
306
|
+
}
|
|
307
|
+
|
|
228
308
|
/**
|
|
229
309
|
* Contains return data on the result of a command execution.
|
|
230
310
|
*/
|
|
231
311
|
export class CommandResult {
|
|
232
|
-
|
|
312
|
+
private constructor();
|
|
233
313
|
/**
|
|
234
314
|
* @remarks
|
|
235
315
|
* If the command operates against a number of entities,
|
|
@@ -245,7 +325,7 @@ export class CommandResult {
|
|
|
245
325
|
* Base class for downstream Component implementations.
|
|
246
326
|
*/
|
|
247
327
|
export class Component {
|
|
248
|
-
|
|
328
|
+
private constructor();
|
|
249
329
|
/**
|
|
250
330
|
* @remarks
|
|
251
331
|
* Identifier of the component.
|
|
@@ -261,7 +341,7 @@ export class Component {
|
|
|
261
341
|
* more.
|
|
262
342
|
*/
|
|
263
343
|
export class Container {
|
|
264
|
-
|
|
344
|
+
private constructor();
|
|
265
345
|
/**
|
|
266
346
|
* @remarks
|
|
267
347
|
* Count of the slots in the container that are empty.
|
|
@@ -426,7 +506,7 @@ export class Container {
|
|
|
426
506
|
* End) within a world.
|
|
427
507
|
*/
|
|
428
508
|
export class Dimension {
|
|
429
|
-
|
|
509
|
+
private constructor();
|
|
430
510
|
/**
|
|
431
511
|
* @remarks
|
|
432
512
|
* Identifier of the dimension.
|
|
@@ -527,6 +607,157 @@ export class Dimension {
|
|
|
527
607
|
* @throws This function can throw errors.
|
|
528
608
|
*/
|
|
529
609
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
610
|
+
/**
|
|
611
|
+
* @beta
|
|
612
|
+
* @remarks
|
|
613
|
+
* Creates a new entity (e.g., a mob) at the specified
|
|
614
|
+
* location.
|
|
615
|
+
*
|
|
616
|
+
* This function can't be called in read-only mode.
|
|
617
|
+
*
|
|
618
|
+
* @param identifier
|
|
619
|
+
* Identifier of the type of entity to spawn. If no namespace
|
|
620
|
+
* is specified, 'minecraft:' is assumed.
|
|
621
|
+
* @param location
|
|
622
|
+
* The location at which to create the entity.
|
|
623
|
+
* @returns
|
|
624
|
+
* Newly created entity at the specified location.
|
|
625
|
+
* @throws This function can throw errors.
|
|
626
|
+
* @example createOldHorse.ts
|
|
627
|
+
* ```typescript
|
|
628
|
+
* // create a horse and trigger the 'ageable_grow_up' event, ensuring the horse is created as an adult
|
|
629
|
+
* overworld.spawnEntity("minecraft:horse<minecraft:ageable_grow_up>", targetLocation);
|
|
630
|
+
* ```
|
|
631
|
+
* @example quickFoxLazyDog.ts
|
|
632
|
+
* ```typescript
|
|
633
|
+
* const fox = overworld.spawnEntity("minecraft:fox", {
|
|
634
|
+
* x: targetLocation.x + 1,
|
|
635
|
+
* y: targetLocation.y + 2,
|
|
636
|
+
* z: targetLocation.z + 3,
|
|
637
|
+
* });
|
|
638
|
+
* fox.addEffect(mc.MinecraftEffectTypes.Speed, 10, 20);
|
|
639
|
+
* log("Created a fox.");
|
|
640
|
+
*
|
|
641
|
+
* const wolf = overworld.spawnEntity("minecraft:wolf", {
|
|
642
|
+
* x: targetLocation.x + 4,
|
|
643
|
+
* y: targetLocation.y + 2,
|
|
644
|
+
* z: targetLocation.z + 3,
|
|
645
|
+
* });
|
|
646
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.Slowness, 10, 20);
|
|
647
|
+
* wolf.isSneaking = true;
|
|
648
|
+
* log("Created a sneaking wolf.", 1);
|
|
649
|
+
* ```
|
|
650
|
+
* @example trapTick.ts
|
|
651
|
+
* ```typescript
|
|
652
|
+
* let ticks = 0;
|
|
653
|
+
*
|
|
654
|
+
* mc.world.events.tick.subscribe((event: mc.TickEvent) => {
|
|
655
|
+
* ticks++;
|
|
656
|
+
*
|
|
657
|
+
* // Minecraft runs at 20 ticks per second
|
|
658
|
+
* if (ticks % 1200 === 0) {
|
|
659
|
+
* overworld.runCommand("say Another minute passes...");
|
|
660
|
+
* }
|
|
661
|
+
* });
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
665
|
+
/**
|
|
666
|
+
* @beta
|
|
667
|
+
* @remarks
|
|
668
|
+
* Creates a new item stack as an entity at the specified
|
|
669
|
+
* location.
|
|
670
|
+
*
|
|
671
|
+
* This function can't be called in read-only mode.
|
|
672
|
+
*
|
|
673
|
+
* @param location
|
|
674
|
+
* The location at which to create the item stack.
|
|
675
|
+
* @returns
|
|
676
|
+
* Newly created item stack entity at the specified location.
|
|
677
|
+
* @throws This function can throw errors.
|
|
678
|
+
* @example itemStacks.ts
|
|
679
|
+
* ```typescript
|
|
680
|
+
* const oneItemLoc: mc.Vector3 = { x: 3, y: 2, z: 1 };
|
|
681
|
+
* const fiveItemsLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
682
|
+
* const diamondPickaxeLoc: mc.Vector3 = { x: 2, y: 2, z: 4 };
|
|
683
|
+
*
|
|
684
|
+
* const oneEmerald = new mc.ItemStack(mc.MinecraftItemTypes.emerald, 1, 0);
|
|
685
|
+
* const onePickaxe = new mc.ItemStack(mc.MinecraftItemTypes.diamondPickaxe, 1, 0);
|
|
686
|
+
* const fiveEmeralds = new mc.ItemStack(mc.MinecraftItemTypes.emerald, 5, 0);
|
|
687
|
+
*
|
|
688
|
+
* overworld.spawnItem(oneEmerald, oneItemLoc);
|
|
689
|
+
* overworld.spawnItem(fiveEmeralds, fiveItemsLoc);
|
|
690
|
+
* overworld.spawnItem(onePickaxe, diamondPickaxeLoc);
|
|
691
|
+
* ```
|
|
692
|
+
* @example spawnItem.ts
|
|
693
|
+
* ```typescript
|
|
694
|
+
* const featherItem = new mc.ItemStack(mc.MinecraftItemTypes.feather, 1, 0);
|
|
695
|
+
*
|
|
696
|
+
* overworld.spawnItem(featherItem, targetLocation);
|
|
697
|
+
* log("New feather created!");
|
|
698
|
+
* ```
|
|
699
|
+
*/
|
|
700
|
+
spawnItem(itemStack: ItemStack, location: Vector3): Entity;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @beta
|
|
705
|
+
* Represents an effect - like poison - that has been added to
|
|
706
|
+
* an Entity.
|
|
707
|
+
*/
|
|
708
|
+
export class Effect {
|
|
709
|
+
private constructor();
|
|
710
|
+
/**
|
|
711
|
+
* @remarks
|
|
712
|
+
* Gets an amplifier that may have been applied to this effect.
|
|
713
|
+
* Sample values range typically from 0 to 4. Example: The
|
|
714
|
+
* effect 'Jump Boost II' will have an amplifier value of 1.
|
|
715
|
+
*
|
|
716
|
+
* @throws This property can throw when used.
|
|
717
|
+
*/
|
|
718
|
+
readonly amplifier: number;
|
|
719
|
+
/**
|
|
720
|
+
* @remarks
|
|
721
|
+
* Gets the player-friendly name of this effect.
|
|
722
|
+
*
|
|
723
|
+
* @throws This property can throw when used.
|
|
724
|
+
*/
|
|
725
|
+
readonly displayName: string;
|
|
726
|
+
/**
|
|
727
|
+
* @remarks
|
|
728
|
+
* Gets the entire specified duration, in ticks, of this
|
|
729
|
+
* effect. There are 20 ticks per second. Use {@link
|
|
730
|
+
* TicksPerSecond} constant to convert between ticks and
|
|
731
|
+
* seconds.
|
|
732
|
+
*
|
|
733
|
+
* @throws This property can throw when used.
|
|
734
|
+
*/
|
|
735
|
+
readonly duration: number;
|
|
736
|
+
/**
|
|
737
|
+
* @remarks
|
|
738
|
+
* Gets the type id of this effect.
|
|
739
|
+
*
|
|
740
|
+
* @throws This property can throw when used.
|
|
741
|
+
*/
|
|
742
|
+
readonly typeId: string;
|
|
743
|
+
isValid(): boolean;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @beta
|
|
748
|
+
* Represents a type of effect - like poison - that can be
|
|
749
|
+
* applied to an entity.
|
|
750
|
+
*/
|
|
751
|
+
export class EffectType {
|
|
752
|
+
private constructor();
|
|
753
|
+
/**
|
|
754
|
+
* @remarks
|
|
755
|
+
* Identifier name of this effect type.
|
|
756
|
+
*
|
|
757
|
+
* @returns
|
|
758
|
+
* Identifier of the effect type.
|
|
759
|
+
*/
|
|
760
|
+
getName(): string;
|
|
530
761
|
}
|
|
531
762
|
|
|
532
763
|
/**
|
|
@@ -534,7 +765,7 @@ export class Dimension {
|
|
|
534
765
|
* other moving objects like minecarts) in the world.
|
|
535
766
|
*/
|
|
536
767
|
export class Entity {
|
|
537
|
-
|
|
768
|
+
private constructor();
|
|
538
769
|
/**
|
|
539
770
|
* @beta
|
|
540
771
|
* @remarks
|
|
@@ -578,6 +809,58 @@ export class Entity {
|
|
|
578
809
|
* @throws This property can throw when used.
|
|
579
810
|
*/
|
|
580
811
|
readonly typeId: string;
|
|
812
|
+
/**
|
|
813
|
+
* @beta
|
|
814
|
+
* @remarks
|
|
815
|
+
* Adds or updates an effect, like poison, to the entity.
|
|
816
|
+
*
|
|
817
|
+
* This function can't be called in read-only mode.
|
|
818
|
+
*
|
|
819
|
+
* @param effectType
|
|
820
|
+
* Type of effect to add to the entity.
|
|
821
|
+
* @param duration
|
|
822
|
+
* Amount of time, in ticks, for the effect to apply. There are
|
|
823
|
+
* 20 ticks per second. Use {@link TicksPerSecond} constant to
|
|
824
|
+
* convert between ticks and seconds. The value must be within
|
|
825
|
+
* the range [0, 20000000].
|
|
826
|
+
* @param options
|
|
827
|
+
* Additional options for the effect.
|
|
828
|
+
* @returns
|
|
829
|
+
* Returns nothing if the effect was added or updated
|
|
830
|
+
* successfully. This can throw an error if the duration or
|
|
831
|
+
* amplifier are outside of the valid ranges, or if the effect
|
|
832
|
+
* does not exist.
|
|
833
|
+
* @throws This function can throw errors.
|
|
834
|
+
* @example addEffect.js
|
|
835
|
+
* ```typescript
|
|
836
|
+
* const villagerId = 'minecraft:villager_v2<minecraft:ageable_grow_up>';
|
|
837
|
+
* const villagerLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
838
|
+
* const villager = test.spawn(villagerId, villagerLoc);
|
|
839
|
+
* const duration = 20;
|
|
840
|
+
*
|
|
841
|
+
* villager.addEffect(EffectTypes.get('poison'), duration, { amplifier: 1 });
|
|
842
|
+
* ```
|
|
843
|
+
* @example quickFoxLazyDog.ts
|
|
844
|
+
* ```typescript
|
|
845
|
+
* const fox = overworld.spawnEntity('minecraft:fox', {
|
|
846
|
+
* x: targetLocation.x + 1,
|
|
847
|
+
* y: targetLocation.y + 2,
|
|
848
|
+
* z: targetLocation.z + 3,
|
|
849
|
+
* });
|
|
850
|
+
* fox.addEffect(mc.MinecraftEffectTypes.Speed, 10, { amplifier: 20 });
|
|
851
|
+
* log('Created a fox.');
|
|
852
|
+
*
|
|
853
|
+
* const wolf = overworld.spawnEntity('minecraft:wolf', {
|
|
854
|
+
* x: targetLocation.x + 4,
|
|
855
|
+
* y: targetLocation.y + 2,
|
|
856
|
+
* z: targetLocation.z + 3,
|
|
857
|
+
* });
|
|
858
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.Slowness, 10, { amplifier: 20 });
|
|
859
|
+
* wolf.isSneaking = true;
|
|
860
|
+
* log('Created a sneaking wolf.', 1);
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
|
|
581
864
|
/**
|
|
582
865
|
* @beta
|
|
583
866
|
* @remarks
|
|
@@ -683,6 +966,32 @@ export class Entity {
|
|
|
683
966
|
* and supported by the API.
|
|
684
967
|
*/
|
|
685
968
|
getComponents(): EntityComponent[];
|
|
969
|
+
/**
|
|
970
|
+
* @beta
|
|
971
|
+
* @remarks
|
|
972
|
+
* Returns the effect for the specified EffectType on the
|
|
973
|
+
* entity, undefined if the effect is not present, or throws an
|
|
974
|
+
* error if the effect does not exist.
|
|
975
|
+
*
|
|
976
|
+
* @param effectType
|
|
977
|
+
* The effect identifier.
|
|
978
|
+
* @returns
|
|
979
|
+
* Effect object for the specified effect, undefined if the
|
|
980
|
+
* effect is not present, or throws an error if the effect does
|
|
981
|
+
* not exist.
|
|
982
|
+
* @throws This function can throw errors.
|
|
983
|
+
*/
|
|
984
|
+
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
985
|
+
/**
|
|
986
|
+
* @beta
|
|
987
|
+
* @remarks
|
|
988
|
+
* Returns a set of effects applied to this entity.
|
|
989
|
+
*
|
|
990
|
+
* @returns
|
|
991
|
+
* List of effects.
|
|
992
|
+
* @throws This function can throw errors.
|
|
993
|
+
*/
|
|
994
|
+
getEffects(): Effect[];
|
|
686
995
|
/**
|
|
687
996
|
* @beta
|
|
688
997
|
* @remarks
|
|
@@ -765,6 +1074,23 @@ export class Entity {
|
|
|
765
1074
|
* @throws This function can throw errors.
|
|
766
1075
|
*/
|
|
767
1076
|
kill(): boolean;
|
|
1077
|
+
/**
|
|
1078
|
+
* @beta
|
|
1079
|
+
* @remarks
|
|
1080
|
+
* Removes the specified EffectType on the entity, or returns
|
|
1081
|
+
* false if the effect is not present.
|
|
1082
|
+
*
|
|
1083
|
+
* This function can't be called in read-only mode.
|
|
1084
|
+
*
|
|
1085
|
+
* @param effectType
|
|
1086
|
+
* The effect identifier.
|
|
1087
|
+
* @returns
|
|
1088
|
+
* Returns true if the effect has been removed, false if the
|
|
1089
|
+
* effect is not present, or will throw an error if the effect
|
|
1090
|
+
* does not exist.
|
|
1091
|
+
* @throws This function can throw errors.
|
|
1092
|
+
*/
|
|
1093
|
+
removeEffect(effectType: EffectType | string): boolean;
|
|
768
1094
|
/**
|
|
769
1095
|
* @beta
|
|
770
1096
|
* @remarks
|
|
@@ -810,14 +1136,89 @@ export class Entity {
|
|
|
810
1136
|
* @throws This function can throw errors.
|
|
811
1137
|
*/
|
|
812
1138
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
1139
|
+
/**
|
|
1140
|
+
* @beta
|
|
1141
|
+
* @remarks
|
|
1142
|
+
* Teleports the selected entity to a new location
|
|
1143
|
+
*
|
|
1144
|
+
* This function can't be called in read-only mode.
|
|
1145
|
+
*
|
|
1146
|
+
* @param location
|
|
1147
|
+
* New location for the entity.
|
|
1148
|
+
* @param teleportOptions
|
|
1149
|
+
* Options regarding the teleport operation.
|
|
1150
|
+
* @throws This function can throw errors.
|
|
1151
|
+
*/
|
|
1152
|
+
teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
|
|
1153
|
+
/**
|
|
1154
|
+
* @beta
|
|
1155
|
+
* @remarks
|
|
1156
|
+
* Attempts to try a teleport, but may not complete the
|
|
1157
|
+
* teleport operation (for example, if there are blocks at the
|
|
1158
|
+
* destination.)
|
|
1159
|
+
*
|
|
1160
|
+
* This function can't be called in read-only mode.
|
|
1161
|
+
*
|
|
1162
|
+
* @param location
|
|
1163
|
+
* Location to teleport the entity to.
|
|
1164
|
+
* @param teleportOptions
|
|
1165
|
+
* Options regarding the teleport operation.
|
|
1166
|
+
* @returns
|
|
1167
|
+
* Returns whether the teleport succeeded. This can fail if the
|
|
1168
|
+
* destination chunk is unloaded or if the teleport would
|
|
1169
|
+
* result in intersecting with blocks.
|
|
1170
|
+
* @throws This function can throw errors.
|
|
1171
|
+
*/
|
|
1172
|
+
tryTeleport(location: Vector3, teleportOptions?: TeleportOptions): boolean;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* @beta
|
|
1177
|
+
*/
|
|
1178
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1179
|
+
export class EntityAttributeComponent extends EntityComponent {
|
|
1180
|
+
private constructor();
|
|
1181
|
+
readonly currentValue: number;
|
|
1182
|
+
readonly defaultValue: number;
|
|
1183
|
+
readonly effectiveMax: number;
|
|
1184
|
+
readonly effectiveMin: number;
|
|
1185
|
+
/**
|
|
1186
|
+
* @remarks
|
|
1187
|
+
* This function can't be called in read-only mode.
|
|
1188
|
+
*
|
|
1189
|
+
* @throws This function can throw errors.
|
|
1190
|
+
*/
|
|
1191
|
+
resetToDefaultValue(): void;
|
|
1192
|
+
/**
|
|
1193
|
+
* @remarks
|
|
1194
|
+
* This function can't be called in read-only mode.
|
|
1195
|
+
*
|
|
1196
|
+
* @throws This function can throw errors.
|
|
1197
|
+
*/
|
|
1198
|
+
resetToMaxValue(): void;
|
|
1199
|
+
/**
|
|
1200
|
+
* @remarks
|
|
1201
|
+
* This function can't be called in read-only mode.
|
|
1202
|
+
*
|
|
1203
|
+
* @throws This function can throw errors.
|
|
1204
|
+
*/
|
|
1205
|
+
resetToMinValue(): void;
|
|
1206
|
+
/**
|
|
1207
|
+
* @remarks
|
|
1208
|
+
* This function can't be called in read-only mode.
|
|
1209
|
+
*
|
|
1210
|
+
* @throws This function can throw errors.
|
|
1211
|
+
*/
|
|
1212
|
+
setCurrentValue(value: number): boolean;
|
|
813
1213
|
}
|
|
814
1214
|
|
|
815
1215
|
/**
|
|
816
1216
|
* @beta
|
|
817
1217
|
* Base class for a family of entity movement events.
|
|
818
1218
|
*/
|
|
1219
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
819
1220
|
export class EntityBaseMovementComponent extends EntityComponent {
|
|
820
|
-
|
|
1221
|
+
private constructor();
|
|
821
1222
|
readonly maxTurn: number;
|
|
822
1223
|
}
|
|
823
1224
|
|
|
@@ -826,8 +1227,9 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
826
1227
|
* When added, this component signifies that the entity can
|
|
827
1228
|
* climb up ladders.
|
|
828
1229
|
*/
|
|
1230
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
829
1231
|
export class EntityCanClimbComponent extends EntityComponent {
|
|
830
|
-
|
|
1232
|
+
private constructor();
|
|
831
1233
|
/**
|
|
832
1234
|
* @remarks
|
|
833
1235
|
* Identifier of this component. Should always be
|
|
@@ -843,8 +1245,9 @@ export class EntityCanClimbComponent extends EntityComponent {
|
|
|
843
1245
|
* fly, and the pathfinder won't be restricted to paths where a
|
|
844
1246
|
* solid block is required underneath it.
|
|
845
1247
|
*/
|
|
1248
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
846
1249
|
export class EntityCanFlyComponent extends EntityComponent {
|
|
847
|
-
|
|
1250
|
+
private constructor();
|
|
848
1251
|
/**
|
|
849
1252
|
* @remarks
|
|
850
1253
|
* Identifier of this component. Should always be
|
|
@@ -859,8 +1262,9 @@ export class EntityCanFlyComponent extends EntityComponent {
|
|
|
859
1262
|
* When added, this component signifies that the entity can
|
|
860
1263
|
* power jump like the horse does within Minecraft.
|
|
861
1264
|
*/
|
|
1265
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
862
1266
|
export class EntityCanPowerJumpComponent extends EntityComponent {
|
|
863
|
-
|
|
1267
|
+
private constructor();
|
|
864
1268
|
/**
|
|
865
1269
|
* @remarks
|
|
866
1270
|
* Identifier of this component. Should always be
|
|
@@ -875,8 +1279,9 @@ export class EntityCanPowerJumpComponent extends EntityComponent {
|
|
|
875
1279
|
* Defines the entity's color. Only works on certain entities
|
|
876
1280
|
* that have predefined color values (sheep, llama, shulker).
|
|
877
1281
|
*/
|
|
1282
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
878
1283
|
export class EntityColorComponent extends EntityComponent {
|
|
879
|
-
|
|
1284
|
+
private constructor();
|
|
880
1285
|
/**
|
|
881
1286
|
* @remarks
|
|
882
1287
|
* This property can't be edited in read-only mode.
|
|
@@ -896,8 +1301,9 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
896
1301
|
* @beta
|
|
897
1302
|
* Base class for downstream entity components.
|
|
898
1303
|
*/
|
|
1304
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
899
1305
|
export class EntityComponent extends Component {
|
|
900
|
-
|
|
1306
|
+
private constructor();
|
|
901
1307
|
}
|
|
902
1308
|
|
|
903
1309
|
/**
|
|
@@ -905,8 +1311,9 @@ export class EntityComponent extends Component {
|
|
|
905
1311
|
* When added, this component signifies that this entity
|
|
906
1312
|
* doesn't take damage from fire.
|
|
907
1313
|
*/
|
|
1314
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
908
1315
|
export class EntityFireImmuneComponent extends EntityComponent {
|
|
909
|
-
|
|
1316
|
+
private constructor();
|
|
910
1317
|
/**
|
|
911
1318
|
* @remarks
|
|
912
1319
|
* Identifier of this component. Should always be
|
|
@@ -921,8 +1328,9 @@ export class EntityFireImmuneComponent extends EntityComponent {
|
|
|
921
1328
|
* When added, this component signifies that this entity can
|
|
922
1329
|
* float in liquid blocks.
|
|
923
1330
|
*/
|
|
1331
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
924
1332
|
export class EntityFloatsInLiquidComponent extends EntityComponent {
|
|
925
|
-
|
|
1333
|
+
private constructor();
|
|
926
1334
|
/**
|
|
927
1335
|
* @remarks
|
|
928
1336
|
* Identifier of this component. Should always be
|
|
@@ -936,8 +1344,9 @@ export class EntityFloatsInLiquidComponent extends EntityComponent {
|
|
|
936
1344
|
* @beta
|
|
937
1345
|
* Represents the flying speed of an entity.
|
|
938
1346
|
*/
|
|
1347
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
939
1348
|
export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
940
|
-
|
|
1349
|
+
private constructor();
|
|
941
1350
|
/**
|
|
942
1351
|
* @remarks
|
|
943
1352
|
* This property can't be edited in read-only mode.
|
|
@@ -957,8 +1366,9 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
957
1366
|
* @beta
|
|
958
1367
|
* Defines how much friction affects this entity.
|
|
959
1368
|
*/
|
|
1369
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
960
1370
|
export class EntityFrictionModifierComponent extends EntityComponent {
|
|
961
|
-
|
|
1371
|
+
private constructor();
|
|
962
1372
|
/**
|
|
963
1373
|
* @remarks
|
|
964
1374
|
* This property can't be edited in read-only mode.
|
|
@@ -979,8 +1389,9 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
979
1389
|
* Sets the offset from the ground that the entity is actually
|
|
980
1390
|
* at.
|
|
981
1391
|
*/
|
|
1392
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
982
1393
|
export class EntityGroundOffsetComponent extends EntityComponent {
|
|
983
|
-
|
|
1394
|
+
private constructor();
|
|
984
1395
|
/**
|
|
985
1396
|
* @remarks
|
|
986
1397
|
* This property can't be edited in read-only mode.
|
|
@@ -996,12 +1407,62 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
996
1407
|
static readonly componentId = 'minecraft:ground_offset';
|
|
997
1408
|
}
|
|
998
1409
|
|
|
1410
|
+
/**
|
|
1411
|
+
* @beta
|
|
1412
|
+
* Defines the interactions with this entity for healing it.
|
|
1413
|
+
*/
|
|
1414
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1415
|
+
export class EntityHealableComponent extends EntityComponent {
|
|
1416
|
+
private constructor();
|
|
1417
|
+
/**
|
|
1418
|
+
* @remarks
|
|
1419
|
+
* Determines if an item can be used regardless of the entity
|
|
1420
|
+
* being at full health.
|
|
1421
|
+
*
|
|
1422
|
+
* @throws This property can throw when used.
|
|
1423
|
+
*/
|
|
1424
|
+
readonly forceUse: boolean;
|
|
1425
|
+
/**
|
|
1426
|
+
* @remarks
|
|
1427
|
+
* Identifier of this component. Should always be
|
|
1428
|
+
* minecraft:healable.
|
|
1429
|
+
*
|
|
1430
|
+
*/
|
|
1431
|
+
static readonly componentId = 'minecraft:healable';
|
|
1432
|
+
/**
|
|
1433
|
+
* @remarks
|
|
1434
|
+
* A set of items that can specifically heal this entity.
|
|
1435
|
+
*
|
|
1436
|
+
* @returns
|
|
1437
|
+
* Entity that this component is associated with.
|
|
1438
|
+
* @throws This function can throw errors.
|
|
1439
|
+
*/
|
|
1440
|
+
getFeedItems(): FeedItem[];
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* @beta
|
|
1445
|
+
* Defines the health properties of an entity.
|
|
1446
|
+
*/
|
|
1447
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1448
|
+
export class EntityHealthComponent extends EntityAttributeComponent {
|
|
1449
|
+
private constructor();
|
|
1450
|
+
/**
|
|
1451
|
+
* @remarks
|
|
1452
|
+
* Identifier of this component. Should always be
|
|
1453
|
+
* minecraft:health.
|
|
1454
|
+
*
|
|
1455
|
+
*/
|
|
1456
|
+
static readonly componentId = 'minecraft:health';
|
|
1457
|
+
}
|
|
1458
|
+
|
|
999
1459
|
/**
|
|
1000
1460
|
* @beta
|
|
1001
1461
|
* Defines this entity's inventory properties.
|
|
1002
1462
|
*/
|
|
1463
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1003
1464
|
export class EntityInventoryComponent extends EntityComponent {
|
|
1004
|
-
|
|
1465
|
+
private constructor();
|
|
1005
1466
|
/**
|
|
1006
1467
|
* @remarks
|
|
1007
1468
|
* Number of slots that this entity can gain per extra
|
|
@@ -1068,8 +1529,9 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
1068
1529
|
* When added, this component signifies that this entity is a
|
|
1069
1530
|
* baby.
|
|
1070
1531
|
*/
|
|
1532
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1071
1533
|
export class EntityIsBabyComponent extends EntityComponent {
|
|
1072
|
-
|
|
1534
|
+
private constructor();
|
|
1073
1535
|
/**
|
|
1074
1536
|
* @remarks
|
|
1075
1537
|
* Identifier of this component. Should always be
|
|
@@ -1084,8 +1546,9 @@ export class EntityIsBabyComponent extends EntityComponent {
|
|
|
1084
1546
|
* When added, this component signifies that this entity is
|
|
1085
1547
|
* charged.
|
|
1086
1548
|
*/
|
|
1549
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1087
1550
|
export class EntityIsChargedComponent extends EntityComponent {
|
|
1088
|
-
|
|
1551
|
+
private constructor();
|
|
1089
1552
|
/**
|
|
1090
1553
|
* @remarks
|
|
1091
1554
|
* Identifier of this component. Should always be
|
|
@@ -1100,8 +1563,9 @@ export class EntityIsChargedComponent extends EntityComponent {
|
|
|
1100
1563
|
* When added, this component signifies that this entity is
|
|
1101
1564
|
* currently carrying a chest.
|
|
1102
1565
|
*/
|
|
1566
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1103
1567
|
export class EntityIsChestedComponent extends EntityComponent {
|
|
1104
|
-
|
|
1568
|
+
private constructor();
|
|
1105
1569
|
/**
|
|
1106
1570
|
* @remarks
|
|
1107
1571
|
* Identifier of this component. Should always be
|
|
@@ -1116,8 +1580,9 @@ export class EntityIsChestedComponent extends EntityComponent {
|
|
|
1116
1580
|
* When added, this component signifies that dyes can be used
|
|
1117
1581
|
* on this entity to change its color.
|
|
1118
1582
|
*/
|
|
1583
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1119
1584
|
export class EntityIsDyeableComponent extends EntityComponent {
|
|
1120
|
-
|
|
1585
|
+
private constructor();
|
|
1121
1586
|
/**
|
|
1122
1587
|
* @remarks
|
|
1123
1588
|
* Identifier of this component. Should always be
|
|
@@ -1132,8 +1597,9 @@ export class EntityIsDyeableComponent extends EntityComponent {
|
|
|
1132
1597
|
* When added, this component signifies that this entity can
|
|
1133
1598
|
* hide from hostile mobs while invisible.
|
|
1134
1599
|
*/
|
|
1600
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1135
1601
|
export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
|
|
1136
|
-
|
|
1602
|
+
private constructor();
|
|
1137
1603
|
/**
|
|
1138
1604
|
* @remarks
|
|
1139
1605
|
* Identifier of this component. Should always be
|
|
@@ -1148,8 +1614,9 @@ export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
|
|
|
1148
1614
|
* When added, this component signifies that this entity this
|
|
1149
1615
|
* currently on fire.
|
|
1150
1616
|
*/
|
|
1617
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1151
1618
|
export class EntityIsIgnitedComponent extends EntityComponent {
|
|
1152
|
-
|
|
1619
|
+
private constructor();
|
|
1153
1620
|
/**
|
|
1154
1621
|
* @remarks
|
|
1155
1622
|
* Identifier of this component. Should always be
|
|
@@ -1164,8 +1631,9 @@ export class EntityIsIgnitedComponent extends EntityComponent {
|
|
|
1164
1631
|
* When added, this component signifies that this entity is an
|
|
1165
1632
|
* illager captain.
|
|
1166
1633
|
*/
|
|
1634
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1167
1635
|
export class EntityIsIllagerCaptainComponent extends EntityComponent {
|
|
1168
|
-
|
|
1636
|
+
private constructor();
|
|
1169
1637
|
/**
|
|
1170
1638
|
* @remarks
|
|
1171
1639
|
* Identifier of this component. Should always be
|
|
@@ -1180,8 +1648,9 @@ export class EntityIsIllagerCaptainComponent extends EntityComponent {
|
|
|
1180
1648
|
* When added, this component signifies that this entity is
|
|
1181
1649
|
* currently saddled.
|
|
1182
1650
|
*/
|
|
1651
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1183
1652
|
export class EntityIsSaddledComponent extends EntityComponent {
|
|
1184
|
-
|
|
1653
|
+
private constructor();
|
|
1185
1654
|
/**
|
|
1186
1655
|
* @remarks
|
|
1187
1656
|
* Identifier of this component. Should always be
|
|
@@ -1196,8 +1665,9 @@ export class EntityIsSaddledComponent extends EntityComponent {
|
|
|
1196
1665
|
* When added, this component signifies that this entity is
|
|
1197
1666
|
* currently shaking.
|
|
1198
1667
|
*/
|
|
1668
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1199
1669
|
export class EntityIsShakingComponent extends EntityComponent {
|
|
1200
|
-
|
|
1670
|
+
private constructor();
|
|
1201
1671
|
/**
|
|
1202
1672
|
* @remarks
|
|
1203
1673
|
* Identifier of this component. Should always be
|
|
@@ -1212,8 +1682,9 @@ export class EntityIsShakingComponent extends EntityComponent {
|
|
|
1212
1682
|
* When added, this component signifies that this entity is
|
|
1213
1683
|
* currently sheared.
|
|
1214
1684
|
*/
|
|
1685
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1215
1686
|
export class EntityIsShearedComponent extends EntityComponent {
|
|
1216
|
-
|
|
1687
|
+
private constructor();
|
|
1217
1688
|
/**
|
|
1218
1689
|
* @remarks
|
|
1219
1690
|
* Identifier of this component. Should always be
|
|
@@ -1228,8 +1699,9 @@ export class EntityIsShearedComponent extends EntityComponent {
|
|
|
1228
1699
|
* When added, this component signifies that this entity can be
|
|
1229
1700
|
* stacked.
|
|
1230
1701
|
*/
|
|
1702
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1231
1703
|
export class EntityIsStackableComponent extends EntityComponent {
|
|
1232
|
-
|
|
1704
|
+
private constructor();
|
|
1233
1705
|
/**
|
|
1234
1706
|
* @remarks
|
|
1235
1707
|
* Identifier of this component. Should always be
|
|
@@ -1244,8 +1716,9 @@ export class EntityIsStackableComponent extends EntityComponent {
|
|
|
1244
1716
|
* When added, this component signifies that this entity is
|
|
1245
1717
|
* currently stunned.
|
|
1246
1718
|
*/
|
|
1719
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1247
1720
|
export class EntityIsStunnedComponent extends EntityComponent {
|
|
1248
|
-
|
|
1721
|
+
private constructor();
|
|
1249
1722
|
/**
|
|
1250
1723
|
* @remarks
|
|
1251
1724
|
* Identifier of this component. Should always be
|
|
@@ -1260,8 +1733,9 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
1260
1733
|
* When added, this component signifies that this entity is
|
|
1261
1734
|
* currently tamed.
|
|
1262
1735
|
*/
|
|
1736
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1263
1737
|
export class EntityIsTamedComponent extends EntityComponent {
|
|
1264
|
-
|
|
1738
|
+
private constructor();
|
|
1265
1739
|
/**
|
|
1266
1740
|
* @remarks
|
|
1267
1741
|
* Identifier of this component. Should always be
|
|
@@ -1278,8 +1752,9 @@ export class EntityIsTamedComponent extends EntityComponent {
|
|
|
1278
1752
|
* retrieve the actual item stack contents via the itemStack
|
|
1279
1753
|
* property.
|
|
1280
1754
|
*/
|
|
1755
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1281
1756
|
export class EntityItemComponent extends EntityComponent {
|
|
1282
|
-
|
|
1757
|
+
private constructor();
|
|
1283
1758
|
/**
|
|
1284
1759
|
* @remarks
|
|
1285
1760
|
* Item stack represented by this entity in the world.
|
|
@@ -1300,8 +1775,9 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
1300
1775
|
* Additional variant value. Can be used to further
|
|
1301
1776
|
* differentiate variants.
|
|
1302
1777
|
*/
|
|
1778
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1303
1779
|
export class EntityMarkVariantComponent extends EntityComponent {
|
|
1304
|
-
|
|
1780
|
+
private constructor();
|
|
1305
1781
|
/**
|
|
1306
1782
|
* @remarks
|
|
1307
1783
|
* This property can't be edited in read-only mode.
|
|
@@ -1322,8 +1798,9 @@ export class EntityMarkVariantComponent extends EntityComponent {
|
|
|
1322
1798
|
* When added, this movement control allows the mob to swim in
|
|
1323
1799
|
* water and walk on land.
|
|
1324
1800
|
*/
|
|
1801
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1325
1802
|
export class EntityMovementAmphibiousComponent extends EntityBaseMovementComponent {
|
|
1326
|
-
|
|
1803
|
+
private constructor();
|
|
1327
1804
|
/**
|
|
1328
1805
|
* @remarks
|
|
1329
1806
|
* Identifier of this component. Should always be
|
|
@@ -1337,8 +1814,9 @@ export class EntityMovementAmphibiousComponent extends EntityBaseMovementCompone
|
|
|
1337
1814
|
* @beta
|
|
1338
1815
|
* This component accents the movement of an entity.
|
|
1339
1816
|
*/
|
|
1817
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1340
1818
|
export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
|
|
1341
|
-
|
|
1819
|
+
private constructor();
|
|
1342
1820
|
/**
|
|
1343
1821
|
* @remarks
|
|
1344
1822
|
* Identifier of this component. Should always be
|
|
@@ -1352,8 +1830,9 @@ export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
|
|
|
1352
1830
|
* @beta
|
|
1353
1831
|
* When added, this move control causes the mob to fly.
|
|
1354
1832
|
*/
|
|
1833
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1355
1834
|
export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
|
|
1356
|
-
|
|
1835
|
+
private constructor();
|
|
1357
1836
|
/**
|
|
1358
1837
|
* @remarks
|
|
1359
1838
|
* Identifier of this component. Should always be
|
|
@@ -1368,8 +1847,9 @@ export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
|
|
|
1368
1847
|
* When added, this move control allows a mob to fly, swim,
|
|
1369
1848
|
* climb, etc.
|
|
1370
1849
|
*/
|
|
1850
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1371
1851
|
export class EntityMovementGenericComponent extends EntityBaseMovementComponent {
|
|
1372
|
-
|
|
1852
|
+
private constructor();
|
|
1373
1853
|
/**
|
|
1374
1854
|
* @remarks
|
|
1375
1855
|
* Identifier of this component. Should always be
|
|
@@ -1383,8 +1863,9 @@ export class EntityMovementGenericComponent extends EntityBaseMovementComponent
|
|
|
1383
1863
|
* @beta
|
|
1384
1864
|
* When added, this move control causes the mob to hover.
|
|
1385
1865
|
*/
|
|
1866
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1386
1867
|
export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
|
|
1387
|
-
|
|
1868
|
+
private constructor();
|
|
1388
1869
|
/**
|
|
1389
1870
|
* @remarks
|
|
1390
1871
|
* Identifier of this component. Should always be
|
|
@@ -1399,8 +1880,9 @@ export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
|
|
|
1399
1880
|
* Move control that causes the mob to jump as it moves with a
|
|
1400
1881
|
* specified delay between jumps.
|
|
1401
1882
|
*/
|
|
1883
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1402
1884
|
export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
|
|
1403
|
-
|
|
1885
|
+
private constructor();
|
|
1404
1886
|
/**
|
|
1405
1887
|
* @remarks
|
|
1406
1888
|
* Identifier of this component. Should always be
|
|
@@ -1415,8 +1897,9 @@ export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
|
|
|
1415
1897
|
* When added, this move control causes the mob to hop as it
|
|
1416
1898
|
* moves.
|
|
1417
1899
|
*/
|
|
1900
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1418
1901
|
export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
|
|
1419
|
-
|
|
1902
|
+
private constructor();
|
|
1420
1903
|
/**
|
|
1421
1904
|
* @remarks
|
|
1422
1905
|
* Identifier of this component. Should always be
|
|
@@ -1430,8 +1913,9 @@ export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
|
|
|
1430
1913
|
* @beta
|
|
1431
1914
|
* Sets the distance through which the entity can push through.
|
|
1432
1915
|
*/
|
|
1916
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1433
1917
|
export class EntityPushThroughComponent extends EntityComponent {
|
|
1434
|
-
|
|
1918
|
+
private constructor();
|
|
1435
1919
|
/**
|
|
1436
1920
|
* @remarks
|
|
1437
1921
|
* This property can't be edited in read-only mode.
|
|
@@ -1451,8 +1935,9 @@ export class EntityPushThroughComponent extends EntityComponent {
|
|
|
1451
1935
|
* @beta
|
|
1452
1936
|
* Sets the entity's visual size.
|
|
1453
1937
|
*/
|
|
1938
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1454
1939
|
export class EntityScaleComponent extends EntityComponent {
|
|
1455
|
-
|
|
1940
|
+
private constructor();
|
|
1456
1941
|
/**
|
|
1457
1942
|
* @remarks
|
|
1458
1943
|
* This property can't be edited in read-only mode.
|
|
@@ -1473,8 +1958,9 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
1473
1958
|
* Skin Id value. Can be used to differentiate skins, such as
|
|
1474
1959
|
* base skins for villagers.
|
|
1475
1960
|
*/
|
|
1961
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1476
1962
|
export class EntitySkinIdComponent extends EntityComponent {
|
|
1477
|
-
|
|
1963
|
+
private constructor();
|
|
1478
1964
|
/**
|
|
1479
1965
|
* @remarks
|
|
1480
1966
|
* This property can't be edited in read-only mode.
|
|
@@ -1495,8 +1981,9 @@ export class EntitySkinIdComponent extends EntityComponent {
|
|
|
1495
1981
|
* Used to differentiate the component group of a variant of an
|
|
1496
1982
|
* entity from others. (e.g. ocelot, villager).
|
|
1497
1983
|
*/
|
|
1984
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1498
1985
|
export class EntityVariantComponent extends EntityComponent {
|
|
1499
|
-
|
|
1986
|
+
private constructor();
|
|
1500
1987
|
readonly value: number;
|
|
1501
1988
|
/**
|
|
1502
1989
|
* @remarks
|
|
@@ -1512,8 +1999,9 @@ export class EntityVariantComponent extends EntityComponent {
|
|
|
1512
1999
|
* When added, this component signifies that this entity wants
|
|
1513
2000
|
* to become a jockey.
|
|
1514
2001
|
*/
|
|
2002
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1515
2003
|
export class EntityWantsJockeyComponent extends EntityComponent {
|
|
1516
|
-
|
|
2004
|
+
private constructor();
|
|
1517
2005
|
/**
|
|
1518
2006
|
* @remarks
|
|
1519
2007
|
* Identifier of this component. Should always be
|
|
@@ -1523,12 +2011,192 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
1523
2011
|
static readonly componentId = 'minecraft:wants_jockey';
|
|
1524
2012
|
}
|
|
1525
2013
|
|
|
2014
|
+
/**
|
|
2015
|
+
* @beta
|
|
2016
|
+
* As part of the Healable component, represents a specific
|
|
2017
|
+
* item that can be fed to an entity to cause health effects.
|
|
2018
|
+
*/
|
|
2019
|
+
export class FeedItem {
|
|
2020
|
+
private constructor();
|
|
2021
|
+
/**
|
|
2022
|
+
* @remarks
|
|
2023
|
+
* The amount of health this entity gains when fed this item.
|
|
2024
|
+
* This number is an integer starting at 0. Sample values can
|
|
2025
|
+
* go as high as 40.
|
|
2026
|
+
*
|
|
2027
|
+
*/
|
|
2028
|
+
readonly healAmount: number;
|
|
2029
|
+
/**
|
|
2030
|
+
* @remarks
|
|
2031
|
+
* Identifier of type of item that can be fed. If a namespace
|
|
2032
|
+
* is not specified, 'minecraft:' is assumed. Example values
|
|
2033
|
+
* include 'wheat' or 'golden_apple'.
|
|
2034
|
+
*
|
|
2035
|
+
*/
|
|
2036
|
+
readonly item: string;
|
|
2037
|
+
/**
|
|
2038
|
+
* @remarks
|
|
2039
|
+
* As part of the Healable component, an optional collection of
|
|
2040
|
+
* side effects that can occur from being fed an item.
|
|
2041
|
+
*
|
|
2042
|
+
*/
|
|
2043
|
+
getEffects(): FeedItemEffect[];
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* @beta
|
|
2048
|
+
* Represents an effect that is applied as a result of a food
|
|
2049
|
+
* item being fed to an entity.
|
|
2050
|
+
*/
|
|
2051
|
+
export class FeedItemEffect {
|
|
2052
|
+
private constructor();
|
|
2053
|
+
/**
|
|
2054
|
+
* @remarks
|
|
2055
|
+
* Gets an amplifier that may have been applied to this effect.
|
|
2056
|
+
* Valid values are integers starting at 0 and up - but usually
|
|
2057
|
+
* ranging between 0 and 4.
|
|
2058
|
+
*
|
|
2059
|
+
*/
|
|
2060
|
+
readonly amplifier: number;
|
|
2061
|
+
/**
|
|
2062
|
+
* @remarks
|
|
2063
|
+
* Chance that this effect is applied as a result of the entity
|
|
2064
|
+
* being fed this item. Valid values range between 0 and 1.
|
|
2065
|
+
*
|
|
2066
|
+
*/
|
|
2067
|
+
readonly chance: number;
|
|
2068
|
+
/**
|
|
2069
|
+
* @remarks
|
|
2070
|
+
* Gets the duration, in ticks, of this effect.
|
|
2071
|
+
*
|
|
2072
|
+
*/
|
|
2073
|
+
readonly duration: number;
|
|
2074
|
+
/**
|
|
2075
|
+
* @remarks
|
|
2076
|
+
* Gets the identifier of the effect to apply. Example values
|
|
2077
|
+
* include 'fire_resistance' or 'regeneration'.
|
|
2078
|
+
*
|
|
2079
|
+
*/
|
|
2080
|
+
readonly name: string;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
/**
|
|
2084
|
+
* @beta
|
|
2085
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
2086
|
+
* an event that fires when a button is pushed.
|
|
2087
|
+
*/
|
|
2088
|
+
export class IButtonPushAfterEventSignal {
|
|
2089
|
+
private constructor();
|
|
2090
|
+
/**
|
|
2091
|
+
* @remarks
|
|
2092
|
+
* This function can't be called in read-only mode.
|
|
2093
|
+
*
|
|
2094
|
+
*/
|
|
2095
|
+
subscribe(callback: (arg: ButtonPushAfterEvent) => void): (arg: ButtonPushAfterEvent) => void;
|
|
2096
|
+
/**
|
|
2097
|
+
* @remarks
|
|
2098
|
+
* This function can't be called in read-only mode.
|
|
2099
|
+
*
|
|
2100
|
+
* @throws This function can throw errors.
|
|
2101
|
+
*/
|
|
2102
|
+
unsubscribe(callback: (arg: ButtonPushAfterEvent) => void): void;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* @beta
|
|
2107
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
2108
|
+
* an event that fires after a lever is used.
|
|
2109
|
+
*/
|
|
2110
|
+
export class ILeverActionAfterEventSignal {
|
|
2111
|
+
private constructor();
|
|
2112
|
+
/**
|
|
2113
|
+
* @remarks
|
|
2114
|
+
* This function can't be called in read-only mode.
|
|
2115
|
+
*
|
|
2116
|
+
*/
|
|
2117
|
+
subscribe(callback: (arg: LeverActionAfterEvent) => void): (arg: LeverActionAfterEvent) => void;
|
|
2118
|
+
/**
|
|
2119
|
+
* @remarks
|
|
2120
|
+
* This function can't be called in read-only mode.
|
|
2121
|
+
*
|
|
2122
|
+
* @throws This function can throw errors.
|
|
2123
|
+
*/
|
|
2124
|
+
unsubscribe(callback: (arg: LeverActionAfterEvent) => void): void;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
* @beta
|
|
2129
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
2130
|
+
* an event that fires after a player joins a world.
|
|
2131
|
+
*/
|
|
2132
|
+
export class IPlayerJoinAfterEventSignal {
|
|
2133
|
+
private constructor();
|
|
2134
|
+
/**
|
|
2135
|
+
* @remarks
|
|
2136
|
+
* This function can't be called in read-only mode.
|
|
2137
|
+
*
|
|
2138
|
+
*/
|
|
2139
|
+
subscribe(callback: (arg: PlayerJoinAfterEvent) => void): (arg: PlayerJoinAfterEvent) => void;
|
|
2140
|
+
/**
|
|
2141
|
+
* @remarks
|
|
2142
|
+
* This function can't be called in read-only mode.
|
|
2143
|
+
*
|
|
2144
|
+
* @throws This function can throw errors.
|
|
2145
|
+
*/
|
|
2146
|
+
unsubscribe(callback: (arg: PlayerJoinAfterEvent) => void): void;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
/**
|
|
2150
|
+
* @beta
|
|
2151
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
2152
|
+
* an event that fires after a player leaves a world.
|
|
2153
|
+
*/
|
|
2154
|
+
export class IPlayerLeaveAfterEventSignal {
|
|
2155
|
+
private constructor();
|
|
2156
|
+
/**
|
|
2157
|
+
* @remarks
|
|
2158
|
+
* This function can't be called in read-only mode.
|
|
2159
|
+
*
|
|
2160
|
+
*/
|
|
2161
|
+
subscribe(callback: (arg: PlayerLeaveAfterEvent) => void): (arg: PlayerLeaveAfterEvent) => void;
|
|
2162
|
+
/**
|
|
2163
|
+
* @remarks
|
|
2164
|
+
* This function can't be called in read-only mode.
|
|
2165
|
+
*
|
|
2166
|
+
* @throws This function can throw errors.
|
|
2167
|
+
*/
|
|
2168
|
+
unsubscribe(callback: (arg: PlayerLeaveAfterEvent) => void): void;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
/**
|
|
2172
|
+
* @beta
|
|
2173
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
2174
|
+
* an event that fires after a player spawns.
|
|
2175
|
+
*/
|
|
2176
|
+
export class IPlayerSpawnAfterEventSignal {
|
|
2177
|
+
private constructor();
|
|
2178
|
+
/**
|
|
2179
|
+
* @remarks
|
|
2180
|
+
* This function can't be called in read-only mode.
|
|
2181
|
+
*
|
|
2182
|
+
*/
|
|
2183
|
+
subscribe(callback: (arg: PlayerSpawnAfterEvent) => void): (arg: PlayerSpawnAfterEvent) => void;
|
|
2184
|
+
/**
|
|
2185
|
+
* @remarks
|
|
2186
|
+
* This function can't be called in read-only mode.
|
|
2187
|
+
*
|
|
2188
|
+
* @throws This function can throw errors.
|
|
2189
|
+
*/
|
|
2190
|
+
unsubscribe(callback: (arg: PlayerSpawnAfterEvent) => void): void;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
1526
2193
|
/**
|
|
1527
2194
|
* @beta
|
|
1528
2195
|
* Base class for item components.
|
|
1529
2196
|
*/
|
|
2197
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1530
2198
|
export class ItemComponent extends Component {
|
|
1531
|
-
|
|
2199
|
+
private constructor();
|
|
1532
2200
|
}
|
|
1533
2201
|
|
|
1534
2202
|
/**
|
|
@@ -1672,7 +2340,7 @@ export class ItemStack {
|
|
|
1672
2340
|
* Represents the type of an item - for example, Wool.
|
|
1673
2341
|
*/
|
|
1674
2342
|
export class ItemType {
|
|
1675
|
-
|
|
2343
|
+
private constructor();
|
|
1676
2344
|
/**
|
|
1677
2345
|
* @remarks
|
|
1678
2346
|
* Returns the identifier of the item type - for example,
|
|
@@ -1682,11 +2350,44 @@ export class ItemType {
|
|
|
1682
2350
|
readonly id: string;
|
|
1683
2351
|
}
|
|
1684
2352
|
|
|
2353
|
+
/**
|
|
2354
|
+
* @beta
|
|
2355
|
+
* Contains information related to changes to a lever
|
|
2356
|
+
* activating or deactivating.
|
|
2357
|
+
*/
|
|
2358
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2359
|
+
export class LeverActionAfterEvent extends BlockEvent {
|
|
2360
|
+
private constructor();
|
|
2361
|
+
/**
|
|
2362
|
+
* @remarks
|
|
2363
|
+
* True if the lever is activated (that is, transmitting
|
|
2364
|
+
* power).
|
|
2365
|
+
*
|
|
2366
|
+
*/
|
|
2367
|
+
readonly isPowered: boolean;
|
|
2368
|
+
/**
|
|
2369
|
+
* @remarks
|
|
2370
|
+
* Optional player that triggered the lever activation.
|
|
2371
|
+
*
|
|
2372
|
+
*/
|
|
2373
|
+
readonly player: Player;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
/**
|
|
2377
|
+
* @beta
|
|
2378
|
+
* Manages callbacks that are connected to lever moves
|
|
2379
|
+
* (activates or deactivates).
|
|
2380
|
+
*/
|
|
2381
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2382
|
+
export class LeverActionAfterEventSignal extends ILeverActionAfterEventSignal {
|
|
2383
|
+
private constructor();
|
|
2384
|
+
}
|
|
2385
|
+
|
|
1685
2386
|
/**
|
|
1686
2387
|
* A collection of default Minecraft dimension types.
|
|
1687
2388
|
*/
|
|
1688
2389
|
export class MinecraftDimensionTypes {
|
|
1689
|
-
|
|
2390
|
+
private constructor();
|
|
1690
2391
|
/**
|
|
1691
2392
|
* @remarks
|
|
1692
2393
|
* The Nether is a collection of biomes separate from the
|
|
@@ -1725,8 +2426,9 @@ export class MinecraftDimensionTypes {
|
|
|
1725
2426
|
/**
|
|
1726
2427
|
* Represents a player within the world.
|
|
1727
2428
|
*/
|
|
2429
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1728
2430
|
export class Player extends Entity {
|
|
1729
|
-
|
|
2431
|
+
private constructor();
|
|
1730
2432
|
/**
|
|
1731
2433
|
* @remarks
|
|
1732
2434
|
* Name of the player.
|
|
@@ -1789,11 +2491,112 @@ export class Player extends Entity {
|
|
|
1789
2491
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
1790
2492
|
}
|
|
1791
2493
|
|
|
2494
|
+
/**
|
|
2495
|
+
* @beta
|
|
2496
|
+
* Contains information regarding a player that has joined.
|
|
2497
|
+
* See the playerSpawn event for more detailed information that
|
|
2498
|
+
* could be returned after the first time a player has spawned
|
|
2499
|
+
* within the game.
|
|
2500
|
+
*/
|
|
2501
|
+
export class PlayerJoinAfterEvent {
|
|
2502
|
+
private constructor();
|
|
2503
|
+
/**
|
|
2504
|
+
* @remarks
|
|
2505
|
+
* Opaque string identifier of the player that joined the game.
|
|
2506
|
+
*
|
|
2507
|
+
*/
|
|
2508
|
+
readonly playerId: string;
|
|
2509
|
+
/**
|
|
2510
|
+
* @remarks
|
|
2511
|
+
* Name of the player that has joined.
|
|
2512
|
+
*
|
|
2513
|
+
*/
|
|
2514
|
+
readonly playerName: string;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
/**
|
|
2518
|
+
* @beta
|
|
2519
|
+
* Manages callbacks that are connected to a player joining the
|
|
2520
|
+
* world.
|
|
2521
|
+
*/
|
|
2522
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2523
|
+
export class PlayerJoinAfterEventSignal extends IPlayerJoinAfterEventSignal {
|
|
2524
|
+
private constructor();
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
/**
|
|
2528
|
+
* @beta
|
|
2529
|
+
* Contains information regarding a player that has left the
|
|
2530
|
+
* world.
|
|
2531
|
+
*/
|
|
2532
|
+
export class PlayerLeaveAfterEvent {
|
|
2533
|
+
private constructor();
|
|
2534
|
+
/**
|
|
2535
|
+
* @remarks
|
|
2536
|
+
* Opaque string identifier of the player that has left the
|
|
2537
|
+
* event.
|
|
2538
|
+
*
|
|
2539
|
+
*/
|
|
2540
|
+
readonly playerId: string;
|
|
2541
|
+
/**
|
|
2542
|
+
* @remarks
|
|
2543
|
+
* Player that has left the world.
|
|
2544
|
+
*
|
|
2545
|
+
*/
|
|
2546
|
+
readonly playerName: string;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
* @beta
|
|
2551
|
+
* Manages callbacks that are connected to a player leaving the
|
|
2552
|
+
* world.
|
|
2553
|
+
*/
|
|
2554
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2555
|
+
export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal {
|
|
2556
|
+
private constructor();
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
/**
|
|
2560
|
+
* @beta
|
|
2561
|
+
* An event that contains more information about a player
|
|
2562
|
+
* spawning.
|
|
2563
|
+
*/
|
|
2564
|
+
export class PlayerSpawnAfterEvent {
|
|
2565
|
+
private constructor();
|
|
2566
|
+
/**
|
|
2567
|
+
* @remarks
|
|
2568
|
+
* If true, this is the initial spawn of a player after joining
|
|
2569
|
+
* the game.
|
|
2570
|
+
*
|
|
2571
|
+
* This property can't be edited in read-only mode.
|
|
2572
|
+
*
|
|
2573
|
+
*/
|
|
2574
|
+
initialSpawn: boolean;
|
|
2575
|
+
/**
|
|
2576
|
+
* @remarks
|
|
2577
|
+
* Object that represents the player that joined the game.
|
|
2578
|
+
*
|
|
2579
|
+
* This property can't be edited in read-only mode.
|
|
2580
|
+
*
|
|
2581
|
+
*/
|
|
2582
|
+
player: Player;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
/**
|
|
2586
|
+
* @beta
|
|
2587
|
+
* Registers an event when a player is spawned (or re-spawned
|
|
2588
|
+
* after death) and fully ready within the world.
|
|
2589
|
+
*/
|
|
2590
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2591
|
+
export class PlayerSpawnAfterEventSignal extends IPlayerSpawnAfterEventSignal {
|
|
2592
|
+
private constructor();
|
|
2593
|
+
}
|
|
2594
|
+
|
|
1792
2595
|
/**
|
|
1793
2596
|
* A class that provides system-level events and functions.
|
|
1794
2597
|
*/
|
|
1795
2598
|
export class System {
|
|
1796
|
-
|
|
2599
|
+
private constructor();
|
|
1797
2600
|
/**
|
|
1798
2601
|
* @beta
|
|
1799
2602
|
* @remarks
|
|
@@ -1860,7 +2663,7 @@ export class System {
|
|
|
1860
2663
|
* dimensions and the environment of Minecraft.
|
|
1861
2664
|
*/
|
|
1862
2665
|
export class World {
|
|
1863
|
-
|
|
2666
|
+
private constructor();
|
|
1864
2667
|
/**
|
|
1865
2668
|
* @remarks
|
|
1866
2669
|
* Returns an array of all active players within the world.
|
|
@@ -1973,6 +2776,18 @@ export class World {
|
|
|
1973
2776
|
stopMusic(): void;
|
|
1974
2777
|
}
|
|
1975
2778
|
|
|
2779
|
+
/**
|
|
2780
|
+
* @beta
|
|
2781
|
+
*/
|
|
2782
|
+
export class WorldAfterEvents {
|
|
2783
|
+
private constructor();
|
|
2784
|
+
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
2785
|
+
readonly leverAction: LeverActionAfterEventSignal;
|
|
2786
|
+
readonly playerJoin: PlayerJoinAfterEventSignal;
|
|
2787
|
+
readonly playerLeave: PlayerLeaveAfterEventSignal;
|
|
2788
|
+
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
2789
|
+
}
|
|
2790
|
+
|
|
1976
2791
|
/**
|
|
1977
2792
|
* @beta
|
|
1978
2793
|
* Additional options for when damage has been applied via a
|
|
@@ -2012,6 +2827,25 @@ export interface EntityApplyDamageOptions {
|
|
|
2012
2827
|
damagingEntity?: Entity;
|
|
2013
2828
|
}
|
|
2014
2829
|
|
|
2830
|
+
/**
|
|
2831
|
+
* @beta
|
|
2832
|
+
* Contains additional options for entity effects.
|
|
2833
|
+
*/
|
|
2834
|
+
export interface EntityEffectOptions {
|
|
2835
|
+
/**
|
|
2836
|
+
* @remarks
|
|
2837
|
+
* The strength of the effect.
|
|
2838
|
+
*
|
|
2839
|
+
*/
|
|
2840
|
+
amplifier?: number;
|
|
2841
|
+
/**
|
|
2842
|
+
* @remarks
|
|
2843
|
+
* If true, will show particles when effect is on the entity.
|
|
2844
|
+
*
|
|
2845
|
+
*/
|
|
2846
|
+
showParticles?: boolean;
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2015
2849
|
/**
|
|
2016
2850
|
* @beta
|
|
2017
2851
|
* Contains options for selecting entities within an area.
|
|
@@ -2293,6 +3127,65 @@ export interface RawMessageScore {
|
|
|
2293
3127
|
objective?: string;
|
|
2294
3128
|
}
|
|
2295
3129
|
|
|
3130
|
+
/**
|
|
3131
|
+
* @beta
|
|
3132
|
+
* Contains additional options for teleporting an entity.
|
|
3133
|
+
*/
|
|
3134
|
+
export interface TeleportOptions {
|
|
3135
|
+
/**
|
|
3136
|
+
* @remarks
|
|
3137
|
+
* Whether to check whether blocks will block the entity after
|
|
3138
|
+
* teleport.
|
|
3139
|
+
*
|
|
3140
|
+
*/
|
|
3141
|
+
checkForBlocks?: boolean;
|
|
3142
|
+
/**
|
|
3143
|
+
* @remarks
|
|
3144
|
+
* Dimension to potentially move the entity to. If not
|
|
3145
|
+
* specified, the entity is teleported within the dimension
|
|
3146
|
+
* that they reside.
|
|
3147
|
+
*
|
|
3148
|
+
*/
|
|
3149
|
+
dimension?: Dimension;
|
|
3150
|
+
/**
|
|
3151
|
+
* @remarks
|
|
3152
|
+
* Location that the entity should be facing after teleport.
|
|
3153
|
+
*
|
|
3154
|
+
*/
|
|
3155
|
+
facingLocation?: Vector3;
|
|
3156
|
+
/**
|
|
3157
|
+
* @remarks
|
|
3158
|
+
* Whether to retain the entities velocity after teleport.
|
|
3159
|
+
*
|
|
3160
|
+
*/
|
|
3161
|
+
keepVelocity?: boolean;
|
|
3162
|
+
/**
|
|
3163
|
+
* @remarks
|
|
3164
|
+
* Rotation of the entity after teleport.
|
|
3165
|
+
*
|
|
3166
|
+
*/
|
|
3167
|
+
rotation?: Vector2;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
/**
|
|
3171
|
+
* @beta
|
|
3172
|
+
* Represents a two-directional vector.
|
|
3173
|
+
*/
|
|
3174
|
+
export interface Vector2 {
|
|
3175
|
+
/**
|
|
3176
|
+
* @remarks
|
|
3177
|
+
* X component of the two-dimensional vector.
|
|
3178
|
+
*
|
|
3179
|
+
*/
|
|
3180
|
+
x: number;
|
|
3181
|
+
/**
|
|
3182
|
+
* @remarks
|
|
3183
|
+
* Y component of the two-dimensional vector.
|
|
3184
|
+
*
|
|
3185
|
+
*/
|
|
3186
|
+
y: number;
|
|
3187
|
+
}
|
|
3188
|
+
|
|
2296
3189
|
/**
|
|
2297
3190
|
* @beta
|
|
2298
3191
|
* Contains a description of a vector.
|