Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-169823

Bad Omen event triggered twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.73
    • Unconfirmed
    • Windows

      I made a mod for bedrock which has an entity that, among other things, triggers raids on interaction using a block of gold, if within a village.

      The entirety of the mod works as intended, except for the raid triggering part.

      The problem is that, when the raid finishes, a second raid is triggered. The second raid is also triggered if the first village is left and a second village is entered.

      This bug triggers only a second raid, so the bad omen effect finally vanishes after the second raid.

      Must also be noted that after the first, intended, raid is triggered, there is no bad omen effect icon in the top right corner of the screen, nor the second raid can be avoided drinking milk.

      I think the bug must be in the "event": "minecraft:gain_bad_omen" when triggered outside the normal killing of pillager captains, because otherwise the bad omen effect seems working just fine.

       

      Following is the code I use for triggering the raid with that entity:

      [...]
      
      "minecraft:interact": {
                        "interactions": [
                          {
                          "use_item": true,
                          "interact_text": "Battle",
                          "cooldown": 10,
                          "particle_on_start": {
                          "particle_type": "bleach",
                          "particle_offset_towards_interactor": true
                          },
                          "on_interact": {
                              "filters": {
                              "all_of": [
                                  {
                                  "test": "has_equipment",
                                  "subject": "other",
                                  "operator": "==",
                                  "value": "minecraft:gold_block"
                                  },
                                  {
                                  "test": "is_family",
                                  "subject": "other",
                                  "value": "player"
                                  }
                              ]
                          },
                          "event": "minecraft:gain_bad_omen",
                          "target": "other"
                              }
                          }
                        ]
                      },
      
      [...]

       

      Attached is the mod, the entity in question is named "Village controller" ("villageguard.guard.json" in the files) and can only be tested if placed within a village.

      Hope a solution is found, it sucks to have two consecutive raids every time.

      Best regards.

            Anghelos92 Anghelos92
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: