[MC-10369] Server side particle spawning does not create particles for client Created: 26/Feb/13  Updated: 08/Mar/23  Resolved: 02/Apr/19

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Snapshot 13w09a, Snapshot 13w09b, Snapshot 13w09c, Snapshot 13w10a, Snapshot 13w10b, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Snapshot 13w16a, Snapshot 13w16b, Minecraft 1.5.2, Snapshot 13w17a, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 1.8, Minecraft 1.8.1-pre2, Minecraft 1.8.8, Minecraft 15w47c, Minecraft 1.8.9, Minecraft 16w06a, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.10.2, Minecraft 16w32b, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w05a, Minecraft 18w08b, Minecraft 18w11a, Minecraft 1.13-pre1, Minecraft 1.13-pre6, Minecraft 1.13.1
Fix Version/s: Minecraft 19w14a

Type: Bug
Reporter: Marcono1234 Assignee: [Mojang] Bartosz Bok
Resolution: Fixed Votes: 31
Labels: 12w18a, iron_golem, particles, snow_golem, villager_golem

Attachments: PNG File 1.2.5 Iron Golem.png     PNG File 1.2.5 Snow Golem.png     PNG File 13w09a Iron Golem.png     PNG File 13w09a Snow Golem.png     PNG File Fixed Server Particles-Chorus Fruit.PNG    
Issue Links:
Duplicate
is duplicated by MC-6654 Water/Lava Colliding no longer gives ... Resolved
is duplicated by MC-13094 Missing smoke particles when placing ... Resolved
is duplicated by MC-73857 Redstone torches no longer produce pa... Resolved
is duplicated by MC-96974 Armor breaking on monster does not cr... Resolved
is duplicated by MC-99512 Baby animal being born does not creat... Resolved
Relates
relates to MC-93826 Breeding hearts only show once and no... Open
relates to MC-217618 Building iron golems does not create ... Open
relates to MC-217619 Building snow golems does not create ... Open
relates to MC-217641 Building withers does not create snow... Open
relates to MC-99597 Not needed spawnParticles calls of th... Resolved
relates to MC-123338 When building a snow golem, the parti... Resolved
relates to MC-148703 Black Particles Resolved
relates to MC-260379 Teleport with chorus fruit does not c... Resolved
CHK:
Confirmation Status: Confirmed
Category:
(Unassigned)

 Description   

The bug

Particle creation triggered for the server does not send a particle packets to the client.

Affected situations

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

Iron and snow Golem creation
  • Affected method: net.minecraft.block.BlockPumpkin.trySpawnGolem(World, BlockPos)
  • Suggested fix: See comment
Wither boss creation
  • Affected method: net.minecraft.block.BlockSkull.checkWitherSpawn(World, BlockPos, TileEntitySkull)
  • Suggested fix: See comment
Water and lava colliding
  • Affected method: net.minecraft.block.BlockLiquid.triggerMixEffects(World, BlockPos)
  • Suggested fix: See comment
Redstone torch burning out
  • Affected method: net.minecraft.block.BlockRedstoneTorch.updateTick(World, BlockPos, IBlockState, Random)
  • Suggested fix: See comment
Armor breaking on mob
  • Affected method: net.minecraft.entity.EntityLivingBase.renderBrokenItemStack(ItemStack)
  • How to reproduce: See description of MC-96974
Placing eye of ender in end portal frame
  • Affected method: net.minecraft.item.ItemEnderEye.onItemUse(ItemStack, EntityPlayer, World, BlockPos, EnumHand, EnumFacing, float, float, float)
  • Suggested fix: See comment
Animal being born
  • Affected method: net.minecraft.entity.ai.EntityAIMate.spawnBaby()
Ender dragon destroying blocks
  • Affected method: net.minecraft.entity.boss.EntityDragon.destroyBlocksInAABB(AxisAlignedBB)
Explosion particles for EntityLiving spawned by spawner
  • Affected method: net.minecraft.tileentity.MobSpawnerBaseLogic.updateSpawner()

The reason

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this is happening is because the abstract method net.minecraft.world.IWorldEventListener.spawnParticle(int, boolean, double, double, double, double, double, double, int...) is called for particle creation. Calling this method calls for the client the net.minecraft.client.renderer.RenderGlobal.spawnParticle(int, boolean, double, double, double, double, double, double, int...) method which creates the particle. However, for the server it calls the net.minecraft.world.WorldManager.spawnParticle(int, boolean, double, double, double, double, double, double, int...) method which does nothing. The change of using an integrated server for the client might have caused this bug.
It is probably not a good decision to fix this by having the net.minecraft.world.WorldManager class sending particle packets every time the method is called because this method does not support a count parameter, which means that for example for the creation of an iron or snow golem 120 packets are being sent. Instead the method net.minecraft.world.WorldServer.spawnParticle(EnumParticleTypes, double, double, double, int, double, double, double, double, int...) should be used which has a particle count parameter and uses the value for creating the particle packet.

Comparing with old behaviour

If you would like to test how it was in 1.2.5, you can download the 1.2.5 jar file from here:
http://www.minecraftwiki.net/wiki/Version_history/Development_versions#Minecraft_1.2_Snapshots_.26_Pre-releases
Or you can create a new profile in the launcher with the version "release 1.2.5"
Replace your current jar file with the 1.2.5 one and spawn each Golem to see the particles.



 Comments   
Comment by [Mod] tryashtar [ 27/Jan/20 ]

Which of the examples are still an issue in 1.15.2?

Comment by KaptainWutax [ 04/Jan/19 ]

So, a new item got added to the list in 1.9 : chorus fruit. When eaten, it calls Item#onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving). That method then performs a !world.isRemote check and proceeds to call EntityLivingBase#attemptTeleport(double x, double y, double z) a couple of times. In the latter, the code generates PORTAL particles using the client-side spawnParticles method. But because of the server-side check earlier, nothing happens on the client and no packet is sent.

Comment by [Mod] tryashtar [ 23/Nov/17 ]

Snow golem particles seem to be back in 17w47b, maybe earlier, though it's possible it's just a side effect of the snow blocks breaking.

EDIT: yes it is, see MC-123338.

Comment by Sealbudsman [ 17/Mar/16 ]

Affects version 1.9 and 1.9.1-pre3.

Comment by Marcono1234 [ 13/Mar/16 ]

Can someone of the mods please mark all reports currently marked as "relates to" as duplicate?
I will update the report after that accordingly

Comment by [Mod] Les3awe [ 13/Feb/16 ]

Reporter seems inactive.
Recommendation Mod giving ticket to Marcono1234.

Comment by Marcono1234 [ 11/Feb/16 ]

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The reason for this seems to be that the methods spawning the Snowman, VillagerGolem and WitherBoss (yes, a WitherBoss should – based on the code – also create particles) are only called server side, however the methods they are calling to create the particles are client side. This is a little bit complicated because they are calling the method for all net.minecraft.world.IWorldAccess. While for the client the net.minecraft.client.renderer.RenderGlobal (which creates the particles) is in this list, for the server only net.minecraft.world.WorldManager are in this list. The problem is their method for creating particles is simply doing nothing. This bug would be more obvious if there would be base, client and server classes for entities, blocks... and if the particle spawning method of the net.minecraft.client.renderer.RenderGlobal would be directly called.

Anyways to solve this problem the method sending the particles packet to the client should be called: public void func_175739_a(EnumParticleTypes p_175739_1_, double p_175739_2_, double p_175739_4_, double p_175739_6_, int p_175739_8_, double p_175739_9_, double p_175739_11_, double p_175739_13_, double p_175739_15_, int ... p_175739_17_) of the net.minecraft.world.WorldServer class

How to fix the bug

Instead of having the for loops to create the particles, the following could / should be used:

Snowman
  • Affected class: net.minecraft.block.BlockPumpkin
  • Affected method: private void createGolem(World worldIn, BlockPos p_180673_2_)
  • New code:
    var11 - The BlockPos at which the Snowman gets created
    var9 - The Snowman
    ((WorldServer) worldIn).func_175739_a(EnumParticleTypes.SNOW_SHOVEL, (double)var11.getX() + 0.5D, (double)var11.getY() + var9.height / 2, (double)var11.getZ() + 0.5D, 120, var9.width / 4, var9.height / 4, var9.width / 4, 0D, new int[0]);
    
VillagerGolem
  • Affected class: net.minecraft.block.BlockPumpkin
  • Affected method: private void createGolem(World worldIn, BlockPos p_180673_2_)
  • New code:
    var10 - The BlockPos at which the VillagerGolem gets created
    var13 - The VillagerGolem
    ((WorldServer) worldIn).func_175739_a(EnumParticleTypes.SNOWBALL, (double)var10.getX() + 0.5D, (double)var10.getY() + var13.height / 2, (double)var10.getZ() + 0.5D, 120, var13.width / 4, var13.height / 4, var13.width / 4, 0D, new int[0]);
    
WitherBoss
  • Affected class: net.minecraft.block.BlockSkull
  • Affected method: public void func_180679_a(World worldIn, BlockPos p_180679_2_, TileEntitySkull p_180679_3_)
  • New code:
    var12 - The BlockPos at which the WitherBoss gets created
    var14 - The WitherBoss
    ((WorldServer) worldIn).func_175739_a(EnumParticleTypes.SNOWBALL, (double)var12.getX() + 0.5D, (double)var12.getY() + var14.height / 2, (double)var12.getZ() + 0.5D, 120, var14.width / 4, var14.height / 4, var14.width / 4, 0D, new int[0]);
    

Note: In my opinion the particles should also be adjusted, so the VillagerGolem creates iron block breaking particles and the WitherBoss soul sand breaking particles.

Comment by Marcono1234 [ 11/Feb/16 ]

Confirmed for

  • 16w06a
Comment by Swekob [ 28/Nov/15 ]

Affects 15w47c & 1.8.8

Comment by [Mod] Sonicwave [ 20/Oct/14 ]

Confirmed for 1.8/1.8.1-pre2.

Comment by HJS [ 18/Sep/14 ]

you don't have to download the minecraft.jar for MC 1.2.5 you can use the launcher.

Comment by Tails [ 28/Mar/13 ]

Confirmed.

Comment by Kumasasa [ 01/Mar/13 ]

Chumbanotz, did you test every single issue against 13w09c in 2 minutes or do you blindly bulk-setting the version ?

Generated at Sun Jan 12 12:24:09 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.