4

Is there a datapack that lets mobs spawn in peaceful without attacking the player?

Acerthorn's Avatar Acerthorn6/17/22 7:33 pm
4 emeralds 279 6
7/5/2022 2:10 pm
Gamingbarn's Avatar Gamingbarn
Peaceful difficulty is nice if you just want to build. But there are a lot of items - gunpowder, ender pearls, blaze rods, etc. - that you can only get from killing mobs. Some items - like string - can be obtained elsewhere but mobs are the primary source thereof.

Is there a data pack that causes mobs to spawn in low light, but they don't attack the player, just like in creative mode?
Posted by Acerthorn's Avatar
Acerthorn
Level 2 : Apprentice Miner
0

Create an account or sign in to comment.

6

deeveesss
07/04/2022 4:10 pm
Level 39 : Artisan Birb
deeveesss's Avatar
I just released a lightweight datapack specifically for this type of behavior. You can find it here.
2
Acerthorn
07/05/2022 8:22 am
Level 2 : Apprentice Miner
Acerthorn's Avatar
But do they spawn in peaceful difficulty?
1
Gamingbarn
07/05/2022 2:10 pm
Level 70 : Legendary Programmer
Gamingbarn's Avatar
As HoboMaggot said, you can't change weather mobs spawn in peaceful difficulty or not it's hardcoded into the game.
2
HoboMaggot
06/18/2022 2:28 am
Level 52 : Grandmaster Blob
HoboMaggot's Avatar
You could just use a datapack/repeating command that puts all the hostile mobs into the same team
3
Acerthorn
06/18/2022 7:20 pm
Level 2 : Apprentice Miner
Acerthorn's Avatar
I have no idea what you just said.

What command should I enter? And how does that command even work to achieve the result I'm looking for?

Also, bear in mind that I'm only looking to have this feature in peaceful mode. The idea of entering a command sounds like it would still require me to be on easy or harder.
1
HoboMaggot
06/18/2022 11:06 pm
Level 52 : Grandmaster Blob
HoboMaggot's Avatar
/team add <custom_team_name>
/team join <custom_team_name> @e[type=!player,type=!<non_hostiles...>]

Example:
/team add Friendly
/team join Friendly @e[type=!player,type=!armor_stand,type=!area_effect_cloud,type=!pig]


By placing mobs in the same team, the monster's AI to attack the other mob is pretty much ignored.
E.g. zombies will not hunt villagers on the same team, endermen on your team won't get aggroed if you look at them



For your 2nd point, that is impossible due to how mob spawning is hardcoded with difficulty. You will need an actual mod to change that
2
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome