Fixed water not rendering behind shield particles

This commit is contained in:
Sollace 2019-02-09 22:54:56 +02:00
parent d9dbf56b64
commit eeb35bba9c
2 changed files with 13 additions and 3 deletions

View file

@ -65,12 +65,9 @@ public class ModelSphere {
GlStateManager.disableTexture2D();
GlStateManager.enableAlpha();
GlStateManager.enableColorMaterial();
GlStateManager.colorMaterial(1032, 5634);
drawShape();
GlStateManager.disableColorMaterial();
GlStateManager.disableAlpha();
GlStateManager.enableTexture2D();

View file

@ -5,6 +5,9 @@ import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import com.minelittlepony.unicopia.model.ModelSphere;
import com.minelittlepony.unicopia.particle.IAttachableParticle;
import com.minelittlepony.unicopia.spell.ICaster;
@ -71,12 +74,22 @@ public class ParticleSphere extends Particle implements IAttachableParticle {
return;
}
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GlStateManager.depthMask(false);
GlStateManager.shadeModel(GL11.GL_SMOOTH);
GlStateManager.tryBlendFuncSeparate(
GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA,
GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
Color.glColor(tint, alpha);
model.setPosition(posX, posY, posZ);
model.render(radius);
GlStateManager.color(1, 1, 1, 1);
GL11.glPopAttrib();
}
@Override