add shaders, remove multi block layer
This commit is contained in:
parent
1e7ef94ceb
commit
563f235b2f
129 changed files with 1848 additions and 1486 deletions
|
@ -1,6 +1,6 @@
|
|||
package client.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL46;
|
||||
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.GlState;
|
||||
|
@ -14,13 +14,13 @@ public class SignRenderer extends ElementRenderer<TileEntitySign>
|
|||
{
|
||||
public void renderElements(TileEntitySign te, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL46.glPushMatrix();
|
||||
float f = 0.6666667F;
|
||||
|
||||
State state = te.getState();
|
||||
if (state.getBlock() instanceof BlockStandingSign)
|
||||
{
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
GL46.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
int r = state.getValue(BlockStandingSign.FACING).getIndex();
|
||||
float f1 = 0.0F;
|
||||
|
||||
|
@ -38,8 +38,8 @@ public class SignRenderer extends ElementRenderer<TileEntitySign>
|
|||
{
|
||||
f1 = -90.0F;
|
||||
}
|
||||
GL11.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, f * -0.0625f * 2.0f, 0.0F);
|
||||
GL46.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
GL46.glTranslatef(0.0F, f * -0.0625f * 2.0f, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -61,16 +61,16 @@ public class SignRenderer extends ElementRenderer<TileEntitySign>
|
|||
f2 = -90.0F;
|
||||
}
|
||||
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
GL11.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.3125F - f * 0.0625f * 0.5f, -0.4375F);
|
||||
GL46.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
GL46.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
GL46.glTranslatef(0.0F, -0.3125F - f * 0.0625f * 0.5f, -0.4375F);
|
||||
}
|
||||
|
||||
GlState.enableRescaleNormal();
|
||||
float f3 = 0.015625F * f;
|
||||
GL11.glTranslatef(0.0F, 0.5F * f, 0.1F * f);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
GL46.glTranslatef(0.0F, 0.5F * f, 0.1F * f);
|
||||
GL46.glScalef(f3, -f3, f3);
|
||||
GL46.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
GlState.depthMask(false);
|
||||
|
||||
for (int j = 0; j < te.text.length; ++j)
|
||||
|
@ -78,15 +78,15 @@ public class SignRenderer extends ElementRenderer<TileEntitySign>
|
|||
if (te.text[j] != null && !te.text[j].isEmpty())
|
||||
{
|
||||
String s = te.text[j].length() > 50 ? te.text[j].substring(0, 50) : te.text[j];
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.75f, 0.75f, 0.75f);
|
||||
GL46.glPushMatrix();
|
||||
GL46.glScalef(0.75f, 0.75f, 0.75f);
|
||||
Drawing.drawTextCenteredN(s, 0, j * (18 - 3) - 30, 0xff000000);
|
||||
GL11.glPopMatrix();
|
||||
GL46.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
GlState.depthMask(true);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL46.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue