mojira.dev
MC-191725

Endermen picking up blocks don't count towards the mob cap, and don't despawn, potentially cluttering up the world with endermen if they cannot place the block down

Endermen picking up blocks don't count towards the mob cap, and don't despawn, potentially cluttering up the world with endermen if they cannot place the block down. This can especially be observed in warped forests, as well as in a custom setups in an area with blocks endermen cannot replace (like item frames).

To reproduce, set the world border to 128, go into the Nether, reach the ceiling, place tnt floating 1 block above the bedrock (so endermen can't walk on top of it), and spawn endermen. When the endermen pick up the tnt, they will be stuck forever. (note: the world border only serves to confine the endermen within an observable area; it still works without the world border)

Linked issues

Attachments

Comments 32

gaspoweredpick

Unless this is a performance issue, I don't really see how this is a bug.

Please attach a debug report using /debug while in the warped forest. To create and attach a debug report, see https://minecraft.gamepedia.com/Commands/debug

They do also spawn quite frequently in that biome, do you have any specific proof that they do not despawn?

I have a fairly low-end PC so it would be difficult for me to record my screen, but I can share some steps to recreate:
1. Isolate a naturally spawning endermen that has picked up a block with a minecart or boat
2. move away at least 128 blocks
3. The endermen will remain there, and will no longer count towards the mob cap, allowing more endermen to spawn.

This is only prominent in warped forest biomes as they spawn frequently and there is an abundance of blocks they can pick up and does not occur elsewhere.

Living in a Warped Forest for the past two weeks, I did very much feel stressed out by the endermen only after updating to 1.16.1 yesterday

So I recorded this video with my camera account while no players were logged in, and sure enough, I can't despawn the endermen holding things

https://youtu.be/wRUREvSyDek

[media]

Works as intended.

22 more comments

For anyone suffering this problem, I've attached a screenshot from my community facing changelog on discord. In here I describe the problem, the problems with making a solution, and how the solution we settled on works to not disable the vanilla mechanic of endermen placing blocks entirely. If you want to do that, vanilla tweaks has a nice datapack to disable them picking blocks up. 

[media]

The solution we settled on actually works really well! People still deal with (and sometimes complain) about Enderman placing blocks on their base so we maintained the mechanic, but the scoreboard in the datapack reports more than 400,000 enderman pruned and we no longer have carpets in commonly loaded areas and no endermen pockets when they dead-end. 

For anyone from Mojang that makes it to this bug, if you don't want to roll back enderman holding blocks being persistent the easy solution I'd suggest is to simply just fix it so block holding Endermen utilize and respect the PersistenceRequired tag. Not sure why they don't in the first place (there could be a reason of course), and with a problem on a smaller scale with zombies picking up mob drops and building up it was much much simpler to make a datapack to more cleanly just mark certain zombies non persistent. but gain persistence when they are holding diamond or netherite items or things of similar value. I think there are similar datapacks out in the wild that people are quite happy with and it makes it a non-issue for servers where these types of problems are actually important, but I found no such thing for endermen.  I hope the 400,000 number highlights the severity of the issue, and the datapack has only been in place less than a year on a map that started just a couple of months before the datapack. In addition, we had cleaned up the pockets by commands regularly before the datapack, so the number is not a result of the pile-up. I never actually dialed it in more aggressively either, it's quite conservative with the frequency of pruning. 

In 1.20.2 and related to MC-197126 and MC-265587

Affects 1.20.4.

Endermen holding blocks grew to such a problem in my world that in a warped forest I visit frequently I had several hundred of them consuming over 50% of the tick processing time (about 950 entities, 800 of them endermen) and my logs were getting spammed with "Can't keep up!" messages. I had to switch to Peaceful to get rid of them and restore adequate performance.

I can confirm this in 1.20.5 Release Candidate 2. I would like to request ownership of this issue for two reasons;
1. the original reporter has not been active on Mojira since the creation of this issue, aside from 1 comment on this report. While that hasn't caused much harm considering the report has been relatively kept up with on it's affected versions, I see it valuable to have a reporter that can keep it up to date.
2. The description I argue can be improved and clarified, or at least have cleaner formatting. I'd like to create a new set of steps to reproduce which further outline the behavior this bug causes.

Confirmed in 1.21.4.

anon ymous

[Mod] Jingy

(Unassigned)

Confirmed

Gameplay

Normal

Mob spawning, Performance

1.16.1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.3, 1.16.5, ..., 1.19.4, 23w18a, 1.20.4, 1.20.5 Release Candidate 2, 1.21.4

Retrieved