@serenityjs/protocol 0.1.0-beta.9 → 0.1.0
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/dist/index.d.ts +78 -17
- package/dist/index.js +643 -566
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -773,7 +773,7 @@ declare enum RespawnState {
|
|
|
773
773
|
ClientReadyToSpawn = 2
|
|
774
774
|
}
|
|
775
775
|
|
|
776
|
-
declare enum
|
|
776
|
+
declare enum ModalFormType {
|
|
777
777
|
Action = "form",
|
|
778
778
|
Message = "modal",
|
|
779
779
|
Modal = "custom_form"
|
|
@@ -1990,9 +1990,23 @@ declare class VariableStringArray extends DataType {
|
|
|
1990
1990
|
static write(stream: BinaryStream, value: Array<string>): void;
|
|
1991
1991
|
}
|
|
1992
1992
|
|
|
1993
|
+
/**
|
|
1994
|
+
* Represents a enum for the available command packet.
|
|
1995
|
+
*/
|
|
1993
1996
|
declare class Enums extends DataType {
|
|
1994
|
-
|
|
1995
|
-
|
|
1997
|
+
/**
|
|
1998
|
+
* The name of the enum.
|
|
1999
|
+
*/
|
|
2000
|
+
readonly name: string;
|
|
2001
|
+
/**
|
|
2002
|
+
* The indexed values of the enum.
|
|
2003
|
+
*/
|
|
2004
|
+
readonly values: Array<number>;
|
|
2005
|
+
/**
|
|
2006
|
+
* Creates a new enum.
|
|
2007
|
+
* @param name The name of the enum.
|
|
2008
|
+
* @param values The indexed values of the enum.
|
|
2009
|
+
*/
|
|
1996
2010
|
constructor(name: string, values: Array<number>);
|
|
1997
2011
|
static read(stream: BinaryStream, endian: Endianness, enumValues: Array<string>): Array<Enums>;
|
|
1998
2012
|
static write(stream: BinaryStream, value: Array<Enums>, endian: Endianness, enumValues: Array<string>): void;
|
|
@@ -2015,20 +2029,43 @@ interface CommandsOverload {
|
|
|
2015
2029
|
parameters: Array<OverloadParameter>;
|
|
2016
2030
|
}
|
|
2017
2031
|
interface OverloadParameter {
|
|
2018
|
-
|
|
2032
|
+
symbol: number;
|
|
2019
2033
|
name: string;
|
|
2020
2034
|
optional: boolean;
|
|
2021
2035
|
options: number;
|
|
2022
|
-
valueType: number;
|
|
2023
2036
|
}
|
|
2037
|
+
/**
|
|
2038
|
+
* Represents the commands of a available command packet.
|
|
2039
|
+
*/
|
|
2024
2040
|
declare class Commands extends DataType {
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2041
|
+
/**
|
|
2042
|
+
* The name of the command.
|
|
2043
|
+
*/
|
|
2044
|
+
readonly name: string;
|
|
2045
|
+
/**
|
|
2046
|
+
* The description of the command.
|
|
2047
|
+
*/
|
|
2048
|
+
readonly description: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* The flags of the command. Setting this value to 1 will make the command blue.
|
|
2051
|
+
*/
|
|
2052
|
+
readonly flags: number;
|
|
2053
|
+
/**
|
|
2054
|
+
* The permission level of the command.
|
|
2055
|
+
*/
|
|
2056
|
+
readonly permissionLevel: number;
|
|
2057
|
+
/**
|
|
2058
|
+
* The alias of the command.
|
|
2059
|
+
*/
|
|
2060
|
+
readonly alias: number;
|
|
2061
|
+
/**
|
|
2062
|
+
* The subcommands of the command.
|
|
2063
|
+
*/
|
|
2064
|
+
readonly subcommands: Array<number>;
|
|
2065
|
+
/**
|
|
2066
|
+
* The overloads of the command.
|
|
2067
|
+
*/
|
|
2068
|
+
readonly overloads: Array<CommandsOverload>;
|
|
2032
2069
|
constructor(name: string, description: string, flags: number, permissionLevel: number, alias: number, subcommands: Array<number>, overloads: Array<CommandsOverload>);
|
|
2033
2070
|
static read(stream: BinaryStream): Array<Commands>;
|
|
2034
2071
|
static write(stream: BinaryStream, value: Array<Commands>): void;
|
|
@@ -2421,6 +2458,30 @@ declare class InventoryTransaction extends DataType {
|
|
|
2421
2458
|
static write(stream: BinaryStream, value: InventoryTransaction): void;
|
|
2422
2459
|
}
|
|
2423
2460
|
|
|
2461
|
+
/**
|
|
2462
|
+
* Represents the enum values of a available command packet.
|
|
2463
|
+
*/
|
|
2464
|
+
declare class EnumValues extends DataType {
|
|
2465
|
+
static read(stream: BinaryStream): Array<string>;
|
|
2466
|
+
static write(stream: BinaryStream, enumValues: Array<string>): void;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* Represents the chained subcommand values of a available command packet.
|
|
2471
|
+
*/
|
|
2472
|
+
declare class ChainedSubcommandValues extends DataType {
|
|
2473
|
+
static read(stream: BinaryStream): Array<string>;
|
|
2474
|
+
static write(stream: BinaryStream, chainedSubcommandValues: Array<string>): void;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
* Represents the post fixes of a available command packet.
|
|
2479
|
+
*/
|
|
2480
|
+
declare class PostFixes extends DataType {
|
|
2481
|
+
static read(stream: BinaryStream): Array<string>;
|
|
2482
|
+
static write(stream: BinaryStream, postFixes: Array<string>): void;
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2424
2485
|
/**
|
|
2425
2486
|
* Represents a Minecraft Bedrock Edition data packet
|
|
2426
2487
|
*/
|
|
@@ -2488,8 +2549,8 @@ declare class AnimatePacket extends DataPacket {
|
|
|
2488
2549
|
|
|
2489
2550
|
declare class AvailableCommandsPacket extends DataPacket {
|
|
2490
2551
|
enumValues: Array<string>;
|
|
2491
|
-
|
|
2492
|
-
|
|
2552
|
+
chainedSubcommandValues: Array<string>;
|
|
2553
|
+
postFixes: Array<string>;
|
|
2493
2554
|
enums: Array<Enums>;
|
|
2494
2555
|
subcommands: Array<Subcommands>;
|
|
2495
2556
|
commands: Array<Commands>;
|
|
@@ -2526,8 +2587,8 @@ declare class CommandOutputPacket extends DataPacket {
|
|
|
2526
2587
|
}
|
|
2527
2588
|
|
|
2528
2589
|
declare class CommandRequestPacket extends DataPacket {
|
|
2529
|
-
|
|
2530
|
-
|
|
2590
|
+
command: string;
|
|
2591
|
+
origin: CommandOriginData;
|
|
2531
2592
|
isInternal: boolean;
|
|
2532
2593
|
version: number;
|
|
2533
2594
|
}
|
|
@@ -3034,4 +3095,4 @@ declare const PROTOCOL_VERSION = 662;
|
|
|
3034
3095
|
declare const MINECRAFT_VERSION = "1.20.71";
|
|
3035
3096
|
declare const MINECRAFT_TICK_SPEED = 50;
|
|
3036
3097
|
|
|
3037
|
-
export { AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateId, AnimatePacket, Attribute, AvailableCommandsPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockCoordinates, BlockFace, BlockPickRequestPacket, BlockProperties, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, ComplexInventoryTransaction, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerId, ContainerName, ContainerOpenPacket, ContainerType, CreativeContentPacket, CreativeItems, DataPacket, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DynamicEnums, EntityAttributes, EntityProperties, EnumConstraints, Enums, Experiments,
|
|
3098
|
+
export { AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateId, AnimatePacket, Attribute, AvailableCommandsPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockCoordinates, BlockFace, BlockPickRequestPacket, BlockProperties, ChainedSubcommandValues, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, ComplexInventoryTransaction, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerId, ContainerName, ContainerOpenPacket, ContainerType, CreativeContentPacket, CreativeItems, DataPacket, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DynamicEnums, EntityAttributes, EntityProperties, EnumConstraints, EnumValues, Enums, Experiments, Framer, GameRuleType, GameRules, Gamemode, InteractActions, InteractPacket, InteractPosition, InventoryAction, InventoryContentPacket, InventorySlotPacket, InventorySource, InventorySourceType, InventoryTransaction, InventoryTransactionPacket, ItemComponentPacket, ItemData, ItemInstanceUserData, ItemReleaseInventoryTransaction, ItemReleaseInventoryTransactionType, type ItemStackAction, ItemStackActionType, type ItemStackContainer, ItemStackRequestPacket, ItemStackRequests, ItemStackResponsePacket, ItemStackResponses, ItemStackStatus, ItemStacks, ItemUseInventoryTransaction, ItemUseInventoryTransactionType, ItemUseOnEntityInventoryTransaction, ItemUseOnEntityInventoryTransactionType, LegacyTransaction, LevelChunkPacket, LevelEvent, LevelEventPacket, LevelSoundEvent, LevelSoundEventPacket, Links, LoginPacket, LoginTokens, MINECRAFT_TICK_SPEED, MINECRAFT_VERSION, MetadataDictionary, MetadataFlags, MetadataKey, MetadataType, MobEquipmentPacket, ModalFormCanceled, ModalFormCanceledReason, ModalFormData, ModalFormRequestPacket, ModalFormResponsePacket, ModalFormType, MoveActorAbsolutePacket, MoveMode, MovePlayerPacket, NetworkChunkPublisherUpdatePacket, NetworkItemInstanceDescriptor, NetworkItemStackDescriptor, NetworkSettingsPacket, PROTOCOL_VERSION, PackLinks, PackType, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAttributes, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListPacket, PostFixes, RecordAction, Records, RemoveEntityPacket, RequestChunkRadiusPacket, RequestNetworkSettingsPacket, ResourceIdVersions, ResourcePackChunkDataPacket, ResourcePackChunkRequestPacket, ResourcePackClientResponsePacket, ResourcePackDataInfoPacket, ResourcePackIds, ResourcePackResponse, ResourcePackStackPacket, ResourcePacksInfoPacket, RespawnPacket, RespawnState, Rotation, ScriptMessagePacket, SetActorMotionPacket, SetCommandsEnabledPacket, SetEntityDataPacket, SetLocalPlayerAsInitializedPacket, SetPlayerGameTypePacket, SetTitlePacket, StackRequestSlotInfo, StartGamePacket, Subcommands, TeleportCause, TextPacket, TextPacketType, TextParameters, TextSource, TexturePackInfo, TitleTypes, ToastRequestPacket, TransactionSourceType, UpdateAbilitiesPacket, UpdateAdventureSettingsPacket, UpdateAttributesPacket, UpdateBlockFlagsType, UpdateBlockLayerType, UpdateBlockPacket, VariableStringArray as VarStringArray, VarintArray, Vector2f, Vector3f, ViolationSeverity, ViolationType, getPacketId };
|