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.

Mariobro85

Members
  • Joined

  • Last visited

Everything posted by Mariobro85

  1. While Fabulous graphics make the particles render behind stained glass and water, the particle rendering itself didn't change. I guess this is just how Minecraft handles particle transparency - at least the behaviour works well Thank you!
  2. @Override public IParticleRenderType getRenderType() { return IParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } It already is.
  3. Hello everyone, I just started modding with Forge and am currently working on custom particles. The particles themselves work perfectly, however, transparent particles make other particles behind them invisible. I know this issue is also present in Vanilla Minecraft and I was hoping that it could be eliminated with Forge since it makes particles with a lot of semi-transparent pixels ugly (as you can see in the attachment). This is the code I use for all my particles: public void renderParticle(IVertexBuilder buffer, ActiveRenderInfo renderInfo, float partialTicks) { RenderSystem.disableDepthTest(); RenderSystem.depthMask(false); RenderSystem.defaultAlphaFunc(); Vector3d vector3d = renderInfo.getProjectedView(); float f = (float)(MathHelper.lerp((double)partialTicks, this.prevPosX, this.posX) - vector3d.getX()); float g = (float)(MathHelper.lerp((double)partialTicks, this.prevPosY, this.posY) - vector3d.getY()); float h = (float)(MathHelper.lerp((double)partialTicks, this.prevPosZ, this.posZ) - vector3d.getZ()); Quaternion quaternion; if(this.particleAngle == 0.0F){ quaternion = renderInfo.getRotation(); } else{ quaternion = new Quaternion(renderInfo.getRotation()); float f3 = MathHelper.lerp(partialTicks, this.prevParticleAngle, this.particleAngle); quaternion.multiply(Vector3f.ZP.rotation(f3)); } Vector3f vector3f1 = new Vector3f(-1.0F, -1.0F, 0.0F); vector3f1.transform(quaternion); Vector3f[] avector3f = new Vector3f[]{new Vector3f(-1.0F, -1.0F, 0.0F), new Vector3f(-1.0F, 1.0F, 0.0F), new Vector3f(1.0F, 1.0F, 0.0F), new Vector3f(1.0F, -1.0F, 0.0F)}; float f4 = this.getScale(partialTicks); for(int i = 0; i < 4; ++i) { Vector3f vector3f = avector3f[i]; vector3f.transform(quaternion); vector3f.mul(f4); vector3f.add(f, g, h); } float f7 = this.getMinU(); float f8 = this.getMaxU(); float f5 = this.getMinV(); float f6 = this.getMaxV(); int j = this.getBrightnessForRender(partialTicks); buffer.pos((double)avector3f[0].getX(), (double)avector3f[0].getY(), (double)avector3f[0].getZ()).tex(f8, f6).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j).endVertex(); buffer.pos((double)avector3f[1].getX(), (double)avector3f[1].getY(), (double)avector3f[1].getZ()).tex(f8, f5).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j).endVertex(); buffer.pos((double)avector3f[2].getX(), (double)avector3f[2].getY(), (double)avector3f[2].getZ()).tex(f7, f5).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j).endVertex(); buffer.pos((double)avector3f[3].getX(), (double)avector3f[3].getY(), (double)avector3f[3].getZ()).tex(f7, f6).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j).endVertex(); RenderSystem.enableDepthTest(); RenderSystem.depthMask(true); } I tried the disableDepthTest() and depthMask(false) methods because they appearantly worked for an older version of Minecraft, but they have no effect in 1.16.5. The defaultAlphaFunc() method makes the texture look a bit smoother, but that's about it. I also played around with other methods of RenderSystem, but I just kept making it worse that it already is. Does anyone have a solution for this? Thanks in advance!

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.