Jump to content

Recommended Posts

Posted

Working on a client side mod that's heavily revolved around on particles. However, I tend to keep hitting the particle cap which causes a lot of them to despawn and ruin the functionality of the mod. Is there a way to increase the particle cap or to set a certain type of particle to ignore the cap?

Posted

Coming from the EffectRenderer class in net.minecraft.client.particle.EffectRenderer

 

    public void addEffect(EntityFX p_78873_1_)

    {

        if (p_78873_1_ == null) return;

        int i = p_78873_1_.getFXLayer();

        int j = p_78873_1_.func_174838_j() != 1.0F ? 0 : 1;

 

        if (this.fxLayers[j].size() >= 4000)

        {

            this.fxLayers[j].remove(0);

        }

 

        this.fxLayers[j].add(p_78873_1_);

    }

 

I would use asm (even though I dont know how to use it) to override this method. The thing thats causing it to limit is the( this.fxLayers[j].size() >= 4000 ). Hope this helps

 

Edit:This effectively means once you have too many particles they don't even despawn anymore, the game just removes them.

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

Posted

You don't need ASM, god.

 

In Minecraft.class:

    public EffectRenderer effectRenderer;

 

It is being initialized once on startup, you can easily extend EffectRenderer and write whatever you want there and then in startup event replace vanilla's one. (You will probably need to proxify stuff since there are some Side.CLIENT annotations).

1.7.10 is no longer supported by forge, you are on your own.

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.