#zone without pvp

1 messages · Page 1 of 1 (latest)

ripe pebble
#

Use damage sensors

#

In the player.json behavior file, you’ll add a damage sensor which will block the damage from players with a specific tag.

#

Like this, which will block the damage from entities with the tag Safe:

"minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "all_of": [
                    {
                      "test": "has_tag",
                      "subject": "other",
                      "value": "Safe"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                       }
                     ]
                   }
                 },
                "deals_damage": false
            }
          ]
        }```
cunning scarab
#

cuz im not realy good in entities dev

#

i have take à vanilla json.player
and i have put your text in the end like this

#
          "component_groups": [
            "minecraft:clear_bad_omen_spell_effect"
          ]
        }
        },
"minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "all_of": [
                    {
                      "test": "has_tag",
                      "subject": "other",
                      "value": "Safe"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                       }
                     ]
                   }
                 },
                "deals_damage": false
            }
          ]
      },
      "minecraft:trigger_raid": {
        "add": {
          "component_groups": [ "minecraft:raid_trigger" ]
        }
      },
      "minecraft:remove_raid_trigger": {
        "remove": {
          "component_groups": [ "minecraft:raid_trigger" ]
        }
      }
    }
  }
}
#

in this folder

ripe pebble
#

If you copy and paste the code I provided you under the components block, it will work

cunning scarab
#

its works

#

i love you ahha

#

hahaha

ripe pebble
#

No problem, if your question has been answered please make sure to close your question.