mojira.dev
MC-45749

Potion particles spread always from the north-west corner of a block, regardless of impact

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:

/particle <particle> ~0 ~1 ~0 0 0 0 1 1

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

MC-60528 When throwing potions, particles display elsewhere than where the entity hits the ground MC-68044 Splash potion particles are always at X: -.0 Z: -.0 MC-68785 Potion particles spawn wrong position when hit on the ground MC-69534 Splash potion particles on wrong location MC-76768 Thrown Enchanted bottle is displayed in the wrong place MC-84157 Splash Water Bottle particles are off-setted MC-84388 Bottles O' Enchanting incorrect particle placement MC-85419 Splash Potion particles up to ~1.4 block away from splash point MC-85742 Splash potion particles only spawn from the lower northwest corner of the block MC-87738 Splash Potion/Lingering Potion Radius and particles are off-center MC-91456 Potion Particles. MC-92779 Splash Potion MC-92961 Splash and lingering potions splash it's corresponding effects adjacent to the block of where it lands. MC-94228 Splash Potion Particles are Offset MC-102115 Splash potion particles are off center MC-102307 Splash potion particles appear in the wrong place MC-107158 Splash potions produce particles from north-west corner of a block it landed on MC-108643 When a thrown potion breaks, the particles show in the negative most corner of the block MC-112367 Splash Potion particles appear offset from landing point MC-113417 If you throw a bottle of enchanting the particles will land next to it instead of on it MC-121883 Thrown potions always land on lowest x+z coordinate of a block MC-129067 Splash potion hit effect displays always at north-west corner of block. MC-132047 Splash potion particles offset MC-140773 Experience Bottles Particles are offset MC-141856 Incorrect splash potion particle MC-142426 Miss aligned potion splash MC-146029 Splash potion particles always displayed on block edge MC-180328 Splash Potion Particles don't show up at the right location MC-188039 splash potion particle don't appear where you throw the potion

Attachments

Comments

Squid Eevee

Use absolute coordinates and add .5 to the end of the x and z coordinates. It's the only advice I can offer.

kumasasa

Fixed in 14w05b.

Tested with

/particle mobSpell ~0 ~1 ~0 0 0 0 1 5
Curtis Parmenter

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.

kumasasa

Reopened and confirmed.

Layu

Confirmed 1.8-pre1

Layu

Confirmed 1.8-pre2

[Mod] redstonehelper

Affects 1.8.

marcono1234

Confirmed for

  • 1.8.2-pre1

insomniac_lemon

Still affects 1.8.3.

Mason Ginter

Affects 1.8.4

Wyatt Boyle

Still affecting 1.8.5 : http://prntscr.com/78hpcl

IconByte

Affects 15w31a!

Sonicwave

Confirmed for 15w32b.

Julian Mills

Still confirmed for 15w33a. I hope this gets fixed now there are new Lingering potions

IconByte

Affects 15w33b.

IconByte

Affects 15w34a.

IconByte

Affects 15w34d.

[Mod] redstonehelper

Mathias K.: Since the original reporter seems inactive I've given you the ticket. Take good care of it 🙂

wobst.michael

Bug confirmed for 15w47a.

Logical_Cyclops

Bug is still existent in 15w47b.

Logical_Cyclops

This bug affects 15w47c.

marcono1234

Confirmed for

  • 15w50a

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):

  • playSoundEffect(double x, double y, double z, String soundName, float volume, float pitch)

  • spawnParticle(EnumParticleTypes p_175688_1_, double p_175688_2_, double p_175688_4_, double p_175688_6_, double p_175688_8_, double p_175688_10_, double p_175688_12_, int ... p_175688_14_)

Wyatt Boyle

still in 1.9.4

CreeperMagnet_

Can confirm for 17w50a. Please update the affected versions for said version.

CreeperMagnet_

Still affects 18w05a, please update!

CreeperMagnet_

Affects 18w09a.

JARvis

Yet confirmed in latest -release and -snapshot versions. Seems to be a simple bug with unnecessary float -> integer conversions of x/y/z coordinates.

CreeperMagnet_

Affects 1.13-pre6. Please keep the issue updated accordingly.

muzikbike

Affects 1.13-pre7

gaspoweredpick

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.

Binary Banana

Present in 1.14.4 and all prior versions...

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.

muzikbike

Relates closely to MC-76810

Logical_Cyclops

Affects 1.15 and 1.15.1 pre-release 1.

pneuma

Also Eye of Ender broken particles are offset.

[media]
marcono1234

@@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.

numeritos

Affects 1.16 pre5

Binary Banana

Resolved? in 1.16 Pre-release 6.
Splash potion particles now always spread from the center of the block, regardless of impact

cvsd

muzikbike

Panda4994

Confirmed

Low

Networking, Particles, Rendering

corner, incorrect-particle-generation, north-west, particle, splash-potion

Minecraft 14w04b, Minecraft 14w27b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 14w34b, ..., 20w21a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 5

Minecraft 14w05b, 1.16 Pre-release 6

Retrieved