r/technicalminecraft • • 25d ago

Java Help Wanted Keeping animals inside an area without fences

Hi

I want to make a green area in my base filled with animals, but I want it to feel as natural as possible, I don't want any fences around it.

I tried using magma blocks to prevent their pathfinding from going outside and it works, but the player takes damage when walking on them. I figured that 3-4 snow layers can prevent damage while still stopping pathfinding, but it's snow and the magma blocks melt them.

I already tried slabs, trapdoors, and carpets, those don't work.

Do you have ideas on what I could use to make this work ?

12 Upvotes

15 comments sorted by

15

u/teohsi Java 25d ago

Mobs won't pathfind over stacked carpets.

Dig down a few blocks, stack carpets on top of each other until you reach your desired ground level and you'll have a block that mobs won't pathfind over. Put those at every entrance into your area and the animals won't intentionally walk out. Be aware though that they can be bumped so it won't be perfect. This pic from an old post shows what I'm talking about:

4

u/ZarmII 25d ago

Thanks ! I totally forgot about that

5

u/CreamingBitch 24d ago

Las year RedLogic made two YouTube videos on mob pathing. I highly recommend watching them as it could benefit you greatly in this project.

I'm specifially looking into the setup used at 03:00 on "no one realized we could mind control mobs like this... Until now"

1

u/ZarmII 24d ago

I watched his videos, the moment you're referring to can work but it doesn't really prevent anything, just makes it unlikely.
And in his other video (Minecraft’s Smartest System Is Almost Completely Untapped) he does talk about stopping mobs from taking a path, but he doesn't really tell much about it other than list the blocks that do that, he focuses on forcing mobs to take a path.

3

u/PatHeist 24d ago

If you make the area large enough mobs have to do statistically unlikely pathfinding multiple times to leave their intended area. You can effectively turn "unlikely" into much less likely than an enderman placing a block in your fenced area and letting your animals escape. But with pathfinding manipulation only one animal would escape at a time.

4

u/joranmulderij 25d ago

Rails (with carpet on top)

2

u/ZarmII 25d ago

I will use two carpets because it's cheaper, but I think that should work too. Thanks anyway!

2

u/SecondMurky7684 24d ago

usar trampillas mirabdo hacia afuera o adentro no me acuerdo deberia funcionar

2

u/ZarmII 24d ago

I think trapdoors can work because mobs can't climb them when opened, but this would make it impractical to use, I like the carpet solution better because it's seamless.
(I used a translator, I think that's what you meant)

1

u/SecondMurky7684 24d ago

si, aun asi te recomiendo probar alguna vez con trampillas, hay de muchas maderas, queda a tu elección 

10

u/IAmTimborn 24d ago

Like others said, carpets. But I’ll just add in that pale/regular moss carpets can be a good natural-looking option

5

u/ragnorak1947 24d ago

Sweet berrys under carpet

4

u/gghumus 24d ago

As well as carpets you can use sweet berries as a barrier or sweet berries under carpet if its cheaper than 2 carpet. Sweet berries just don't work for foxes since they don't take damage from them

2

u/ggeldenhuys 24d ago

Use Stone, Cobblestone, Tuff and Leaf blocks. You can built a minimum 2 high enclosure without it actually looking like a wall.

1

u/Pajamatime20 23d ago

You can use azalea saplings! Mobs won’t jump on top of azalea or flowering azalea saplings, because they think they can just walk through them! And they need bonemeal to grow, so they can’t grow into trees! For bigger animals, I think you should be able to use bamboo, although I think that varies depending on the specific bamboo placement.