aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-01-21 02:41:02 +0800
committerBuildTools <james.jenour@protonmail.com>2021-01-21 02:41:02 +0800
commitca13cc0c881480a8d3f0d653eab937f336fd870e (patch)
tree56ac6b5386bd7f42d39600ce90664e53fa8378bc /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
parent3255cfce951367c9303297205f64577ef1eac650 (diff)
downloadnotenoughupdates-ca13cc0c881480a8d3f0d653eab937f336fd870e.tar.gz
notenoughupdates-ca13cc0c881480a8d3f0d653eab937f336fd870e.tar.bz2
notenoughupdates-ca13cc0c881480a8d3f0d653eab937f336fd870e.zip
PRE8
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
index 763da0b5..de0d7406 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
@@ -703,7 +703,6 @@ public class CustomItemEffects {
public static void drawFilledBoundingBox(AxisAlignedBB p_181561_0_, float alpha, String special) {
Color c = new Color(SpecialColour.specialToChromaRGB(special), true);
- GlStateManager.color(c.getRed()/255f, c.getGreen()/255f, c.getBlue()/255f, c.getAlpha()/255f*alpha);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
@@ -712,6 +711,8 @@ public class CustomItemEffects {
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
+ GlStateManager.color(c.getRed()/255f, c.getGreen()/255f, c.getBlue()/255f, c.getAlpha()/255f*alpha);
+
//vertical
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
@@ -720,18 +721,21 @@ public class CustomItemEffects {
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.maxZ).endVertex();
tessellator.draw();
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
- worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
- worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
- worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
+ worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
+ worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
+ worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
tessellator.draw();
- //x
+
+ GlStateManager.color(c.getRed()/255f*0.8f, c.getGreen()/255f*0.8f, c.getBlue()/255f*0.8f, c.getAlpha()/255f*alpha);
+
+ //x
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
- worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
- worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
- worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.maxZ).endVertex();
+ worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
+ worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
+ worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
tessellator.draw();
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
@@ -740,12 +744,14 @@ public class CustomItemEffects {
worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.minY, p_181561_0_.maxZ).endVertex();
tessellator.draw();
+
+ GlStateManager.color(c.getRed()/255f*0.9f, c.getGreen()/255f*0.9f, c.getBlue()/255f*0.9f, c.getAlpha()/255f*alpha);
//z
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
- worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
- worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
- worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
+ worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.minZ).endVertex();
+ worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
+ worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.minZ).endVertex();
tessellator.draw();
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.minY, p_181561_0_.maxZ).endVertex();
@@ -753,7 +759,6 @@ public class CustomItemEffects {
worldrenderer.pos(p_181561_0_.maxX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.maxZ).endVertex();
tessellator.draw();
-
}
public static void drawFilledBoundingBoxSide(AxisAlignedBB p_181561_0_, EnumFacing facing, float alpha, String special) {