Skip to content

Latest commit

 

History

History
133 lines (84 loc) · 2.97 KB

WoodcutTreeComponent.md

File metadata and controls

133 lines (84 loc) · 2.97 KB

Class: WoodcutTreeComponent

Types

<ComponentProps>

See <ComponentProps>


<WoodcutTreeComponentProps>

A portion of the configuration object to pass to the WoodcutTreeComponent constructor.

type WoodcutTreeComponentPropsV3 = {
  presetHash?: 0 | PresetHash | undefined;
  speciesHash?: SpeciesHash | undefined;
};

type WoodcutTreeComponentProps = WoodcutTreeComponentPropsV3;

Since v3

  • presetHash (optional, default 0) <number>
  • speciesHash (optional, default 11232) <SpeciesHash>

Constructors

new WoodcutTreeComponent(props)

Creates a versioned WoodcutTree component.

import { WoodcutTreeComponent } from 'att-string-transcoder';

const componentVersion = 3;
const component = new WoodcutTreeComponent({ version: componentVersion });

WoodcutTreeComponent.fromBinary(reader, version)

See Component.fromBinary(reader, version)

Properties

Note that the following properties are sorted in order of appearance when decoding component binary data.

hash

See Component.hash


name

See Component.name


version

See Component.version


presetHash

  • Since: v3
  • <number>
import { WoodcutTreeComponent } from 'att-string-transcoder';

const componentVersion = 3;
const component = new WoodcutTreeComponent({ version: componentVersion });

const presetHash = component.presetHash;
// `presetHash` is `0`

speciesHash

The hash of the species of the tree prefab this component is attached to.

import { WoodcutTreeComponent } from 'att-string-transcoder';

const componentVersion = 3;
const component = new WoodcutTreeComponent({ version: componentVersion });

const speciesHash = component.speciesHash;
// `speciesHash` is `11232`

Methods

toBinary(version?)

See Component.toBinary(version?)


write(writer, version?)

See Component.write(writer, version?)