Broom Items

From wiki
Revision as of 03:58, 12 July 2017 by DeamonHunter (Talk | contribs) (Initial commit.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Items are fairly broad in their types. Each type has it's own properties and uses.

This page is for items that will act as if they were a shovel.

Brooms are all items that have the following line;

"kind": "staxel.item.Broom",

Brooms, currently, do have any extra components when compared to Craft Items, but requires those extra components to be set when it is spawned. This will also activate the item to work exactly like a Broom. This item reacts to items on the ground, no matter what type they are.


Creating a Broom Item

Brooms are created in the exact same way as Craft Items. In fact you should follow the guide, Craft Items#Creating a Craft Item, just replace the "kind" property with "staxel.item.Broom".


Spawning in a Shovel Item

Follow the guide at Craft Items#Spawning in a Craft Item. When that guide mentions "kind", make sure to use "staxel.item.Broom" instead of "staxel.item.CraftItem" else you won't be able to spawn the item.

You can also add the following to the file in order to adjust the broom;

"sweepRadius": 1.5,
"usageDistance": 3.0,
"pushVelocity": 7.0,

Each property is self evident. Sweep radius affects how far items can be from the point you aim at. Usage distance affects how far you can aim. Push velocity affects how fast the items are thrown.

Config Options

The list of basic properties is included at Craft Items#Config Options.

"pushVelocity"

Valid options (Float): A decimal number.

Default Value: 7.0. (Currently only available when spawning an item)


This is how fast an item will get pushed.


"sweepRadius"

Valid options (Float): A positive decimal number.

Default Value: 1.5. (Currently only available when spawning an item)


This is the radius of the sphere that the game will use to search for items. A unit of 1 is a single block.


"usageDistance"

Valid options (Float): A positive decimal number.

Default Value: 1.5. (Currently only available when spawning an item)


This is how far away you can aim before it will no longer work. A unit of 1 is a single block.