MicrosoftDocs / minecraft-creator

This is the repository for Minecraft Bedrock documentation.
Creative Commons Attribution 4.0 International
181 stars 131 forks source link

Update the documentation page to include more detail on how to correctly use minecraft:fuel (I'm coding an addon) #328

Closed AgentMonkey00 closed 4 months ago

AgentMonkey00 commented 2 years ago

I've been working with Addons for Minecraft Bedrock for some time now, and I'm still learning. However, I have been stuck for hours just trying to make an addon that makes items burn in furnaces to smelt other items. However, despite how many times I try, I always seem to screw something up. There is no clear online tutorial or section on the Creator Documentation site that SHOWS people how to use minecraft:fuel, not just states it. All there is for me to work from is this:

"minecraft:fuel":{
    "duration": 3.0
}

I understand the duration part, but I don't know where to add it into my Behaviour pack (I've tried the 'items' folder) So far, I've added code this to a file that I would like to make a Nether Brick a fuel item to burn in furnaces.


{

  "format_version": "1.16.0",
  "minecraft:item": {
    "description": {
      "identifier": "minecraft:nether_brick"
    },
    "components": {"minecraft:fuel":{
    "duration": 3.0
    }
}

I still can't figure out why this doesn't work. I have the file saved in this directory: (My Behaviour Pack)/items/nether_brick.json To solve this, please could this section be updated on the creator documentation site so that the process of making an item into a fuel is properly explained. (If someone could either just help me out, that would be muchly appreciated!)

Thanks for taking the time to read this, I'm probably just really dumb and missed out on something, but it's worth asking for.

Sorry if I just coded something wrong! Edit: This is the addon I've created so far: https://github.com/MicrosoftDocs/minecraft-creator/files/8599691/Craftables.%2B.Smeltables.zip

This is the page in need of an update (Just a suggestion) https://docs.microsoft.com/en-us/minecraft/creator/reference/content/itemreference/examples/itemcomponents/minecraft_fuel

d4rkOfficial commented 2 years ago

Hello,

It must your incorrect item id that generate an error.

The correct code should be:

{

  "format_version": "1.16.0",
  "minecraft:item": {
      "description": {
          "identifier": "minecraft:netherbrick"
   },
   "components": {
       "minecraft:fuel":{
           "duration": 3.0
    }
}

In Minecraft:BedrockEdition, the ID of nether brick is netherbrick instead of nether_brick, actually in JavaEdition nether_brick is right.

Now that we know what to blame, your code format is not the fault.

Delete the UNDERLINE.

AgentMonkey00 commented 2 years ago

Hi, thank you for your response. I should of double checked the item ID's before creating this!

However, I think I have still made some sort of error as well. Whenever I am in Minecraft, testing my pack, I try to put the Nether Bricks into the furnace however when I click it won't let me use it as a fuel - It just does nothing.

I have all of my experimental features enabled and I can put it in the top half of the furnace but I can't put it in the bottom to smelt items.

Maybe I need some 'tags' next to minecraft:fuel to show it can be used in a furnace, smoker and blast furnace?

I still can't seem to track down the root cause of my issue. Thanks for your help again, I am still new to the world of MC Addons and I'm still learning!

AgentMonkey00 commented 2 years ago

I've carried on trying but I still can't figure this out: It still does not work..... Any suggestions?

ghost commented 4 months ago

Hello!

It looks like we've made some progress on this. Since it's been a while, I'm going to close this issue, but if you have any additional feedback, please reach out to us!

Thanks!