Fandom

Minecraft Mod Custom Stuff Wiki

Destroyed

175pages on
this wiki
Add New Page
Comments0 Share

The destroyed event is an event that can only be used for custom blocks. The destroyed event will activate when the block that contains the event is destroyed. The destroyed event can use world functions, customstuff functions, and the origin variable. An example of how to use the destroyed event can be found below.

destroyed="world.spawnMob(origin, 'Creeper');";

The above example will cause a creeper to spawn when the block with this event is destroyed.

Methods that do not trigger the destroyed event:

  • Removing a block with world.setBlockId(origin, 0); or world.setBlockIdAndMetadata(origin, 0, 0);
  • Destroying a block with world.harvestBlock(origin);
  • Harvesting a block using a piston when collision=false;

Example Uses

  • unstable blocks that can only be picked up by tools using world.harvestBlock(origin); in their script.
  • blocks that expand on destruction.(fire extinquishing block?)
  • explosion alarm blocks (currently cannot output redstone signal or sound though)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.