Jump to content

[1.8] (SOLVED) make particle render from further away


sigurd4

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • file:///C:/Users/Danie/Downloads/Capture.JPG I keep experiencing this error, does anyone know how to fix it here is the report: file:///C:/Users/Danie/AppData/Roaming/.minecraft/crash-reports/Bug_report1.txt
    • Hi, i am unable to join a multiplayer server my friend and i created. We started it with some mods then decided to add some others and this is when the error appeared. We are using Curseforge, the server is in 1.20.1 . The full error message is "Internal Exception: io.netty.handler.codec.DecoderException: java.lang.ArrayIndexOutOfBoundsException: Index 17196645 out of bounds for length 13" I am the only one with that issue, my friends can log in and out no problem. I have tried switching minecraft account but that doesn't help so i guess the bug is on my side. We use the same mod profile so i know the error doesn't come from there. Here is the latest.log file https://pastebin.com/X6J9Fnnf. If you need more informations to try and investigate, please let me know. Big thanks to anyone that will try to help
    • [00:02:07] [main/ERROR]: Missing or unsupported mandatory dependencies:     Mod ID: 'kotlinforforge', Requested by: 'flightlib', Expected range: '[4.3.0,)', Actual version: '[MISSING]'     Mod ID: 'terrablender', Requested by: 'biomesoplenty', Expected range: '[2.2.0.154,)', Actual version: '[MISSING]'     Mod ID: 'geckolib', Requested by: 'cakescosmetics', Expected range: '[4.4,)', Actual version: '[MISSING]'     Mod ID: 'balm', Requested by: 'waystones', Expected range: '[7.2.0,)', Actual version: '[MISSING]'     Mod ID: 'oculus', Requested by: 'irisflw', Expected range: '[1.6.15,)', Actual version: '[MISSING]'     Mod ID: 'cupboard', Requested by: 'betterfpsdist', Expected range: '[1.20.1-1.5,)', Actual version: '[MISSING]' [00:02:53] [main/WARN]: Mod file C:\Users\ezkid\AppData\Roaming\.minecraft\libraries\net\minecraftforge\fmlcore\1.20.1-47.2.32\fmlcore-1.20.1-47.2.32.jar is missing mods.toml file [00:02:54] [main/WARN]: Mod file C:\Users\ezkid\AppData\Roaming\.minecraft\libraries\net\minecraftforge\javafmllanguage\1.20.1-47.2.32\javafmllanguage-1.20.1-47.2.32.jar is missing mods.toml file [00:02:54] [main/WARN]: Mod file C:\Users\ezkid\AppData\Roaming\.minecraft\libraries\net\minecraftforge\lowcodelanguage\1.20.1-47.2.32\lowcodelanguage-1.20.1-47.2.32.jar is missing mods.toml file [00:02:54] [main/WARN]: Mod file C:\Users\ezkid\AppData\Roaming\.minecraft\libraries\net\minecraftforge\mclanguage\1.20.1-47.2.32\mclanguage-1.20.1-47.2.32.jar is missing mods.toml file [00:02:65] [main/ERROR]: Skipping early mod setup due to previous error
    • Guns and more cool stuff
    • nvm i did it, turn out i just needed to install a drive or smth
  • Topics

×
×
  • Create New...

Important Information

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