Skip to content

Added capability for MCFunctions to be used directly in any resource.

Compare
Choose a tag to compare
@TheMrZZ TheMrZZ released this 05 Jan 12:52
· 493 commits to master since this release
3ef446f

Added capability for MCFunctions to be used directly in any resource JSON declaration.

For example, this is now valid:

const rewardDiamonds = MCFunction('reward_diamonds', () => {
  give('@s', 'minecraft:diamond', 2)
})

Advancement('bred_two_cows', {
  criteria: {
    // Doesn't matter
  },
  rewards: {
    function: rewardDiamonds
  }
})