Skip to content

Demon Trade (EssentialCraft 4)

Description

Adds an item that can be sold to Demons to obtain Ackronite. Note that each demon that spawns has a random item that it can accept, and will not accept any other item.

Danger

Demon Trade recipes must set the correct NBT on all input items. This is a bug that was fixed in the version 1.12.2-4.9.112.6 of the mod.

Identifier

Refer to this via any of the following:

groovy
mods.ec4.demon_trade
mods.ec4.demontrade
mods.ec4.demonTrade
mods.ec4.DemonTrade
mods.essentialcraft.demon_trade/* Used as page default */
mods.essentialcraft.demontrade
mods.essentialcraft.demonTrade
mods.essentialcraft.DemonTrade

Adding Entries

  • Adds an item or an entity that can be sold to demons:

    groovy
    mods.essentialcraft.demon_trade.add(EntityEntry)
  • Adds an item or an entity that can be sold to demons:

    groovy
    mods.essentialcraft.demon_trade.add(IIngredient)
Example
groovy
mods.essentialcraft.demon_trade.add(entity('minecraft:chicken'))
mods.essentialcraft.demon_trade.add(item('minecraft:diamond'))

Removing Entries

  • Removes an entity from the pool of sold items:

    groovy
    mods.essentialcraft.demon_trade.remove(EntityEntry)
  • Removes an item from the pool of sold items:

    groovy
    mods.essentialcraft.demon_trade.remove(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.essentialcraft.demon_trade.removeAll()
Example
groovy
mods.essentialcraft.demon_trade.remove(entity('minecraft:enderman'))
mods.essentialcraft.demon_trade.remove(item('minecraft:nether_star'))
mods.essentialcraft.demon_trade.removeAll()

Getting the value of entries

  • Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

    groovy
    mods.essentialcraft.demon_trade.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.