0

I am trying to kill all entities in a custom dimension named "console" except myself, armor stands, and items. At the moment, it is killing all entities in all dimensions except me, armor stands, and items.

This is the command

execute in minecraft:console run kill @e [type=!minecraft:armor_stand,name=!MaximumCalamity,type=!minecraft:item]
3
  • saying in <dimension> means that the entity must be IN that dimension
    – Penguin
    Mar 3 '21 at 19:58
  • @Penguin That's exactly what the asker wants, only the entities in that dimension. They say that the unwanted behaviour is that it's affecting entities in all dimensions. Mar 3 '21 at 20:16
  • 3
    Are you sure the console dimension is definitely in the minecraft namespace? That seems unusual
    – Ben
    Mar 3 '21 at 20:57
1

Your selector selects entities outside of your dimension. You can use the distance trick to only select entities inside the specified dimension:

execute in minecraft:console run kill @e[distance=0..,type=!armor_stand,name=!MaximumCalamity,type=!item]

Or, you can use a predicate:

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "location": {
      "dimension": "minecraft:console"
    }
  }
}

Paste this into a .json file, and place it into the correct folder path inside your datapack.

You can then select entities more efficiently with:

kill @e[predicate=namespace:predicate_file_name,type=!armor_stand,name=!MaximumCalamity,type=!item]
0

I don't know how to do that, but I think you have to be in that specific dimension to do that with this command:

/execute in console run kill@e[type=!minecraft:Player, type=!minecraft:item, type=!minecraft:armor_stand]

I haven't tested it yet because I can't get into the console dimension because it isn't in vanilla Minecraft, but I'm pretty sure it should work.

1
  • there appear to be a few error in this answer, (what is the pacific realm?) and you seem to have misunderstood the premise of the question
    – Topcode
    Mar 5 '21 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.