#How to change item on explosion

8 messages · Page 1 of 1 (latest)

brazen oriole
#

I want to change one item (coal) into another (diamond) on an explosion, is there any way to do this in kubejs?

rigid mossBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

stray badger
#

Easier with this

old zealot
#
// KubeJS + Lychee

ServerEvents.recipes((event) => {

  // Add the recipe
  event.custom({
    // We want this to trigger when an item entity is exploded
    type:"lychee:item_exploding",
    // The recipe will cost 3 coal, will repeat for every multiple of 3. So if a stack of 9 coal is exploded, it should yield 3 outputs.
    // Lychee specifically supports ingredients with count, don't expect every mod to.
    item_in: {count:3, item:"minecraft:coal"},
    // We want an item to be dropped, so as our post effect, we drop a diamond. With 9 coal exploaded, that should yield 3 diamonds
    post:{
      type:"drop_item",
      id:"minecraft:diamond"
    }
  })

}

ServerEvents.tags("item", (event) => {
  // Tag the coal item so that it can be shown in JEI/REI properly as an explodable ingredient.
  event.add("lychee:item_exploding_catalysts","minecraft:coal")
}
stray badger
#

obviously its not functional and just to add information so you can add anything there but it would be very strange to me to add all the ingredients there