codetaylor / dropt-1.12

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

Beds #70

Closed AechtRob closed 4 years ago

AechtRob commented 4 years ago

First - this is a mod I have been waiting an age for, and it's good!

dropt-1.12.2-1.17.0: It seems that beds are not recognised by the mod? I would like to replace a bed dropping itself with a bed dropping some constituent parts instead, but I can't get it to interact with beds at all. Sample script that doesn't work trying to exchange brown bed drops for brown wool etc:


  {   
      "match": {
        "drops": {
          "drops": [
            "minecraft:bed:12"
          ]
        }
      },
      "replaceStrategy": "REPLACE_ITEMS",
      "drops": [
        {
          "item": {
            "items": [
              "minecraft:wool:12
            ]
          }
        }
      ]
    }
codetaylor commented 4 years ago

Thank you for the compliment! :)

Unfortunately, Dropt can't replace beds. When a bed is broken, its drop is spawned directly in the world and bypasses the event that Dropt uses to do matching and replacements.

codetaylor commented 4 years ago

@AechtRob I'm going to reopen this because I'm working on a solution that will allow Dropt to intercept the bed's drops.

AechtRob commented 4 years ago

Great - at the moment I am using two added different mods just to bridge the bed-drop issue (as well as using yours for other items).

codetaylor commented 4 years ago

I've implemented the solution as a tiny, stand-alone mod that replaces the vanilla bed with a version that fires and respects the harvest drops event.

You can find it here: https://www.curseforge.com/minecraft/mc-mods/dropt-bed

This will make the bed compatible with Dropt as well as any other mod that uses the harvest event.