@minecraft/server 2.8.0-rc.1.26.30-preview.26 → 2.8.0-rc.1.26.30-preview.28
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 +306 -5
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1438,6 +1438,13 @@ export enum EntityHealCause {
|
|
|
1438
1438
|
*
|
|
1439
1439
|
*/
|
|
1440
1440
|
SelfHeal = 'SelfHeal',
|
|
1441
|
+
/**
|
|
1442
|
+
* @rc
|
|
1443
|
+
* @remarks
|
|
1444
|
+
* Healing caused when Totem of Undying is activated.
|
|
1445
|
+
*
|
|
1446
|
+
*/
|
|
1447
|
+
TotemOfUndying = 'TotemOfUndying',
|
|
1441
1448
|
}
|
|
1442
1449
|
|
|
1443
1450
|
/**
|
|
@@ -3675,14 +3682,12 @@ export class BiomeType {
|
|
|
3675
3682
|
*/
|
|
3676
3683
|
readonly id: string;
|
|
3677
3684
|
/**
|
|
3678
|
-
* @rc
|
|
3679
3685
|
* @remarks
|
|
3680
3686
|
* Returns a list of the biome's tags.
|
|
3681
3687
|
*
|
|
3682
3688
|
*/
|
|
3683
3689
|
getTags(): string[];
|
|
3684
3690
|
/**
|
|
3685
|
-
* @rc
|
|
3686
3691
|
* @remarks
|
|
3687
3692
|
* Checks if the biome has all of the provided tags.
|
|
3688
3693
|
*
|
|
@@ -3693,7 +3698,6 @@ export class BiomeType {
|
|
|
3693
3698
|
}
|
|
3694
3699
|
|
|
3695
3700
|
/**
|
|
3696
|
-
* @rc
|
|
3697
3701
|
* Supports a catalog of available biome types registered
|
|
3698
3702
|
* within Minecraft.
|
|
3699
3703
|
*/
|
|
@@ -4346,6 +4350,22 @@ export class BlockComponentBlockBreakEvent extends BlockEvent {
|
|
|
4346
4350
|
readonly entitySource?: Entity;
|
|
4347
4351
|
}
|
|
4348
4352
|
|
|
4353
|
+
/**
|
|
4354
|
+
* @rc
|
|
4355
|
+
* Contains information regarding a specific block permutation
|
|
4356
|
+
* that was changed from a previous permutation.
|
|
4357
|
+
*/
|
|
4358
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4359
|
+
export class BlockComponentBlockStateChangeEvent extends BlockEvent {
|
|
4360
|
+
private constructor();
|
|
4361
|
+
/**
|
|
4362
|
+
* @remarks
|
|
4363
|
+
* The previous BlockPermutation.
|
|
4364
|
+
*
|
|
4365
|
+
*/
|
|
4366
|
+
readonly previousPermutation: BlockPermutation;
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4349
4369
|
/**
|
|
4350
4370
|
* Contains information regarding an event sent by an entity to
|
|
4351
4371
|
* this block in the world.
|
|
@@ -5286,6 +5306,20 @@ export class BlockPrecipitationInteractionsComponent extends BlockComponent {
|
|
|
5286
5306
|
* {@link LocationOutOfWorldBoundariesError}
|
|
5287
5307
|
*/
|
|
5288
5308
|
accumulatesSnow(): boolean;
|
|
5309
|
+
/**
|
|
5310
|
+
* @rc
|
|
5311
|
+
* @remarks
|
|
5312
|
+
* Returns `true` if this block can have snow within it, like a
|
|
5313
|
+
* flower submerged in snow. Returns `false` if this block
|
|
5314
|
+
* cannot have snow within it.
|
|
5315
|
+
*
|
|
5316
|
+
* @throws This function can throw errors.
|
|
5317
|
+
*
|
|
5318
|
+
* {@link LocationInUnloadedChunkError}
|
|
5319
|
+
*
|
|
5320
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
5321
|
+
*/
|
|
5322
|
+
isSnowLoggable(): boolean;
|
|
5289
5323
|
/**
|
|
5290
5324
|
* @remarks
|
|
5291
5325
|
* Returns `true` if rain will not go through the block.
|
|
@@ -8543,7 +8577,6 @@ export class Entity {
|
|
|
8543
8577
|
*/
|
|
8544
8578
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
|
|
8545
8579
|
/**
|
|
8546
|
-
* @rc
|
|
8547
8580
|
* @remarks
|
|
8548
8581
|
* Adds an item to the entity's inventory.
|
|
8549
8582
|
*
|
|
@@ -12576,6 +12609,34 @@ export class EntityUnderwaterMovementComponent extends EntityAttributeComponent
|
|
|
12576
12609
|
static readonly componentId = 'minecraft:underwater_movement';
|
|
12577
12610
|
}
|
|
12578
12611
|
|
|
12612
|
+
/**
|
|
12613
|
+
* @rc
|
|
12614
|
+
* Contains information related to firing of a data driven
|
|
12615
|
+
* entity version upgrade.
|
|
12616
|
+
*/
|
|
12617
|
+
export class EntityUpgradeAfterEvent {
|
|
12618
|
+
private constructor();
|
|
12619
|
+
/**
|
|
12620
|
+
* @remarks
|
|
12621
|
+
* Entity that the upgrade triggered on.
|
|
12622
|
+
*
|
|
12623
|
+
*/
|
|
12624
|
+
readonly entity: Entity;
|
|
12625
|
+
/**
|
|
12626
|
+
* @remarks
|
|
12627
|
+
* Name of the data driven upgrade being triggered.
|
|
12628
|
+
*
|
|
12629
|
+
*/
|
|
12630
|
+
readonly upgradeId: string;
|
|
12631
|
+
/**
|
|
12632
|
+
* @remarks
|
|
12633
|
+
* An updateable list of modifications to component state that
|
|
12634
|
+
* are the effect of this triggered upgrade.
|
|
12635
|
+
*
|
|
12636
|
+
*/
|
|
12637
|
+
getModifiers(): DefinitionModifier[];
|
|
12638
|
+
}
|
|
12639
|
+
|
|
12579
12640
|
/**
|
|
12580
12641
|
* Used to differentiate the component group of a variant of an
|
|
12581
12642
|
* entity from others. (e.g. ocelot, villager).
|
|
@@ -18116,6 +18177,151 @@ export class PressurePlatePushAfterEventSignal {
|
|
|
18116
18177
|
unsubscribe(callback: (arg0: PressurePlatePushAfterEvent) => void): void;
|
|
18117
18178
|
}
|
|
18118
18179
|
|
|
18180
|
+
/**
|
|
18181
|
+
* @rc
|
|
18182
|
+
* The base class for a text primitive. Represents an object in
|
|
18183
|
+
* the world and its base properties.
|
|
18184
|
+
*/
|
|
18185
|
+
export class PrimitiveShape {
|
|
18186
|
+
private constructor();
|
|
18187
|
+
/**
|
|
18188
|
+
* @remarks
|
|
18189
|
+
* The entity this shape is attached to. When set, this shape
|
|
18190
|
+
* will copy the root location of the attached entity and the
|
|
18191
|
+
* shape's position will be used as an offset.
|
|
18192
|
+
*
|
|
18193
|
+
*/
|
|
18194
|
+
attachedTo?: Entity;
|
|
18195
|
+
/**
|
|
18196
|
+
* @remarks
|
|
18197
|
+
* The color of the shape.
|
|
18198
|
+
*
|
|
18199
|
+
*/
|
|
18200
|
+
color: RGBA;
|
|
18201
|
+
/**
|
|
18202
|
+
* @remarks
|
|
18203
|
+
* The dimension the shape is visible within. If the dimension
|
|
18204
|
+
* is undefined, it will display in all dimensions.
|
|
18205
|
+
*
|
|
18206
|
+
*/
|
|
18207
|
+
readonly dimension: Dimension;
|
|
18208
|
+
/**
|
|
18209
|
+
* @remarks
|
|
18210
|
+
* Returns true if the shape has a limited time span before
|
|
18211
|
+
* being removed.
|
|
18212
|
+
*
|
|
18213
|
+
*/
|
|
18214
|
+
readonly hasDuration: boolean;
|
|
18215
|
+
/**
|
|
18216
|
+
* @remarks
|
|
18217
|
+
* The location of the shape.
|
|
18218
|
+
*
|
|
18219
|
+
*/
|
|
18220
|
+
readonly location: Vector3;
|
|
18221
|
+
/**
|
|
18222
|
+
* @remarks
|
|
18223
|
+
* If defined, this distance will be used to determine how far
|
|
18224
|
+
* away this primitive will be rendered for each client. By
|
|
18225
|
+
* default the distance will match the client's render distance
|
|
18226
|
+
* setting.
|
|
18227
|
+
*
|
|
18228
|
+
* Minimum Value: 0
|
|
18229
|
+
*/
|
|
18230
|
+
maximumRenderDistance?: number;
|
|
18231
|
+
/**
|
|
18232
|
+
* @remarks
|
|
18233
|
+
* The rotation of the shape (Euler angles - [Pitch, Yaw,
|
|
18234
|
+
* Roll]).
|
|
18235
|
+
*
|
|
18236
|
+
*/
|
|
18237
|
+
rotation: Vector3;
|
|
18238
|
+
/**
|
|
18239
|
+
* @remarks
|
|
18240
|
+
* The scale of the shape.
|
|
18241
|
+
*
|
|
18242
|
+
* Bounds: [-1000, 1000]
|
|
18243
|
+
*/
|
|
18244
|
+
scale: number;
|
|
18245
|
+
/**
|
|
18246
|
+
* @remarks
|
|
18247
|
+
* The time left (in seconds) until this shape is automatically
|
|
18248
|
+
* removed. Returns undefined if the shape does not have a
|
|
18249
|
+
* limited life-span.
|
|
18250
|
+
*
|
|
18251
|
+
*/
|
|
18252
|
+
timeLeft?: number;
|
|
18253
|
+
/**
|
|
18254
|
+
* @remarks
|
|
18255
|
+
* The total initial time-span (in seconds) until this shape is
|
|
18256
|
+
* automatically removed. Returns undefined if the shape does
|
|
18257
|
+
* not have a limited life-span.
|
|
18258
|
+
*
|
|
18259
|
+
*/
|
|
18260
|
+
readonly totalTimeLeft?: number;
|
|
18261
|
+
/**
|
|
18262
|
+
* @remarks
|
|
18263
|
+
* The list of players that this shape will be visible to. If
|
|
18264
|
+
* left empty, the shape will be visible to all players.
|
|
18265
|
+
*
|
|
18266
|
+
*/
|
|
18267
|
+
visibleTo: Player[];
|
|
18268
|
+
/**
|
|
18269
|
+
* @remarks
|
|
18270
|
+
* Removes this shape from the world. The shape can be re-added
|
|
18271
|
+
* via the PrimitiveShapesManager's addText method.
|
|
18272
|
+
*
|
|
18273
|
+
*/
|
|
18274
|
+
remove(): void;
|
|
18275
|
+
/**
|
|
18276
|
+
* @remarks
|
|
18277
|
+
* Set the location and dimension of the shape. If the
|
|
18278
|
+
* dimension is undefined, it will display in all dimensions.
|
|
18279
|
+
*
|
|
18280
|
+
*/
|
|
18281
|
+
setLocation(location: DimensionLocation | Vector3): void;
|
|
18282
|
+
}
|
|
18283
|
+
|
|
18284
|
+
/**
|
|
18285
|
+
* @rc
|
|
18286
|
+
* Primitive Shapes class used to allow adding and removing
|
|
18287
|
+
* text primitives to the world.
|
|
18288
|
+
*/
|
|
18289
|
+
export class PrimitiveShapesManager {
|
|
18290
|
+
private constructor();
|
|
18291
|
+
/**
|
|
18292
|
+
* @remarks
|
|
18293
|
+
* This is the maximum number of allowed primitive shapes.
|
|
18294
|
+
*
|
|
18295
|
+
*/
|
|
18296
|
+
readonly maxShapes: number;
|
|
18297
|
+
/**
|
|
18298
|
+
* @remarks
|
|
18299
|
+
* Adds a new text primitive to the world.
|
|
18300
|
+
*
|
|
18301
|
+
* @param text
|
|
18302
|
+
* The text primitive to be added.
|
|
18303
|
+
* @throws This function can throw errors.
|
|
18304
|
+
*
|
|
18305
|
+
* {@link minecraftcommon.EngineError}
|
|
18306
|
+
*
|
|
18307
|
+
* {@link PrimitiveShapeError}
|
|
18308
|
+
*/
|
|
18309
|
+
addText(text: TextPrimitive, dimension?: Dimension): void;
|
|
18310
|
+
/**
|
|
18311
|
+
* @remarks
|
|
18312
|
+
* Removes all text primitives from the world.
|
|
18313
|
+
*
|
|
18314
|
+
*/
|
|
18315
|
+
removeAll(): void;
|
|
18316
|
+
/**
|
|
18317
|
+
* @remarks
|
|
18318
|
+
* Removes an instance of a text primitive from the world. This
|
|
18319
|
+
* is equivalent to calling remove on the text itself.
|
|
18320
|
+
*
|
|
18321
|
+
*/
|
|
18322
|
+
removeText(text: TextPrimitive): void;
|
|
18323
|
+
}
|
|
18324
|
+
|
|
18119
18325
|
/**
|
|
18120
18326
|
* Contains information related to a projectile hitting a
|
|
18121
18327
|
* block.
|
|
@@ -20122,6 +20328,73 @@ export class TargetBlockHitAfterEventSignal {
|
|
|
20122
20328
|
unsubscribe(callback: (arg0: TargetBlockHitAfterEvent) => void): void;
|
|
20123
20329
|
}
|
|
20124
20330
|
|
|
20331
|
+
/**
|
|
20332
|
+
* @rc
|
|
20333
|
+
* A primitive shape class that represents a text label in the
|
|
20334
|
+
* world with a background.
|
|
20335
|
+
*/
|
|
20336
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20337
|
+
export class TextPrimitive extends PrimitiveShape {
|
|
20338
|
+
/**
|
|
20339
|
+
* @remarks
|
|
20340
|
+
* If set to true, the text primitive will render the back-face
|
|
20341
|
+
* of the background. Defaults to true but will always be false
|
|
20342
|
+
* if 'useRotation' is set to false.
|
|
20343
|
+
*
|
|
20344
|
+
*/
|
|
20345
|
+
backfaceVisible: boolean;
|
|
20346
|
+
/**
|
|
20347
|
+
* @remarks
|
|
20348
|
+
* The color of the background plate of the text. If set to
|
|
20349
|
+
* undefined, it will use the default color.
|
|
20350
|
+
*
|
|
20351
|
+
*/
|
|
20352
|
+
backgroundColorOverride?: RGBA;
|
|
20353
|
+
/**
|
|
20354
|
+
* @remarks
|
|
20355
|
+
* If set to true, the text will be hidden behind blocks or
|
|
20356
|
+
* entities. By default this is set to false (will always
|
|
20357
|
+
* render).
|
|
20358
|
+
*
|
|
20359
|
+
*/
|
|
20360
|
+
depthTest: boolean;
|
|
20361
|
+
/**
|
|
20362
|
+
* @remarks
|
|
20363
|
+
* Get the text of the debug text shape. Returns the RawText of
|
|
20364
|
+
* the debug text if `setText` was called with a RawMessage or
|
|
20365
|
+
* a RawText object, otherwise returns a string.
|
|
20366
|
+
*
|
|
20367
|
+
*/
|
|
20368
|
+
readonly text: RawMessage | string;
|
|
20369
|
+
/**
|
|
20370
|
+
* @remarks
|
|
20371
|
+
* If set to true, the text primitive will render the back-face
|
|
20372
|
+
* of the text. Defaults to true but will always be false if
|
|
20373
|
+
* 'useRotation' is set to false.
|
|
20374
|
+
*
|
|
20375
|
+
*/
|
|
20376
|
+
textBackfaceVisible: boolean;
|
|
20377
|
+
/**
|
|
20378
|
+
* @remarks
|
|
20379
|
+
* If set to true, the text will not face the camera and
|
|
20380
|
+
* instead will use the rotation from the shape.
|
|
20381
|
+
*
|
|
20382
|
+
*/
|
|
20383
|
+
useRotation: boolean;
|
|
20384
|
+
constructor(location: DimensionLocation | Vector3, text: RawMessage | string);
|
|
20385
|
+
/**
|
|
20386
|
+
* @remarks
|
|
20387
|
+
* Sets the text to display.
|
|
20388
|
+
*
|
|
20389
|
+
* @throws This function can throw errors.
|
|
20390
|
+
*
|
|
20391
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
20392
|
+
*
|
|
20393
|
+
* {@link RawMessageError}
|
|
20394
|
+
*/
|
|
20395
|
+
setText(text: RawMessage | string): void;
|
|
20396
|
+
}
|
|
20397
|
+
|
|
20125
20398
|
/**
|
|
20126
20399
|
* This manager is used to add, remove or query temporary
|
|
20127
20400
|
* ticking areas to a dimension. These ticking areas are
|
|
@@ -20543,6 +20816,14 @@ export class World {
|
|
|
20543
20816
|
*/
|
|
20544
20817
|
readonly gameRules: GameRules;
|
|
20545
20818
|
readonly isHardcore: boolean;
|
|
20819
|
+
/**
|
|
20820
|
+
* @rc
|
|
20821
|
+
* @remarks
|
|
20822
|
+
* Manager for adding and removing primitive text objects in
|
|
20823
|
+
* the world.
|
|
20824
|
+
*
|
|
20825
|
+
*/
|
|
20826
|
+
readonly primitiveShapesManager: PrimitiveShapesManager;
|
|
20546
20827
|
/**
|
|
20547
20828
|
* @remarks
|
|
20548
20829
|
* Returns the general global scoreboard that applies to the
|
|
@@ -20762,6 +21043,15 @@ export class World {
|
|
|
20762
21043
|
*
|
|
20763
21044
|
*/
|
|
20764
21045
|
getMoonPhase(): MoonPhase;
|
|
21046
|
+
/**
|
|
21047
|
+
* @rc
|
|
21048
|
+
* @remarks
|
|
21049
|
+
* Returns a map of pack setting name and value pairs.
|
|
21050
|
+
*
|
|
21051
|
+
* This function can be called in early-execution mode.
|
|
21052
|
+
*
|
|
21053
|
+
*/
|
|
21054
|
+
getPackSettings(): Record<string, boolean | number | string>;
|
|
20765
21055
|
/**
|
|
20766
21056
|
* @remarks
|
|
20767
21057
|
* Returns a set of players based on a set of conditions
|
|
@@ -21715,6 +22005,10 @@ export interface BlockCustomComponent {
|
|
|
21715
22005
|
*
|
|
21716
22006
|
*/
|
|
21717
22007
|
beforeOnPlayerPlace?: (arg0: BlockComponentPlayerPlaceBeforeEvent, arg1: CustomComponentParameters) => void;
|
|
22008
|
+
/**
|
|
22009
|
+
* @rc
|
|
22010
|
+
*/
|
|
22011
|
+
onBlockStateChange?: (arg0: BlockComponentBlockStateChangeEvent, arg1: CustomComponentParameters) => void;
|
|
21718
22012
|
/**
|
|
21719
22013
|
* @remarks
|
|
21720
22014
|
* This function will be called when a specific block is
|
|
@@ -24471,7 +24765,6 @@ export class InvalidContainerSlotError extends Error {
|
|
|
24471
24765
|
}
|
|
24472
24766
|
|
|
24473
24767
|
/**
|
|
24474
|
-
* @rc
|
|
24475
24768
|
* This error can occur when accessing components on an entity
|
|
24476
24769
|
* that doesn't have them.
|
|
24477
24770
|
*/
|
|
@@ -24622,6 +24915,14 @@ export class PlaceJigsawError extends Error {
|
|
|
24622
24915
|
private constructor();
|
|
24623
24916
|
}
|
|
24624
24917
|
|
|
24918
|
+
/**
|
|
24919
|
+
* @rc
|
|
24920
|
+
*/
|
|
24921
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
24922
|
+
export class PrimitiveShapeError extends Error {
|
|
24923
|
+
private constructor();
|
|
24924
|
+
}
|
|
24925
|
+
|
|
24625
24926
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
24626
24927
|
export class RawMessageError extends Error {
|
|
24627
24928
|
private constructor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.8.0-rc.1.26.30-preview.
|
|
3
|
+
"version": "2.8.0-rc.1.26.30-preview.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.2.0",
|
|
17
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.30-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.30-preview.28"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|