mojira.dev
MC-126778

Phantoms can spawn above mushroom islands / mushroom fields

The bug

The issue is that the new phantom mob spawns above mushroom islands, even though no other hostile mob can do the same. This contradicts the previous spawning system.

Through testing on multiple superflat worlds of various biomes, I have found that phantoms spawn over mushroom islands, along with every other overworld biome.

This isn't much of an issue for most, but if anyone was to set up a base on a mushroom island, this harms the very concept of it being a location without any hostile mobs.

This should be an easy fix since they have already been removed from the end. I'm guessing it was overlooked because they have their own spawning system completely independent from other hostile mobs.

Code analysis

Code analysis can be found in this comment.

Linked issues

Comments 53

[Bot] Arisa

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Xavom

I disagree with the current "Works As Intended " resolution as it contradicts the current hostile spawning rules within mushroom island biomes. The phantom mob now is at best just another hostile that makes the game less enjoyable considering the other issues such as targeting invisible players from a distance. Basically this mob is too OP.
Consider this: Several servers such as Hermitcraft, use the mushroom island biome for a peaceful place for base and games building. The mushroom island biome should remain a biome that no hostiles can spawn within.

Galaxy

I also disagree with the current resolution. Biome spawning conditions have always taken precedence over the spawning conditions of each individual mob. It was very exciting to experience an attack for the first time, but it will soon become an annoyance to what I believe will be many members of the community if it fails to follow the same basic rules as other hostile mobs.

Alex Mehne

I would vote for this issue if I could.  Minecraft is a game about building.  Some things are better built in the absence of hostile mobs.  having phantoms in mushroom island biome limits the usefulness of the biome and the variety of gameplay.  I also notice that ever since microsoft has managed minecraft, killing monsters has become more and more important, which, is not what makes minecraft great.

InsaneJ

As stated in MC-136799 this clearly does not work as intended. This bug severely cripples an existing game mechanic. Mushroom biomes should be safe biomes. These biomes are super rare so the reward for exploring and finally finding one is that you have a safe place to stay. Now that no longer is the case so there's little point in going out of your way to find these biomes.

43 more comments
Alex Mehne

Dhranios, you got an invite link to the mojira discord?

anthony cicinelli

Please head here for the discord or here for the subreddit

Alex Mehne

@ Brian even if posting links is restricted on that website, you should be able to copy/paste the text

ampolive

Code analysis (1.18.2-pre1, Mojang mappings):
PhantomSpawner and other "natural" spawners (patrols, cats, etc.) are called for the entire level regardless of biome. However, PhantomSpawner does not check if the biome is a mushroom biome. Case in point: in PatrolSpawner.tick(...), there is a piece of code checking this.

...
        Holder<Biome> $$11 = $$0.getBiome($$9);
        Biome.BiomeCategory $$12 = Biome.getBiomeCategory($$11);
        if ($$12 == Biome.BiomeCategory.MUSHROOM) {
            return 0;
        }
...

This check is missing for PhantomSpawner.

ampolive

I doubt that fixing this would fix the issue entirely though. There could be microbiomes in the sky above the mushroom islands/fields in the borders with other biomes (see MC-93271, MC-239446) and if the spawner picks a position within that region, it will spawn a phantom.

Pandeoo

(Unassigned)

Confirmed

Gameplay

Normal

Mob spawning

mob

Minecraft 18w08b, Minecraft 18w10a, 1.15.2, 20w21a, 1.16 Pre-release 5, ..., 1.17.1, 1.18.2 Pre-release 1, 1.18.2 Pre-release 3, 1.19.2, 1.20.4

Retrieved