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

I am building a utility that will allow me to generate the code for my configs more easily, but I need to figure out how the Note Particle's color is generated as the particle will be a possible option in my configs. The code I have found in the NoteParticle.class (featured below) will only generate gray particles, even though there are numerous colors you can get. When doing the particle command only 1 value controls the color ranging from 0.0(green) up to 1.0(also green). Because of this I know a simple rgb to hex and hex to rgb coverter in my utility will not be enough without some other step that I cannot figure out. Anyone have any ideas on where to look or what is going on?

private NoteParticle(World p_i51018_1_, double p_i51018_2_, double p_i51018_4_, double p_i51018_6_, double p_i51018_8_) {
  super(p_i51018_1_, p_i51018_2_, p_i51018_4_, p_i51018_6_, 0.0D, 0.0D, 0.0D);
  this.particleRed = Math.max(0.0F, MathHelper.sin(((float)p_i51018_8_ + 0.0F) * ((float)Math.PI * 2F)) * 0.65F + 0.35F);
  this.particleGreen = Math.max(0.0F, MathHelper.sin(((float)p_i51018_8_ + 0.33333334F) * ((float)Math.PI * 2F)) * 0.65F + 0.35F);
  this.particleBlue = Math.max(0.0F, MathHelper.sin(((float)p_i51018_8_ + 0.6666667F) * ((float)Math.PI * 2F)) * 0.65F + 0.35F);
}

(Not the full constructor, but the relevant code for what I have found)

Edited by saxon564

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.