Posted January 17, 201510 yr 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!
January 17, 201510 yr 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
January 18, 201510 yr Author thank you! i can't believe i didnt see that. fyi im spawning a redstone particle for a laserbeam that i made. it's pretty neat. http://www.planetminecraft.com/member/sigurd4 I'm making the bioshock mod!
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.