mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed water not rendering behind shield particles
This commit is contained in:
parent
d9dbf56b64
commit
eeb35bba9c
2 changed files with 13 additions and 3 deletions
|
@ -65,12 +65,9 @@ public class ModelSphere {
|
||||||
|
|
||||||
GlStateManager.disableTexture2D();
|
GlStateManager.disableTexture2D();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
GlStateManager.enableColorMaterial();
|
|
||||||
GlStateManager.colorMaterial(1032, 5634);
|
|
||||||
|
|
||||||
drawShape();
|
drawShape();
|
||||||
|
|
||||||
GlStateManager.disableColorMaterial();
|
|
||||||
GlStateManager.disableAlpha();
|
GlStateManager.disableAlpha();
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ import net.minecraft.client.renderer.BufferBuilder;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.model.ModelSphere;
|
import com.minelittlepony.unicopia.model.ModelSphere;
|
||||||
import com.minelittlepony.unicopia.particle.IAttachableParticle;
|
import com.minelittlepony.unicopia.particle.IAttachableParticle;
|
||||||
import com.minelittlepony.unicopia.spell.ICaster;
|
import com.minelittlepony.unicopia.spell.ICaster;
|
||||||
|
@ -71,12 +74,22 @@ public class ParticleSphere extends Particle implements IAttachableParticle {
|
||||||
return;
|
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);
|
Color.glColor(tint, alpha);
|
||||||
|
|
||||||
model.setPosition(posX, posY, posZ);
|
model.setPosition(posX, posY, posZ);
|
||||||
model.render(radius);
|
model.render(radius);
|
||||||
|
|
||||||
|
|
||||||
GlStateManager.color(1, 1, 1, 1);
|
GlStateManager.color(1, 1, 1, 1);
|
||||||
|
|
||||||
|
GL11.glPopAttrib();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue