been trying to put a barrier around my base but cant seem to understand how to actually put in the cords for my whole base. if someone could help id really appreciate it
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
qualityvote22026-01-24 09:50
* Upvote this comment if this is a good quality post that fits the purpose of r/Minecraft
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
Open-Owl96002026-01-24 09:52
You need to use two opposite corners of your base for the fill command. Like if your base goes from x=100 z=200 to x=150 z=250, you'd do \`/fill 100 64 200 150 80 250 barrier\` (adjust the y coords for how tall you want it). Just walk to one corner, hit F3 to see your coords, then walk to the opposite corner and get those coords too
Ericristian_bros2026-01-25 09:54
Sphere selection
Selects players in a radius. x y z define the center, `distance` the radius.
Java: `@a[x=0,y=90,z=0,distance=..6]` selects players up to 6 blocks away.
`..a` = a or less, `a..` = a or more, `a..b` = between a and b.
Bedrock uses `r` (max) and `rm` (min) instead of distance.
Uses the entity position (center of feet).
Cubic selection.
Selects players in a box. `x y z` define the origin, `dx dy dz` define the size.
`dx dy dz` add `+1` on each axis (e.g. `x=37,dx=10` → `37 to 48`).
Checks any part of the hitbox, so heads can count
Predicates
You can select entities using a `location_check` predicate.
```
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"x": {
"min": 38.2,
"max": 41.7
}
}
}
}
```
Unlike the `dx dy dz` arguments, this does not check for an entity's hitbox but for its position.
Commentaires
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
Selects players in a radius. x y z define the center, `distance` the radius.
Java: `@a[x=0,y=90,z=0,distance=..6]` selects players up to 6 blocks away.
`..a` = a or less, `a..` = a or more, `a..b` = between a and b.
Bedrock uses `r` (max) and `rm` (min) instead of distance.
Uses the entity position (center of feet).
Cubic selection.
Selects players in a box. `x y z` define the origin, `dx dy dz` define the size.
`dx dy dz` add `+1` on each axis (e.g. `x=37,dx=10` → `37 to 48`).
Checks any part of the hitbox, so heads can count
Predicates
You can select entities using a `location_check` predicate.
```
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"x": {
"min": 38.2,
"max": 41.7
}
}
}
}
```
Unlike the `dx dy dz` arguments, this does not check for an entity's hitbox but for its position.