Skip to the content.

(Unofficial) XML Modding API Documentation

Pages

Modifying Blocks

At the moment, blocks cannot be added with mods, but they can be modified. Below is the documentation for each file used to modify blocks. Any file or field can be omitted.

To modify the name, description, price, etc of blocks, you must use ItemData.xml with the desired Block ID as the Item ID.


BlockData.xml:

Contains general information about this block.

BlockID: Block

The ID of this block. This must be an existing block ID.

Material: BlockMaterial

The material of this block. The material affects this block’s resistance and tool efficiencies. Must be an existing block material.

ClassType: DataBlockType

Additional block type data for blocks with special functions. Must be an existing class type. Most blocks use None.

Opacity: byte

How opaque this block is. Affects how much light passes through this block.

Luminance: byte

How much light this block emits.

Friction: float

The friction of this block. The lower the friction, the more “slippery” this block is. Most blocks use 0.35.

Dampen: float

Unknown

Buffer: byte

The way this block is rendered when placed in the world.

IsIcon: bool

If true, this block’s texture is an icon. Should be used with Buffer 2 and low opacity.

IsAttached: bool

If true, this block should be attached to another block when placed. Can be used with Buffer 2.

IsPassable: bool

If true, this block will have no collision and can be walked through.

IsRotated: bool

If true, this block can be rotated.

IsOrientated: bool

If true, this block can be orientated.

IsOreDeposit: bool

If true, this block should be considered ore.

IsPowerEmitter: bool

If true, this block can emit power when active.

IsPoweredMechanism: bool

If true, this block can be activated by power.

IsVertSunlightUnhindered: bool

If true, sunlight can pass through this block vertically without being blocked.

BlastResistance: ushort

How reistant this block is to explosions.

WindAffect: byte

How much this block sways when there is wind.

TextureID: byte

The textures list this block can use.

Table of Contents


BlockMaterialData.xml:

Contains information about this block material. The block material affects the tools that can break the block. If any efficiency is set to 0, that respective tool cannot break the block.

Material: BlockMaterial

The ID of this block material. No spaces are allowed. Must be an existing block material.

Resistance: ushort

The resistance of this material. The number of hits required to break a block of this material is equal to Block Resistance / Item Power × Tool Effectiveness. Eg. Rhyolite has a resistance of 7200, and a Titanium Pickaxe has a power of 1200, meaning it will take 6 hits to destroy Rhyolite with a Titanium Pickaxe.

BaseEfficiency: ushort

The base percent efficiency of items when breaking a block of this material. The power of all tools when breaking a block with this material is affected by this value. Eg. if BaseEfficiency is 50, all tools will take twice as many hits to break a block with this material.

PickEfficiency: ushort

The percent efficiency of pickaxes when breaking a block of this material.

ShovelEfficiency: ushort

The percent efficiency of shovels when breaking a block of this material.

HatchetEfficiency: ushort

The percent efficiency of hatchets when breaking a block of this material.

WeaponEfficiency: ushort

The percent efficiency of weapons when breaking a block of this material.

XPAdjust: float

The multiplier for XP earned when this block is broken. If this is 0, the xp earned is 1x.

Flags: BlockMaterialFlags

Unused.

Table of Contents


BlockTextures16.xml/BlockTextures64.xml:

Contains the order of items in their respective texture atlas image. HD Texture Packs use BlockTextures64.xml while SD Texture Packs use BlockTextures16.xml. The texture atlas image should have every item texture laid out next to one another. Recommended up to 32 blocks on one line in the texture atlas. Once the 32nd block is reached, move down a line.

BlockID: Block

The ID of this block.

Table of Contents