Skip to content

Lightning_Bolt_Glass

Legopitstop edited this page Nov 30, 2023 · 4 revisions

This page describes the new version of fulgurites (v1.1.0+)! For older formats (v1.0.0) see Lightning Bolt Glass Legacy

Fulgurites

Fulgurites are natural glass tubes or crusts that are formed when lightning strikes the ground. The word fulgurite comes from the Latin word fulgur, which means lightning. The shape of a fulgurite mimics the path of the lightning bolt as it disperses into the ground.

Built-in Fulgurites

Lightning bolt glass comes with 2 fulgurites. One for converting Sand -> Glass and another for converting Red Sand -> Orange Stained Glass. You can find the code here

Custom Fulgurites

Lightning Bolt Glass supports data-driven Fulgurites letting you create your own!

  1. Create a folder in the /data/namespace path in your datapack called fulgurites. This is where you will be placing all your JSON files.
  2. Create a JSON file. This can be called anything as long as it ends with '.json'
  3. Using the JSON schema below create your own fulgurite.
  4. How run /reload in-game for the changes to apply. You can use /summon lightning_bolt ~ ~ ~ to test if it works.

Fulgurite Schema

Name Type Description
type Types Type of fulgurite to generate.
predicate Block Predicate The block to test for.
block Block The block to place

Fulgurite Types

"minecraft:root_system"

If predicate passes create a root system using block with placement_attempts, column_max_height, and radius.

Additional Properties

Name Type Default Description
placement_attempts Integer 20 The number of times to attempt to place this block.
column_max_height Integer 100 The max height of the root system.
radius Integer 3 The radius of the root system.

"minecraft:replace_single_block"

If predicate passes replace a single block where the lightning hit with block. This is the legacy behavior for fulgurites.

Block Predicate

Name Type Description
tag String A block tag to match.
blocks List A list of block ID's to match.
state Object A map of each Property-Value that must match
nbt String NBT data to match.

Block

Name Type Description
Name String ID of the block.
Properties Object A map of all Property-Value to set.

Examples

When lightning hits any log type it will create a root system of coal blocks replacing any log type.

{
  "type": "minecraft:root_system",
  "placement_attempts": 20,
  "radius": 3,
  "column_max_height": 50,
  "predicate": { "tag": "minecraft:logs" },
  "block": { "Name": "minecraft:coal_block" }
}

When lightning hits Orange Concrete Powder it will replace it with Orange Stained Glass.

{
  "type": "minecraft:replace_single_block",
  "predicate": {
      "blocks": ["minecraft:orange_concrete_powder"]
  },
  "block": {
    "Name": "minecraft:orange_stained_glass"
  }
}