#Recipe require xp

1 messages · Page 1 of 1 (latest)

crimson dome
#

How can I make recipe that subtracts 7 xp from the player and is impossible to craft if player has less than needed

white heron
#

not with your typical recipe as recipes are used in crafters too which don't have xp.

#

you would have to do some custom crafting station or drop crafting logic

#

if you insist on using a recipe, you need to enable the gamerule limited_crafting. whenever the play has sufficient xp grant the recipe. use an advancement with recipe_crafted to run a function that deducts the xp.

none of the above prevents a player from simply using an auto crafter to craft it anyway

crimson dome
#

using recipe is not essential
I just want a way to create ore blocks without it giving you free xp

crimson dome
#

I whish negative xp would work how you expect ;-;

crisp yarrowBOT
#

-# (helpers summoned) <@&1166082198152159386> <@&1202694677766348840>

sage path
#

I don't know if this is possible. You could have a recipe give xp using an advancement, and remove xp using and advancement + function, but you can't exactly prevent crafting

#

Only way I can think of is using the gamerule for forcing recipes to be made only if you have that recipe unlocked, but that wouldn't work unless you're making a map or something

sage path
#

I... don't know if that's possible either? That's hardcoded afaik

crimson dome
#

But I think I need some other way to make it work

formal peak
#

why would you want players to craft ores in the first place ?

#

I think there might be easier solutions to your problem tbh ^^'

crimson dome
white heron
#

you could do a any_block_use with a retextured brush (or other item probably), have the advancement reward function check for xp and extra items and then perform a setblock or something similar