Jump to content

Recommended Posts

Posted

Hi, I'm trying to spawn in the same particle effect a splash potion produces.

 

I've tried to do this by using an EntityAreaEffectCloud and tuning the radius, duration and RadiusPerTick parameters. However, as the name suggests, this always produces a 'cloud' and not a 'splash' type effect.

 

How can I simply instantiate a splash potion particle effect into a world? It does not need to have any potion effects etc. Merely the particles are what I'm interested in.

Posted

You can simply use World#playEvent(int type, BlockPos pos, int data) to spawn a splash potion effect, where type is the event to play, pos is the position, and data is the case-specific data.

 

In this case, you want either type 2002 or 2007 to play the splash effect. 2002 has the particles of a normal potion, while 2007 has the particles from an instant-effect potion (instant damage, for example). With this event, the data corresponds to the color of the potion particles.

  • Thanks 1

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.