Witch and cat are spawned at same position in swamp huts
The bug
Witch and cat in a swamp hut are spawned at the same position with same rotation.
Expected result
Witch and cat would be spawned at different positions within the swamp hut.
Code analysis
Code analysis can be found in this comment.
Linked Issues
Created Issue:
Witch and cat in swamp hut are spawned at same pos
Witch and cat in a swamp hut are spawned at the same position with same rotation(not at picture)
Witch and catin swamp hutare spawned at same posWitch and cat are spawned at same position in swamp huts
Witch and cat in a swamp hut are spawned at the same position with same rotation(not at picture, because picture was taken too late)
Witch and cat in a swamp hut are spawned at the same position with same rotation(not at picture, because
picturewas taken too late)Witch and cat in a swamp hut are spawned at the same position with same rotation(not at picture, because it was taken too late)
is duplicated by
relates to
Witch and cat in a swamp hut are spawned at the same position with same rotation
(not at picture, because it was taken too late)The bug
Witch and cat in a swamp hut are spawned at the same position with same rotation.
Expected result
Witch and cat would be spawned at different positions within the swamp hut.
Code analysis
Code analysis can be found in this comment .
Hi there!
This looks like a duplicate of MC-163503; feel free to comment any information on that ticket if you know of anything that may be useful.
I am unable to reproduce this issue in 20w49a. After loading a numerous amount of new chunks, mobs always seemed to spawn within groups, but not actually inside of one another. The only incident where this sometimes happens is when a witch and cat spawn in the same location, inside of a witch's hut. See MC-163503.
Does MC-163503 describe your issue?
This is definitely a duplicate of MC-163503.
The bug
During a raid, all of the raiders during each wave will spawn on the same block, causing them to explode out after one moves.
This is related to MC-163503.
Steps to Reproduce: provided by [Mod] Avoma
- Summon a repeating command block that will instantly set all raiders' "NoAI" and "Glowing" tags to "1b" if there are any present within the world.
/setblock ~1 ~ ~1 minecraft:repeating_command_block{auto:1b,Command:"execute as @e[type=#minecraft:raiders] run data merge entity @s {NoAI:1b,Glowing:1b}"}- Place down a bed and summon a villager close to it.
- Give yourself the bad omen effect in order to start a raid.
/effect give @s minecraft:bad_omen
- Wait for the raid to begin and locate where the raiders spawned in.
- Take note as to whether or not raiders are all spawned at the same position, one block above the ground.




Can confirm in 20w49a.
Can confirm in 20w51a.
Can confirm in 21w06a. This can be seen in almost every swamp hut.
Can confirm in 1.16.5 and 21w08b.
Can confirm in 1.17.1.
Can confirm in 21w41a.
Can confirm in 21w44a.
Code analysis (1.18.1, using Mojang mappings): in net.minecraft.world.level.levelgen.structure.SwamplandHutPiece, both the witch and the cat use the same block position within the structure piece as a reference, this.getWorldPos(2, 2, 5):
... @Override public void postProcess(...) { BlockPos.MutableBlockPos $$13; ... if (!this.spawnedWitch && $$4.isInside($$13 = this.getWorldPos(2, 2, 5))) { this.spawnedWitch = true; Witch $$14 = EntityType.WITCH.create($$0.getLevel()); ... $$14.moveTo((double)$$13.getX() + 0.5, $$13.getY(), (double)$$13.getZ() + 0.5, 0.0f, 0.0f); $$14.finalizeSpawn($$0, $$0.getCurrentDifficultyAt($$13), MobSpawnType.STRUCTURE, null, null); $$0.addFreshEntityWithPassengers($$14); } this.spawnCat($$0, $$4); } private void spawnCat(ServerLevelAccessor $$0, BoundingBox $$1) { BlockPos.MutableBlockPos $$2; if (!this.spawnedCat && $$1.isInside($$2 = this.getWorldPos(2, 2, 5))) { this.spawnedCat = true; Cat $$3 = EntityType.CAT.create($$0.getLevel()); ... $$3.moveTo((double)$$2.getX() + 0.5, $$2.getY(), (double)$$2.getZ() + 0.5, 0.0f, 0.0f); $$3.finalizeSpawn($$0, $$0.getCurrentDifficultyAt($$2), MobSpawnType.STRUCTURE, null, null); $$0.addFreshEntityWithPassengers($$3); } } ...I can also confirm this behavior in 22w18a. This can now be more easily reproduced by using the "/place" command.
Can confirm in 1.19.
Can confirm in 1.19.2.
Affects 1.21:
One note is that this can now be more easily reproduced using the /tick command.