Animated-Java / animated-java

A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.
Other
164 stars 27 forks source link

[FR] Implement Custom Item Stacks for Plugin Mode #280

Open Dearliet opened 2 months ago

Dearliet commented 2 months ago

Implement custom item stacks for plugin mode only, without adding component parsing. Invalid item name and format should still be marked as such.

Marked as valid:

minecraft:wooden_axe
minecraft:wooden_axe[]
wooden_axe
wooden_axe[]
wooden_axe[hide_tooltip={},custom_model_data=12,tool={default_mining_speed:2.0,damage_per_block:0}]
wooden_axe[blabladujdejduied!!!?:::@@@] // no component parsing

Marked as invalid:

emerald_axe[hide_tooltip={}] // invalid item
wooden_axe[ // invalid format
wooden_axe] // invalid format
Dearliet commented 2 months ago

Alternatively, we could implement more robust component format validation. However, I'm not sure whether this is worth the trouble. Let me know what you think.

Marked as valid:

minecraft:wooden_axe
minecraft:wooden_axe[]
wooden_axe
wooden_axe[]
wooden_axe[hide_tooltip={},custom_model_data=12,tool={default_mining_speed:2.0,damage_per_block:0}]
wooden_axe[hide_tooltip=3] // no concrete component parsing; valid as long as the format is correct
wooden_axe[this_field_is_made_up=3] // same as above

Marked as invalid:

emerald_axe[hide_tooltip={}] // invalid item
wooden_axe[ // invalid format
wooden_axe] // invalid format
wooden_axe[blabla===bl==ablabla] // invalid component key-value format
wooden_axe[{}=12] // invalid component key
wooden_axe[test={] // invalid component value
wooden_axe[test={dddddd=12}] // invalid nbt compound format
wooden_axe[test={{}:12}] // invalid nbt compound key
wooden_axe[test={test:{{}] // invalid nbt compound value