PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Implement `Tag` for custom items #3161

Open LoneDev6 opened 11 months ago

LoneDev6 commented 11 months ago

Similarly to the vanilla tags. Would be nice to have some sort of attributes (tags) to group various items and be able to use this information in the plugin configurations.

For example

Be able to make a tool break a particular group of blocks faster. Let's say there is a pack which has various items:

In this case a I cannot identify which ore is rare or not only based on the name, so wildcard notations (for example block*) won't work.

So a property tags could be introduced:

  block1:
    display_name: 'block1'
    resource:
      material: PAPER
      model_path: block/block1
    tags:
      - rare_ore
    specific_properties:
      block:
        placed_model:
          type: REAL_NOTE
        cancel_drop: false

Which could be used in some special properties to match the needed group of custom blocks. (note: this is just an example, this property break_speed doesn't exists and might be worth to be implemented while making this feature #1268).

  tool1:
    display_name: tool1
    resource:
      generate: true
      material: STONE_AXE
      textures:
        - "item/tool1"
    specific_properties:
      tool:
        break_speed:
          rule_rare_ores:
            blocks_tags:
            - rare_ore
            multiplier: 2

Another example

[!WARNING]
As said before: break_speed is not a real property and it's currently not implemented.

A tool which has break speed multiplier set to 2 for any block which have a tag which ends with _rare_ore. So in this case it will match with block1, block2, block3, block4, block5 because they both have a tag which satisfies the rule.

  block4:
    display_name: 'block4'
    resource:
      material: PAPER
      model_path: block/block4
    tags:
      - special_rare_ore
    specific_properties:
      block:
        placed_model:
          type: REAL_NOTE
        cancel_drop: false
        hardness: 8
  block5:
    display_name: 'block5'
    resource:
      material: PAPER
      model_path: block/block5
    tags:
      - special_rare_ore
    specific_properties:
      block:
        placed_model:
          type: REAL_NOTE
        cancel_drop: false
        hardness: 8
  tool2:
    display_name: tool2
    resource:
      generate: true
      material: STONE_AXE
      textures:
        - "item/tool2"
    specific_properties:
      tool:
        break_speed:
          rule_rare_ores:
            blocks_tags:
            - "*_rare_ore"
            multiplier: 2
LoneDev6 commented 6 months ago

Note: Might be worth thinking about if it would be good to implement some of the new vanilla properties emulating them.

https://www.minecraft.net/ja-jp/article/minecraft-snapshot-24w12a image

PSYCHEER commented 2 months ago

How this feature goes in current state of IA as community waits for this. Some more informations will be usefull