Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't like "rotate" property of portrait_offsets #26

Open
tryashtar opened this issue Aug 7, 2024 · 4 comments
Open

Doesn't like "rotate" property of portrait_offsets #26

tryashtar opened this issue Aug 7, 2024 · 4 comments

Comments

@tryashtar
Copy link

I got this error:

additionalProperties /minecraft:entity/components/minecraft:npc/npc_data/portrait_offsets must NOT have additional properties: (additionalProperty: rotate)

rotate is a valid and functional property in this field, just like scale and translate. It rotates the preview.

@MKokeshi
Copy link

MKokeshi commented Aug 8, 2024

To address the issue with rotate in your Minecraft JSON file, follow these steps:

1. Verify JSON Schema

Ensure that the JSON schema you are using correctly defines rotate as a valid property. If the schema does not include rotate, you may need to update or correct it.

2. Update Minecraft or Tools

Ensure that you are using the latest version of Minecraft and any tools or plugins associated with JSON editing. Sometimes properties or schema definitions change with updates.

3. Validate JSON

Use an online JSON validator or schema validator to check if your JSON is correct. Tools like JSONLint or JSON Schema Validator can be useful.

4. Review and Fix JSON Example

Here’s how you might structure the portrait_offsets in your JSON. Ensure your JSON matches this structure and doesn't include unsupported properties:

{
  "minecraft:entity": {
    "components": {
      "minecraft:npc": {
        "npc_data": {
          "portrait_offsets": {
            "scale": [1.0, 1.0, 1.0],
            "translate": [0.0, 0.0, 0.0],
            "rotate": [0.0, 0.0, 0.0]  // Ensure this property is valid
          }
        }
      }
    }
  }
}

5. Use Minecraft Commands

If you are working within Minecraft and need to adjust entity properties using commands, you can use commands like:

  • To modify entity data:
    /data merge entity <entity> {<property>:<value>}
    
    Replace <entity>, <property>, and <value> with the appropriate values. For example:
    /data merge entity @e[type=minecraft:zombie,limit=1] {CustomName:"{\"text\":\"Rotating Zombie\"}"}
    

6. Consult Documentation

If rotate is not recognized, consult the Minecraft documentation or Minecraft’s official documentation for the correct usage of properties. Sometimes properties are updated or added in newer versions.

7. Seek Community Help

If you are still having issues, consider reaching out to Minecraft forums or communities, such as:

These communities often have experienced developers who can provide advice or solutions for specific issues.

By following these steps, you should be able to diagnose and correct the issue with the rotate property in your Minecraft JSON files.

@tryashtar
Copy link
Author

Can we not clog this issue with crappy AI spam please?

@MKokeshi
Copy link

MKokeshi commented Aug 8, 2024

What crappy, I give you a reply with some true informations.
So if you want to talk in DM, can we talk it about your problems about your wrong coding ^-^

@tryashtar
Copy link
Author

It seems like the key validations are coming from https://github.com/Blockception/Minecraft-bedrock-json-schemas/

That's a bit disappointing; as a community we are in dire need of accurate, comprehensive schemas from an official source. That's what I thought this project was at first. There are so many obscure and undocumented keys, and a multitude of different format versions, that reverse-engineering them all ourselves and keeping them up-to-date is an impossible task.

Is there any possibility of this coming in the future? I can't be confident that the errors produced by this project are accurate if they're not sourced from the game itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants