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

currently, other than spawning them, i havent really been messing around with particles yet. how would i go about making my particle render from further away from the player? is that possible? there are two alternatives i can think of at the moment (i dont know much about this)

1: make a new particle extending the one i use, but set to be rendered from further away (i have no idea how to do that, though, and if there is an easier way i'd prefer that),

2: use something i've only heard about, called tesselator (or something like that), which allows me to do rendering-related stuff.

 

is there another way? which is simplest? and how would i go about doing that?

http://www.planetminecraft.com/member/sigurd4

I'm making the bioshock mod!

What particles are you talking about?

 

If you are spawning  them using World.spawnParticle():

    @SideOnly(Side.CLIENT)
    public void spawnParticle(EnumParticleTypes particleType, boolean p_175682_2_, double p_175682_3_, double p_175682_5_, double p_175682_7_, double p_175682_9_, double p_175682_11_, double p_175682_13_, int ... p_175682_15_)
    {
        this.spawnParticle(particleType.getParticleID(), particleType.func_179344_e() | p_175682_2_, p_175682_3_, p_175682_5_, p_175682_7_, p_175682_9_, p_175682_11_, p_175682_13_, p_175682_15_);
    }

The second parameter is a boolean, if you set it to true, it should spawn the effect regardless of how far away the player is.

 

(From RenderGlobal.spawnEntityFX(): 
    private EntityFX spawnEntityFX(int p_174974_1_, boolean p_174974_2_, double p_174974_3_, double p_174974_5_, double p_174974_7_, double p_174974_9_, double p_174974_11_, double p_174974_13_, int ... p_174974_15_)
    {
//....

            if (p_174974_2_)  {  // if force render
                return this.mc.effectRenderer.spawnEffectParticle(p_174974_1_, p_174974_3_, p_174974_5_, p_174974_7_, p_174974_9_, p_174974_11_, p_174974_13_, p_174974_15_);
            }  else  { // check distance d6 = delta X, d7  = delta y, d8 = delta z -> if distance is more than 16 (sq distance > 16*16 = 256), don't render
                double d9 = 16.0D;
                return d6 * d6 + d7 * d7 + d8 * d8 > 256.0D ? null : (k > 1 ? null : this.mc.effectRenderer.spawnEffectParticle(p_174974_1_, p_174974_3_, p_174974_5_, p_174974_7_, p_174974_9_, p_174974_11_, p_174974_13_, p_174974_15_));
            }

 

-TGG

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.