codetaylor / dropt-1.12

Flexible block drop strategies.
https://minecraft.curseforge.com/projects/dropt
Other
6 stars 2 forks source link

Example inconsistency #31

Closed Davoleo closed 6 years ago

Davoleo commented 6 years ago

Ok, I need the better with mods's unfired brick to drop itself, so I created this script

{
  "rules": [
    {
      "match": {
        "drops": {
          "items": [
            "betterwithmods:unfired_pottery:4"
          ]
        }
      },
      "replaceStrategy": "REPLACE_ITEMS_IF_SELECTED",
      "drops": [
        {
          "selector": {
            "weight": {
              "value": 100
            }
          },
          "item": {
            "items": [
              "betterwithmods:unfired_pottery:4"
            ]
          }
        }
      ]
    }
  ]
}

but instead of adding the drop just to the brick it adds it to every item in the game I don't know what replace strategies are avaliable, but I think the problem is there

codetaylor commented 6 years ago

You have:

"match": {
  "drops": {
    "items": [
      "betterwithmods:unfired_pottery:4"
    ]
  }
}

Should be:

"match": {
  "drops": {
    "drops": [
      "betterwithmods:unfired_pottery:4"
    ]
  }
}

Looks like there is some inconsistency in the examples, I'll fix that.

In the meantime: https://github.com/codetaylor/dropt/blob/master/SYNTAX.md

Davoleo commented 6 years ago

oh ok, thanks!

Davoleo commented 6 years ago

ok it does replace but it also has the old drop that I would like to remove


  "rules": [
    {
      "match": {
        "blocks": {
          "blocks": [
            "betterwithmods:unfired_pottery:4"
          ]
        }
      },
      "replaceStrategy": "REPLACE_ITEMS_IF_SELECTED",
      "drops": [
        {
          "selector": {
            "weight": {
              "value": 100
            }
          },
          "item": {
            "items": [
              "betterwithmods:unfired_pottery:4"
            ]
          }
        }
      ]
    }
  ]
}```
Davoleo commented 6 years ago

OK, I sorted out by myself, sorry for the ignorance but I'm really new to this mod