API reference / @jsprismarine/protocol / CameraAimAssistCategoryDefinition
Class: CameraAimAssistCategoryDefinition
Defined in: protocol/src/structure/CameraAimAssistCategoryDefinition.ts:17
A CameraAimAssistCategoryDefinition: a named set of targeting priorities that a CameraAimAssistPresetDefinition refers to by name, as CameraAimAssistPresetsPacket lists them.
Protocol 2193 wire order: 0. name: string, the CameraAimAssistCategory Identifier presets look the category up by.
priorities: a CameraAimAssistCategoryPriorities. https://mojang.github.io/bedrock-protocol-docs/1.26.51/types/camera-aim-assist-category-definition/
Extends
Constructors
Constructor
new CameraAimAssistCategoryDefinition(
name?,priorities?):CameraAimAssistCategoryDefinition
Defined in: protocol/src/structure/CameraAimAssistCategoryDefinition.ts:24
Creates a category. Both parameters have a default so the static deserialize can construct an empty instance before reading the stream.
Parameters
name?
string = ''
name, the identifier presets refer to.
priorities?
CameraAimAssistCategoryPriorities = ...
priorities, the block and entity priorities of the category.
Returns
CameraAimAssistCategoryDefinition
Overrides
Properties
name
name:
string=''
Defined in: protocol/src/structure/CameraAimAssistCategoryDefinition.ts:25
name, the identifier presets refer to.
priorities
priorities:
CameraAimAssistCategoryPriorities
Defined in: protocol/src/structure/CameraAimAssistCategoryDefinition.ts:26
priorities, the block and entity priorities of the category.
Methods
deserialize()
deserialize(
stream):void
Defined in: protocol/src/structure/CameraAimAssistCategoryDefinition.ts:38
Reads the name, then the priorities.
Parameters
stream
Returns
void
Overrides
serialize()
serialize(
stream):void
Defined in: protocol/src/structure/CameraAimAssistCategoryDefinition.ts:32
Writes the name, then the priorities.
Parameters
stream
Returns
void
Overrides
deserialize()
staticdeserialize<T>(this,stream):T
Defined in: protocol/src/NetworkStructure.ts:28
Deserializes the network structure from a binary stream. The constructor runs with no arguments before the stream is read, so the class must tolerate that.
Type Parameters
T
T extends NetworkStructure
Parameters
this
Constructor<T>
stream
The binary stream to deserialize from.
Returns
T
An instance of the class T.