-
Notifications
You must be signed in to change notification settings - Fork 2
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
minecraft:block_placer > replace_block_item validation #282
Comments
Do you have a json example of what you mean? Hard time visualizing it atm |
If this is the {
"format_version": "1.20.80",
"minecraft:item": {
"description": {
"identifier": "test:block"
},
"components": {
"minecraft:block_placer": {
"block": "test:block",
"replace_block_item": true
}
}
}
}
|
Does it need to match? As per the documentation it just specifies a block. Do we need to check it equals the item, or the just an exiting block |
It needs to match |
On a similar note, for |
I'll see if I can get some time on updating the framework, so you can easily add those checks |
Great. Thank you |
The field requires that the block that is being placed matches the id of the item for the replace_block_item field to be valid.
I'd do this myself, but after going through
BehaviorPack/Item/components/diagnose.ts
I'm not sure how to access the item's identifier from the component test aside from callingdiagnoser.document.getText()
and parsing the JSON again. Seems redundant to parse it again since it's already been done in theentry.ts
fileThe text was updated successfully, but these errors were encountered: