Skip to content

mcutils:sponge

Vanilla sponge block behavior.

Registering

Before you can use this component you need to register it.

js
import { system } from "@minecraft/server";
import { SpongeComponent } from "@lpsmods/mc-utils";

system.beforeEvents.startup.subscribe((event) => {
  event.blockComponentRegistry.registerCustomComponent(SpongeComponent.typeId, new SpongeComponent());
});

Component

Options

NameTypeDefaultDescription
blockstring
liquid_blockstringwater
air_blockstringair
sizenumber7

Examples

Sponge

json
{
  "format_version": "1.21.100",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_sponge"
    },
    "components": {
      "mcutils:sponge": {
        "block": "minecraft:wet_sponge",
        "liquid_block": "minecraft:water",
        "air_block": "minecraft:air",
        "size": 7
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft