Jump to content

[1.20.4] events when player start a new word or respawn after being killed, recipes in the recipe book, add items to villager


Recommended Posts

good days 

i have some small questions and i prefer to make only one post 


i wanna give the player a briefcase after creating a new world and enter for first time to it    i guest that's an event for that, what it is this event? 

and the same but when players get killed (if possible only if killed by mobs)  is an event that triggers after the player respawn ??


2024-02-29-16-30-05-2.png

 

the recipe book

the book don't shows custom item recipes until player craft them at least one time 

¿ is posible to set some of mi items recipes to be visible in the book even if never crafted before ? 

 

2024-02-29-20-25-38.png

 

Villager trades 

i wanna add some things to some villager trades in this case mi custom bow and arrow 

how i do that ?

 

2024-02-29-20-59-18.png

 

 

thanks foir your time

Link to comment
Share on other sites

  • 4 weeks later...

If you look at the Minecraft wiki, you can see that there already exists one block that unlocks without needing any other blocks, which is the crafting table.
https://minecraft.fandom.com/wiki/Recipe_book#Unlocking

So if you find the file:

\data\minecraft\advancements\recipes\decorations\crafting_table.json

You can see that it uses a "unlock_right_away" criteria to do the job.

{
  "parent": "minecraft:recipes/root",
  "criteria": {
    "has_the_recipe": {
      "conditions": {
        "recipe": "minecraft:crafting_table"
      },
      "trigger": "minecraft:recipe_unlocked"
    },
    "unlock_right_away": {
      "trigger": "minecraft:tick"
    }
  },
  "requirements": [
    [
      "has_the_recipe",
      "unlock_right_away"
    ]
  ],
  "rewards": {
    "recipes": [
      "minecraft:crafting_table"
    ]
  },
  "sends_telemetry_event": false
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.