Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-137420

Addons with custom golem entities will generate an error spam when spawned

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • 1.17.10
    • None
    • Unconfirmed
    • Windows

      I wanted to create a custom Iron Golem entity that attacks players with certain tags. But when I started the game and spawn it in, I got an error message spam my screen saying the following:

      • [Molang][error]-minigame:pocket_golemv1 | Error: unhandled request for unknown variable 'variable.attack_animation_tick'
      • [Molang][error]-minigame:pocket_golemv1 | Error: unhandled request for unknown variable 'variable.offer_flower_tick'

      Note1: "minigame:pocket_golemv1" is the identifier of the entity, and in this case "minigame" is the project's namespace for this particular addon (like how "minecraft" is the namespace for anything in vanilla minecraft)

      I have looked into it and found nothing about those variables anywhere in the behavior of the entity, neither on the render controllers, client entities, etc.

      I have recreated the entity and use the normal basic iron golem behavior as template and changed nothing, practically making a clone of the iron golem, and I still get those errors as soon as them addon golem is spawned in the world. 

      I have even downloaded an addon called "More Golems Remastered!" (link later in this report) and made a fresh world and tested it, and I still get the same message spammed.

      Idk if its an addon bug itself or a minecraft bedrock bug when handling custom entities with the iron golem behavior.

       

      HOW TO REPLICATE AND TEST IT:

      I used bridge. v1.8.1, so I would recommend using this program.

      1. Create a Project (you can give it any name and any namespace. But for the sake of this example, we will type "bug" as the namespace)
      2. In the behavior part of the addon, click on the "New file" icon and create a new entity (creeper icon), then under "Templates", simply type 'iron_golem' and it will use the basic vanilla Iron Golem behavior. (for this example, the name of this entity will be "golem")
      3. VERY IMPORTANT. To make sure your custom entity doesnt override the normal iron golem, once the program makes the new entity, click on the arrow next to "minecraft:entity" to break down into its code. Do the same where is says "description" and you will see "identifier : minecraft:iron_golem". In order for this to work, you need to change the identifier, so click on the arrow one more time and rename "minecraft:iron_golem" to "bug:golem". Now all you need to do is safe the file.
      4. In the resource part of the addon, first click "Create" and fill the blanks with anything you want. Then click on "New File" icon again and once again click on the creeper icon. This time it will create a Client Entity (which determines what textures to use, models, animations, etc.). Once again under "Templates" type 'iron_golem' and it will use the vanilla Iron Golem resources.
      5. VERY IMPORTANT. Same as before, you need to change the identifier "minecraft:iron_golem" to "bug:golem", then save the file.
      6. And now you are done with the addon. Now all you need to do is get on Minecraft, make a new world, load the addons (load the behavior part first and it will auto load the resource part), and once the world is created, use the /summon command to spawn the entity (for this example, type '/summon bug:golem')

       

      I have attached how the error messages look in game. Also this is the link for the addon I downloaded for the test: https://mcpedl.com/more-golems-remastered-addon-1/

      Also just in case, I will attach the example addon if anyone wants to test it or having trouble making it with the explanation.

        1. myaddon_error.png
          598 kB
          JiroCraft
        2. moregolemsaddon_error.png
          768 kB
          JiroCraft
        3. BUG_REPORT.mcpack
          62 kB
          JiroCraft

            JiroCraft JiroCraft
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: