@minecraft/server 2.12.0-rc.1.26.70-preview.22 → 2.12.0-rc.1.26.70-preview.23
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 +256 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -101,6 +101,10 @@ export enum BlockComponentTypes {
|
|
|
101
101
|
*
|
|
102
102
|
*/
|
|
103
103
|
Sign = 'minecraft:sign',
|
|
104
|
+
/**
|
|
105
|
+
* @rc
|
|
106
|
+
*/
|
|
107
|
+
VibrationProperties = 'minecraft:vibration_properties',
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
/**
|
|
@@ -3123,12 +3127,14 @@ export type BlockComponentTypeMap = {
|
|
|
3123
3127
|
'minecraft:record_player': BlockRecordPlayerComponent;
|
|
3124
3128
|
'minecraft:redstone_producer': BlockRedstoneProducerComponent;
|
|
3125
3129
|
'minecraft:sign': BlockSignComponent;
|
|
3130
|
+
'minecraft:vibration_properties': BlockVibrationPropertiesComponent;
|
|
3126
3131
|
movable: BlockMovableComponent;
|
|
3127
3132
|
piston: BlockPistonComponent;
|
|
3128
3133
|
precipitation_interactions: BlockPrecipitationInteractionsComponent;
|
|
3129
3134
|
record_player: BlockRecordPlayerComponent;
|
|
3130
3135
|
redstone_producer: BlockRedstoneProducerComponent;
|
|
3131
3136
|
sign: BlockSignComponent;
|
|
3137
|
+
vibration_properties: BlockVibrationPropertiesComponent;
|
|
3132
3138
|
};
|
|
3133
3139
|
|
|
3134
3140
|
/**
|
|
@@ -4122,6 +4128,23 @@ export class Block {
|
|
|
4122
4128
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4123
4129
|
*/
|
|
4124
4130
|
east(steps?: number): Block | undefined;
|
|
4131
|
+
/**
|
|
4132
|
+
* @rc
|
|
4133
|
+
* @remarks
|
|
4134
|
+
* Returns the named tick events scheduled at this block by the
|
|
4135
|
+
* calling script pack.
|
|
4136
|
+
*
|
|
4137
|
+
* @returns
|
|
4138
|
+
* The scheduled named tick events. Each event contains its
|
|
4139
|
+
* eventName and the number of ticks until it is raised as
|
|
4140
|
+
* tickDelay.
|
|
4141
|
+
* @throws This function can throw errors.
|
|
4142
|
+
*
|
|
4143
|
+
* {@link LocationInUnloadedChunkError}
|
|
4144
|
+
*
|
|
4145
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4146
|
+
*/
|
|
4147
|
+
getAllScheduledNamedTicks(): ScheduledNamedTick[];
|
|
4125
4148
|
/**
|
|
4126
4149
|
* @remarks
|
|
4127
4150
|
* Gets a component (that represents additional capabilities)
|
|
@@ -4223,6 +4246,22 @@ export class Block {
|
|
|
4223
4246
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4224
4247
|
*/
|
|
4225
4248
|
getRedstonePower(): number | undefined;
|
|
4249
|
+
/**
|
|
4250
|
+
* @rc
|
|
4251
|
+
* @remarks
|
|
4252
|
+
* Returns the number of named tick events scheduled at this
|
|
4253
|
+
* block, regardless of which script pack scheduled them.
|
|
4254
|
+
*
|
|
4255
|
+
* @returns
|
|
4256
|
+
* The number of named tick events currently scheduled at this
|
|
4257
|
+
* block.
|
|
4258
|
+
* @throws This function can throw errors.
|
|
4259
|
+
*
|
|
4260
|
+
* {@link LocationInUnloadedChunkError}
|
|
4261
|
+
*
|
|
4262
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4263
|
+
*/
|
|
4264
|
+
getScheduledNamedTickCount(): number;
|
|
4226
4265
|
/**
|
|
4227
4266
|
* @remarks
|
|
4228
4267
|
* Returns the brightness level of light shining from the sky
|
|
@@ -4268,6 +4307,15 @@ export class Block {
|
|
|
4268
4307
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4269
4308
|
*/
|
|
4270
4309
|
hasComponent(componentId: string): boolean;
|
|
4310
|
+
/**
|
|
4311
|
+
* @rc
|
|
4312
|
+
* @throws This function can throw errors.
|
|
4313
|
+
*
|
|
4314
|
+
* {@link LocationInUnloadedChunkError}
|
|
4315
|
+
*
|
|
4316
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4317
|
+
*/
|
|
4318
|
+
hasScheduledNamedTick(eventName: string): boolean;
|
|
4271
4319
|
/**
|
|
4272
4320
|
* @remarks
|
|
4273
4321
|
* Checks to see if the permutation of this block has a
|
|
@@ -4408,6 +4456,47 @@ export class Block {
|
|
|
4408
4456
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4409
4457
|
*/
|
|
4410
4458
|
offset(offset: Vector3): Block | undefined;
|
|
4459
|
+
/**
|
|
4460
|
+
* @rc
|
|
4461
|
+
* @remarks
|
|
4462
|
+
* Removes all scheduled named tick events from this block with
|
|
4463
|
+
* the specified event name.
|
|
4464
|
+
*
|
|
4465
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4466
|
+
*
|
|
4467
|
+
* @param eventName
|
|
4468
|
+
* Name of the scheduled event to remove.
|
|
4469
|
+
* @throws This function can throw errors.
|
|
4470
|
+
*
|
|
4471
|
+
* {@link LocationInUnloadedChunkError}
|
|
4472
|
+
*
|
|
4473
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4474
|
+
*/
|
|
4475
|
+
removeScheduledNamedTicks(eventName: string): void;
|
|
4476
|
+
/**
|
|
4477
|
+
* @rc
|
|
4478
|
+
* @remarks
|
|
4479
|
+
* Schedules a named tick event for this block. The event will
|
|
4480
|
+
* be delivered to block custom components registered with the
|
|
4481
|
+
* `onNamedTick` callback after the specified delay.
|
|
4482
|
+
*
|
|
4483
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4484
|
+
*
|
|
4485
|
+
* @param eventName
|
|
4486
|
+
* Name of the event to schedule. Up to 31 characters.
|
|
4487
|
+
* @param tickDelay
|
|
4488
|
+
* Number of ticks to wait before the event is raised. Must be
|
|
4489
|
+
* at least 1.
|
|
4490
|
+
* Minimum value: 1
|
|
4491
|
+
* @throws This function can throw errors.
|
|
4492
|
+
*
|
|
4493
|
+
* {@link Error}
|
|
4494
|
+
*
|
|
4495
|
+
* {@link LocationInUnloadedChunkError}
|
|
4496
|
+
*
|
|
4497
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4498
|
+
*/
|
|
4499
|
+
scheduleNamedTick(eventName: string, tickDelay: number): void;
|
|
4411
4500
|
/**
|
|
4412
4501
|
* @remarks
|
|
4413
4502
|
* Sets the block in the dimension to the state of the
|
|
@@ -4599,6 +4688,54 @@ export class BlockComponentEntityFallOnEvent extends BlockEvent {
|
|
|
4599
4688
|
readonly fallDistance: number;
|
|
4600
4689
|
}
|
|
4601
4690
|
|
|
4691
|
+
/**
|
|
4692
|
+
* @rc
|
|
4693
|
+
* Contains information regarding a named tick event for a
|
|
4694
|
+
* specific block.
|
|
4695
|
+
*/
|
|
4696
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4697
|
+
export class BlockComponentNamedTickEvent extends BlockEvent {
|
|
4698
|
+
private constructor();
|
|
4699
|
+
/**
|
|
4700
|
+
* @remarks
|
|
4701
|
+
* Name of the named tick event.
|
|
4702
|
+
*
|
|
4703
|
+
*/
|
|
4704
|
+
readonly name: string;
|
|
4705
|
+
/**
|
|
4706
|
+
* @remarks
|
|
4707
|
+
* Checks whether this named tick event was scheduled by this
|
|
4708
|
+
* pack.
|
|
4709
|
+
*
|
|
4710
|
+
* @returns
|
|
4711
|
+
* True if this named tick event was scheduled by this pack;
|
|
4712
|
+
* otherwise, false.
|
|
4713
|
+
*/
|
|
4714
|
+
isMine(): boolean;
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
/**
|
|
4718
|
+
* @rc
|
|
4719
|
+
* Contains information regarding neighboring block changes for
|
|
4720
|
+
* a specific block.
|
|
4721
|
+
*/
|
|
4722
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4723
|
+
export class BlockComponentNeighborChangedAfterEvent extends BlockEvent {
|
|
4724
|
+
private constructor();
|
|
4725
|
+
/**
|
|
4726
|
+
* @remarks
|
|
4727
|
+
* Returns the neighboring block changes for this event.
|
|
4728
|
+
*
|
|
4729
|
+
* @returns
|
|
4730
|
+
* One entry for each neighboring direction that changed,
|
|
4731
|
+
* ordered by when each direction first changed. If a direction
|
|
4732
|
+
* changed multiple times during the tick, the entry contains
|
|
4733
|
+
* the permutation before the first change and after the last
|
|
4734
|
+
* change. Intermediate permutations are not included.
|
|
4735
|
+
*/
|
|
4736
|
+
getChanges(): NeighborChange[];
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4602
4739
|
/**
|
|
4603
4740
|
* Contains information regarding a specific block that was
|
|
4604
4741
|
* placed.
|
|
@@ -6089,6 +6226,49 @@ export class BlockTypes {
|
|
|
6089
6226
|
static getAll(): BlockType[];
|
|
6090
6227
|
}
|
|
6091
6228
|
|
|
6229
|
+
/**
|
|
6230
|
+
* @rc
|
|
6231
|
+
* Represents the vibration properties of a block with a
|
|
6232
|
+
* 'minecraft:vibration_properties' component.
|
|
6233
|
+
*/
|
|
6234
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6235
|
+
export class BlockVibrationPropertiesComponent extends BlockComponent {
|
|
6236
|
+
private constructor();
|
|
6237
|
+
static readonly componentId = 'minecraft:vibration_properties';
|
|
6238
|
+
/**
|
|
6239
|
+
* @remarks
|
|
6240
|
+
* Gets whether this block can dampen vibrations. Vibrations
|
|
6241
|
+
* that occur on this block will be discarded by this block if
|
|
6242
|
+
* it can dampen vibrations. Returns false when the block does
|
|
6243
|
+
* not define a 'minecraft:vibration_properties' component.
|
|
6244
|
+
*
|
|
6245
|
+
* @returns
|
|
6246
|
+
* Whether this block can dampen vibrations.
|
|
6247
|
+
* @throws This function can throw errors.
|
|
6248
|
+
*
|
|
6249
|
+
* {@link LocationInUnloadedChunkError}
|
|
6250
|
+
*
|
|
6251
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
6252
|
+
*/
|
|
6253
|
+
getCanDampenVibrations(): boolean;
|
|
6254
|
+
/**
|
|
6255
|
+
* @remarks
|
|
6256
|
+
* Gets whether this block can occlude vibrations. Vibrations
|
|
6257
|
+
* that pass through this block will be discarded if this block
|
|
6258
|
+
* can occlude vibrations. Returns false when the block does
|
|
6259
|
+
* not define a 'minecraft:vibration_properties' component.
|
|
6260
|
+
*
|
|
6261
|
+
* @returns
|
|
6262
|
+
* Whether this block can occlude vibrations.
|
|
6263
|
+
* @throws This function can throw errors.
|
|
6264
|
+
*
|
|
6265
|
+
* {@link LocationInUnloadedChunkError}
|
|
6266
|
+
*
|
|
6267
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
6268
|
+
*/
|
|
6269
|
+
getCanOccludeVibrations(): boolean;
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6092
6272
|
/**
|
|
6093
6273
|
* A BlockVolume is a simple interface to an object which
|
|
6094
6274
|
* represents a 3D rectangle of a given size (in blocks) at a
|
|
@@ -24575,10 +24755,41 @@ export interface AnimationOptions {
|
|
|
24575
24755
|
totalTimeSeconds: number;
|
|
24576
24756
|
}
|
|
24577
24757
|
|
|
24758
|
+
/**
|
|
24759
|
+
* Options to include or exclude biomes based on biome names,
|
|
24760
|
+
* tags, or namespaces. If no include options are added it will
|
|
24761
|
+
* select all biomes that are not rejected by the exclude
|
|
24762
|
+
* options. If at least one include option is added the biome
|
|
24763
|
+
* must match one of the include options to not be rejected.
|
|
24764
|
+
*/
|
|
24578
24765
|
export interface BiomeFilter {
|
|
24766
|
+
/**
|
|
24767
|
+
* @remarks
|
|
24768
|
+
* Array of biome names that the filter should reject if any
|
|
24769
|
+
* matches.
|
|
24770
|
+
*
|
|
24771
|
+
*/
|
|
24579
24772
|
excludeBiomes?: string[];
|
|
24773
|
+
/**
|
|
24774
|
+
* @remarks
|
|
24775
|
+
* Array of biome tags that the filter should reject if any
|
|
24776
|
+
* matches.
|
|
24777
|
+
*
|
|
24778
|
+
*/
|
|
24580
24779
|
excludeTags?: string[];
|
|
24780
|
+
/**
|
|
24781
|
+
* @remarks
|
|
24782
|
+
* Array of biome names that the filter should select if at
|
|
24783
|
+
* least one matches.
|
|
24784
|
+
*
|
|
24785
|
+
*/
|
|
24581
24786
|
includeBiomes?: string[];
|
|
24787
|
+
/**
|
|
24788
|
+
* @remarks
|
|
24789
|
+
* Array of biome tags that the filter should select if at
|
|
24790
|
+
* least one matches.
|
|
24791
|
+
*
|
|
24792
|
+
*/
|
|
24582
24793
|
includeTags?: string[];
|
|
24583
24794
|
}
|
|
24584
24795
|
|
|
@@ -24686,6 +24897,14 @@ export interface BlockCustomComponent {
|
|
|
24686
24897
|
*
|
|
24687
24898
|
*/
|
|
24688
24899
|
onEntityFallOn?: (arg0: BlockComponentEntityFallOnEvent, arg1: CustomComponentParameters) => void;
|
|
24900
|
+
/**
|
|
24901
|
+
* @rc
|
|
24902
|
+
*/
|
|
24903
|
+
onNamedTick?: (arg0: BlockComponentNamedTickEvent, arg1: CustomComponentParameters) => void;
|
|
24904
|
+
/**
|
|
24905
|
+
* @rc
|
|
24906
|
+
*/
|
|
24907
|
+
onNeighborChanged?: (arg0: BlockComponentNeighborChangedAfterEvent, arg1: CustomComponentParameters) => void;
|
|
24689
24908
|
/**
|
|
24690
24909
|
* @remarks
|
|
24691
24910
|
* This function will be called when the block that this custom
|
|
@@ -26575,6 +26794,35 @@ export interface MusicOptions {
|
|
|
26575
26794
|
volume?: number;
|
|
26576
26795
|
}
|
|
26577
26796
|
|
|
26797
|
+
/**
|
|
26798
|
+
* @rc
|
|
26799
|
+
* Contains information regarding a block change in one
|
|
26800
|
+
* neighboring direction.
|
|
26801
|
+
*/
|
|
26802
|
+
export interface NeighborChange {
|
|
26803
|
+
/**
|
|
26804
|
+
* @remarks
|
|
26805
|
+
* The permutation of the neighboring block after its last
|
|
26806
|
+
* change during the tick.
|
|
26807
|
+
*
|
|
26808
|
+
*/
|
|
26809
|
+
blockPermutation: BlockPermutation;
|
|
26810
|
+
/**
|
|
26811
|
+
* @remarks
|
|
26812
|
+
* Direction from the block receiving the event to the
|
|
26813
|
+
* neighboring block that changed.
|
|
26814
|
+
*
|
|
26815
|
+
*/
|
|
26816
|
+
direction: Direction;
|
|
26817
|
+
/**
|
|
26818
|
+
* @remarks
|
|
26819
|
+
* The permutation of the neighboring block before its first
|
|
26820
|
+
* change during the tick.
|
|
26821
|
+
*
|
|
26822
|
+
*/
|
|
26823
|
+
previousPermutation: BlockPermutation;
|
|
26824
|
+
}
|
|
26825
|
+
|
|
26578
26826
|
/**
|
|
26579
26827
|
* Not equal to operator.
|
|
26580
26828
|
*/
|
|
@@ -27151,6 +27399,14 @@ export interface RotationKeyFrame {
|
|
|
27151
27399
|
timeSeconds: number;
|
|
27152
27400
|
}
|
|
27153
27401
|
|
|
27402
|
+
/**
|
|
27403
|
+
* @rc
|
|
27404
|
+
*/
|
|
27405
|
+
export interface ScheduledNamedTick {
|
|
27406
|
+
eventName: string;
|
|
27407
|
+
tickDelay: number;
|
|
27408
|
+
}
|
|
27409
|
+
|
|
27154
27410
|
/**
|
|
27155
27411
|
* Contains additional options for how a scoreboard should be
|
|
27156
27412
|
* displayed within its display slot.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.12.0-rc.1.26.70-preview.
|
|
3
|
+
"version": "2.12.0-rc.1.26.70-preview.23",
|
|
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.70-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.70-preview.23"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|