1. Wiki
  2. /Blocks
  3. /minecraft:random_offset

minecraft:random_offset

Don't want to write this by hand? GodCraft sets minecraft:random_offset for you with a switch.Get GodCraft

Overview

minecraft:random_offset is a block component: it goes in the components object of a custom block. Shifts the block a little from the center, by an amount picked from its position, like flowers and grass that are not lined up perfectly. The shift also moves the outline and collision, and stays inside the block space.

Fields

FieldTypeDefaultDescription
xRange And Steps{"range":{"max":0,"min":0},"steps":0}Sideways shift along x: a min and max range plus how many steps between them.
yRange And Steps{"range":{"max":0,"min":0},"steps":0}Up and down shift: a min and max range plus how many steps between them.
zRange And Steps{"range":{"max":0,"min":0},"steps":0}Sideways shift along z: a min and max range plus how many steps between them.

Example

Inside the components object of BP/blocks/<name>.json (values are the defaults or placeholders):

BP/blocks/<name>.json
{
  "minecraft:random_offset": {
    "x": {
      "range": {
        "max": 0,
        "min": 0
      },
      "steps": 0
    },
    "y": {
      "range": {
        "max": 0,
        "min": 0
      },
      "steps": 0
    },
    "z": {
      "range": {
        "max": 0,
        "min": 0
      },
      "steps": 0
    }
  }
}

Blocks: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more