Items and Tools¶
Items, tools, and weapons are represented mostly by ItemData. A legacy/simple ToolData path also exists.
Main Scripts¶
Assets/PixitGames/BlockWorld/Scripts/ItemData.cs
Assets/PixitGames/BlockWorld/Scripts/ToolData.cs
Assets/PixitGames/BlockWorld/Scripts/HeldItemRenderer.cs
Assets/PixitGames/BlockWorld/Scripts/ItemPickup.cs
Assets/PixitGames/BlockWorld/Scripts/ToolPickUp.cs
Item Types¶
ItemData.itemType can be:
- Material
- Tool
- Weapon
- Armor
- Consumable
- Misc
Tool Fields¶
When an item is a tool, configure:
| Field | Purpose |
|---|---|
| Tool Type | Pickaxe, Axe, Shovel, or None |
| Break Multiplier | Item-side tool value for future tuning |
| In Hand Prefab | Visual prefab shown in the player's hand |
Tool Matching¶
Block breaking supports both:
ToolDataItemDatawhereitemTypeis Tool
This means generated tools such as wood axe, wood shovel, and wood pickaxe can affect block breaking speed when their toolType matches the block's Effective Tool Type.
Held Item Rendering¶
HeldItemRenderer displays the selected hotbar block, tool, or item in the player's hand. It also disables physics on the held instance so it does not collide with the world.
Creating Items¶
Use:
Tools > Pixit Games > Block World > Item Creator
Generated items are placed under:
Assets/PixitGames/BlockWorld/GeneratedItems