Skip to content

Instantly share code, notes, and snippets.

@bl4ckscor3
Last active September 20, 2024 15:59
Show Gist options
  • Select an option

  • Save bl4ckscor3/074fc98a3206a01c8ff239923174543d to your computer and use it in GitHub Desktop.

Select an option

Save bl4ckscor3/074fc98a3206a01c8ff239923174543d to your computer and use it in GitHub Desktop.
Example XP Tome recipe with max XP of 10000, retrieve until next level, and a retrieval percentage of 43%
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"B": {
"item": "minecraft:book"
},
"E": {
"tag": "c:ender_pearls"
}
},
"pattern": [
" E ",
"EBE",
" E "
],
"result": {
"components": {
"xpbook:max_xp": 10000,
"xpbook:retrieval_percentage": 0.43,
"xpbook:retrieve_until_next_level": {}
},
"count": 1,
"id": "xpbook:xp_tome"
}
}
max_xp = 10000
retrieval_percentage = 0.43
retrieve_until_next_level = true
retrieve_xp_orbs = false
store_until_previous_level = false
@pwaksman973

Copy link
Copy Markdown

I just can't get this to work in 1.21.1
any chance to get a new sample?

@pwaksman973

pwaksman973 commented Sep 20, 2024

Copy link
Copy Markdown

Gosh tooke me forever to make it work. Here is what I have for 1.21.1

{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "pattern": [
    " E ",
    "EBE",
    " E "
  ],
  "key": {
    "B": {
      "item": "minecraft:book"
    },
    "E": {
      "item": "minecraft:ender_pearl"
    }
  },
  "result": {
    "id": "xpbook:xp_tome",
    "count": 1,
	"components": {
		"xpbook:max_xp": 9999999999,
		"xpbook:retrieval_percentage": 0.99,
		"xpbook:retrieve_until_next_level": {},
		"xpbook:store_until_previous_level": {}
	}
  }
}

maybe the tag key got changed? no idea

@bl4ckscor3

Copy link
Copy Markdown
Author

The recipe I posted in the example above was generated in 1.21.1 and I tested it to make sure it works. I can assure you that it does indeed work. Perhaps some modification you made to it was faulty. One possible error is that xpbook:max_xp can be at most 2147483647. Values above that can make the recipe not load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment