Potion particles spread always from the north-west corner of a block, regardless of impact
Resolved
Fixed
52
The bug
The potion particles are not spawning in the middle of the block. They're spawning on the edge of the block. Does not happen when you use the following command with a command block:
Please re-open this issue. The bug is still prevalent in 14w27b. No matter where you throw a splash potion, the particles only appear on the North-West corner of the block they landed on.
The reason for that is that the method playAuxSFX(int p_175718_1_, BlockPos p_175718_2_, int p_175718_3_) in the /Client/src/net/minecraft/world/World.java class takes a BlockPos as argument (MCP 1.8 names). However BlockPos can only store three integers. This is also the reason why for example doors being broken display their particles in the center of the block (very likely). This method is not only used for rendering but also for the sound, which is the reason why the method used by the /particle command cannot be used for potions (as well as the fact that that method ignores the particle settings).
Edit: There are actually two methods of the net.minecraft.world.World class that could be used instead (together):
It also seems like the spread not only offsets to negative X and Z coordinates, but also to a negative Y coordinate. You could make splash potions sink into the ground by throwing them on end portal frames at a certain angle. The same applies to slabs and most slab-like blocks.
The packet for splash potions takes integers for the location, instead of floats or doubles.
Issue should probably be updated to include a feature request to change location parameters of (World) Effect packet ID 0x22 (34) to some floating point types.
Unfortunately, almost all of the effects that can be sent from this packet, make sense to only use block location, so this is probably not a big concern for the developers.
@@unknown, that is a separate issue and I created MC-172739 for it and attached your video there. Please comment on it if you want to become the reporter.
Use absolute coordinates and add .5 to the end of the x and z coordinates. It's the only advice I can offer.