Download Structure Item Mod — Minecraft Mods — MetaMods
Structure Item Mod

Structure Item Mod

Active

Downloads

0

Last update

10 months ago

Versions

1.16.5 — 1.21.4
Client and server
Fabric
Utils

Structure Item Mod

Mod Creation Tool

This mod provides a powerful tool for modpack developers, allowing players to place custom structures in the Minecraft world at their discretion.

How It Works

The mod adds a special item that, when used, places pre-prepared structures. All placement parameters are configured through NBT tags, ensuring flexibility in setup.

Usage Examples

Basic configuration example for version 1.20 and below:

structure_item:item{offset:{X:0,Y:5,Z:0},structure:"structure:mine",allowedOn:"minecraft:stone",blacklist:["minecraft:bedrock"],replaceEntities:0,placeEntities:0,rotate:"north"}

For version 1.21 and above:

structure_item:item[minecraft:custom_data={offset:{X:0,Y:5,Z:0},structure:"structure:mine",allowedOn:"minecraft:stone",blacklist:["minecraft:bedrock"],replaceEntities:0,placeEntities:0,rotate:"north"}]

In this example, the structure will be placed on stone blocks, excluding bedrock, raised 5 blocks relative to the click point, and oriented to the north.

Parameter Configuration

Required Parameters:

  • structure - structure identifier (required parameter)

Additional Parameters:

  • offset - structure offset relative to click point (default - automatic placement)
  • allowedOn - allowed blocks for placement (default - any blocks)
  • blacklist - prohibited blocks for replacement (default - replacement of any blocks allowed)
  • replaceEntities - permission to replace existing entities (0 - prohibited, 1 - allowed)
  • placeEntities - placement of entities from structure (0 - prohibited, 1 - allowed)
  • rotate - structure orientation (default - no rotation)

Advanced Positioning with offsetV2

For more complex positioning, use offsetV2 with support for mathematical expressions:

offsetV2:{x:"~",y:"~-sizeY/2",z:"~"}

This example places the structure in front of the block with vertical centering.

Supported Operations

Arithmetic operations: addition, subtraction, multiplication, division, exponentiation, unary operators, modulo.

Mathematical functions: abs, acos, asin, atan, cbrt, ceil, cos, cosh, exp, floor, log, log10, log2, sin, sinh, sqrt, tan, tanh, signum.

Special functions: dirSelect(dir, down, up, north, south, west, east) - value selection depending on block side.

Available Variables

  • Mathematical constants: pi, e, φ
  • dir - block side
  • sizeX, sizeY, sizeZ - structure dimensions

Error Handling

Configuration errors are displayed in chat, while usage errors appear as large text in the center of the screen.

Customization

You can change the item appearance (default - stick) and localization through language files.

Project members
QuImUfu

QuImUfu

Developer

Created: 1 Apr 2021

ID: 15105