-
Bug
-
Resolution: Fixed
-
Snapshot 13w04a, Snapshot 13w05b, Snapshot 13w06a, Snapshot 13w07a, Snapshot 13w10b, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w24a, Snapshot 13w24b, Snapshot 13w25a, Snapshot 13w25b, Snapshot 13w25c, Minecraft 1.6, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w03b, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 1.8, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w31a, Minecraft 15w36d, Minecraft 15w38a, Minecraft 15w38b, Minecraft 15w39b, Minecraft 15w39c, Minecraft 15w43b, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47b, Minecraft 15w47c, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 16w02a, Minecraft 16w06a, Minecraft 16w07a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15a, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w21a, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2
-
None
-
Confirmed
Upwards and downwards facing dispensers with spawn eggs will spawn the mob inside the dispenser (instead of on top/below it).
This can cause small mobs (e.g. chicken, silverfish) to suffocate inside the dispenser.
Steps to reproduce
1. Place an upwards facing dispenser on the foor. 2015-09-19_01.12.23.png
2. Put spawn eggs in it (e.g. Creeper)
3. Trigger the dispenser.
4. The mob is inside the dispenser, and not as expected on top of it. 2015-09-19_01.12.33.png
Fix
The simplest fix would be to just add the offset to the spawn position of the mob as it is done for x and z already.
public ItemStack dispenseStack(IBlockSource source, ItemStack stack) { EnumFacing var3 = BlockDispenser.getFacing(source.getBlockMetadata()); double var4 = source.getX() + (double)var3.getFrontOffsetX(); // Added "+ (double)var3.getFrontOffsetY()" double var6 = (double)((float)source.getBlockPos().getY() + 0.2F) + (double)var3.getFrontOffsetY(); double var8 = source.getZ() + (double)var3.getFrontOffsetZ(); Entity var10 = ItemMonsterPlacer.spawnCreature(source.getWorld(), stack.getMetadata(), var4, var6, var8); if(var10 instanceof EntityLivingBase && stack.hasDisplayName()) { ((EntityLiving)var10).setCustomNameTag(stack.getDisplayName()); } stack.splitStack(1); return stack; }
This fix would be ok already, but for downwards facing dispensers it would still spawn two high+ mobs inside the dispenser with their head.
So the fancy way may be to subtract the height of the mob for downwards facing ones.
Then again this is not done for sideways ones either so I guess just adding the offset would be "as expected"
- is duplicated by
-
MC-8388 Dispenser Bugs
- Resolved
-
MC-8391 Vertical Dispensers and Mobs
- Resolved
-
MC-9444 Upward dispensers with mob eggs spawn them in the dispenser block
- Resolved
-
MC-9797 Upward dispenser mob bug.
- Resolved
-
MC-10053 Dispenser directed up will suffocate chicken
- Resolved
-
MC-11436 Vertical dispenser glitch
- Resolved
-
MC-12274 Mobs falling through upwards facing dispensers
- Resolved
-
MC-12414 Upwards facing dispenser spawning mobs incorrectly
- Resolved
-
MC-17758 Up and Down-facing dispensers don't spawn spawn eggs correctly.
- Resolved
-
MC-18599 Mobs Spawned By Upward Dispenser Spawn Inside It Instead of Above It
- Resolved
-
MC-49952 Small slimes die when you dispense them upwards.
- Resolved
-
MC-50466 Dispenser that are pointing upwords does not spawn things corectly
- Resolved
-
MC-65853 Mobs are in dispenser by spawning
- Resolved
-
MC-82016 Dispencers facing down dispencing mobs
- Resolved
-
MC-83114 Dispensers
- Resolved
-
MC-91212 When using spawn eggs with dispenser, the mob spawn in it!
- Resolved
-
MC-97344 Dispencers
- Resolved
-
MC-103936 upwards Dispenser spawns mob inside itself
- Resolved
- relates to
-
MC-130730 Entities suffocate when using spawn eggs on ceilings
- Open
-
MC-123420 entities go inside blocks
- Resolved