Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello,

 

I was wondering if there was a way to spawn particles with modified colors. Specifically, I'd like to spawn EnumParticleTypes.DRIP_WATER but orange. (It's supposed to be like tree sap dripping from the tree.)

 

Does anyone know how to accomplish this?

You would either need to create your own particle class or use WorldRenderer#addParticleUnchecked(it's private so you need reflection) that gets you the reference to the added particle so you can manually change it's colour fields. 

That is assuming 1.13.2. In 1.12 the method you need is RenderGlobal#spawnParticle0.

You could also use ParticleManager#spawnEffectParticle(1.12) or ParticleManager#addParticle(1.13) but you would need to replicate some checks WorldRenderer does.

You could also iterate the particle list(it is also private), find your particle there and change it's colour fields.

11 hours ago, V0idWa1k3r said:

You could also iterate the particle list(it is also private), find your particle there and change it's colour fields.

How would I go about doing that? I'm in 1.12, so would I end up using RenderGlobal#spawnParticle() or something else?

14 hours ago, Wolftopia said:

How would I go about doing that?

I just told you. Use reflection to access the list, iterate it, find your particle in it(likely based on it's position) and change the colour fields. I wouldn't recommend this way though.

 

14 hours ago, Wolftopia said:

would I end up using RenderGlobal#spawnParticle()

Sure, you can do that, that's one of the ways I've suggested.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.