1
0
Fork 0

revert some rendering changes, fix colored lighting

This commit is contained in:
Sen 2025-09-01 09:38:58 +02:00
parent 4862b7c9b5
commit 02f3146aea
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
98 changed files with 1248 additions and 1332 deletions

View file

@ -30,7 +30,7 @@ import javax.imageio.ImageIO;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import org.lwjgl.opengl.GL; import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.audio.AudioInterface; import client.audio.AudioInterface;
import client.audio.MidiBank; import client.audio.MidiBank;
@ -318,6 +318,12 @@ public class Client implements IThreadListener {
} }
} }
public static class LightFunction implements FloatFunction {
public void apply(FloatVar cv, float value) {
Client.CLIENT.renderer.loadRenderers();
}
}
private interface DebugRunner { private interface DebugRunner {
void execute(Keysym key); void execute(Keysym key);
} }
@ -485,6 +491,8 @@ public class Client implements IThreadListener {
public boolean interrupted; public boolean interrupted;
public boolean freecam; public boolean freecam;
public boolean servercam; public boolean servercam;
public boolean shaders;
public boolean mipmaps;
private int leftClickCounter; private int leftClickCounter;
private int rightClickTimer; private int rightClickTimer;
@ -701,12 +709,10 @@ public class Client implements IThreadListener {
@Variable(name = "mid_visualizer", category = CVarCategory.SOUND, display = "Visualisation") @Variable(name = "mid_visualizer", category = CVarCategory.SOUND, display = "Visualisation")
public boolean midiVisualizer = true; public boolean midiVisualizer = true;
@Variable(name = "gl_light_blend", category = CVarCategory.RENDER, min = 0.0f, max = 1.0f, precision = 2, unit = "%", display = "Lichtüberdeckung")
public float lightBlend = 0.5f;
@Variable(name = "gl_tex_mipmaps", category = CVarCategory.RENDER, display = "Mipmaps", callback = MipmapFunction.class) @Variable(name = "gl_tex_mipmaps", category = CVarCategory.RENDER, display = "Mipmaps", callback = MipmapFunction.class)
private MipmapType mipmapType = MipmapType.LINEAR; private MipmapType mipmapType = MipmapType.NONE;
@Variable(name = "gl_use_shader", category = CVarCategory.RENDER, display = "Shader verwenden") @Variable(name = "gl_use_shader", category = CVarCategory.RENDER, display = "Shader verwenden")
public boolean useShader = true; public boolean useShader = false;
public static final Client CLIENT = new Client(); public static final Client CLIENT = new Client();
@ -843,6 +849,7 @@ public class Client implements IThreadListener {
Font.unloadFonts(); Font.unloadFonts();
Font.loadFonts(); Font.loadFonts();
Font.select(this.font); Font.select(this.font);
if(this.shaders)
Shader.loadShaders(); Shader.loadShaders();
this.textureManager.onReload(); this.textureManager.onReload();
this.modelManager.onReload(); this.modelManager.onReload();
@ -859,19 +866,21 @@ public class Client implements IThreadListener {
this.textureManager = new TextureManager(); this.textureManager = new TextureManager();
this.textureManager.onReload(); this.textureManager.onReload();
this.soundManager = new SoundManager(this); this.soundManager = new SoundManager(this);
Log.RENDER.debug("Maximale Texturgröße: %d", GL46.glGetInteger(GL46.GL_MAX_TEXTURE_SIZE)); Log.RENDER.debug("Maximale Texturgröße: %d", GL15.glGetInteger(GL15.GL_MAX_TEXTURE_SIZE));
Log.RENDER.debug("Shader verfügbar: %s", (this.shaders = GL.getCapabilities().OpenGL20) ? "Ja (OpenGL 2.0+)" : "Nein (OpenGL 1.5)");
Log.RENDER.debug("Mipmaps verfügbar: %s", (this.mipmaps = GL.getCapabilities().OpenGL30) ? "Ja (OpenGL 3.0+)" : "Nein (OpenGL 1.5-2.1)");
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
GL46.glClearDepth(1.0D); GL15.glClearDepth(1.0D);
GlState.enableDepth(); GlState.enableDepth();
GlState.depthFunc(GL46.GL_LEQUAL); GlState.depthFunc(GL15.GL_LEQUAL);
GlState.enableAlpha(); GlState.enableAlpha();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
GlState.cullFace(GL46.GL_BACK); GlState.cullFace(GL15.GL_BACK);
GlState.enableCull(); GlState.enableCull();
GL46.glMatrixMode(GL46.GL_PROJECTION); GL15.glMatrixMode(GL15.GL_PROJECTION);
GL46.glLoadIdentity(); GL15.glLoadIdentity();
GL46.glMatrixMode(GL46.GL_MODELVIEW); GL15.glMatrixMode(GL15.GL_MODELVIEW);
this.textureMap = new TextureMap(); this.textureMap = new TextureMap();
this.textureManager.loadTexture(TextureMap.BLOCKS, this.textureMap); this.textureManager.loadTexture(TextureMap.BLOCKS, this.textureMap);
this.updateTexture(); this.updateTexture();
@ -1000,7 +1009,7 @@ public class Client implements IThreadListener {
{ {
this.controller.update(); this.controller.update();
} }
this.textureMap.update(); this.textureMap.update(this.mipmaps && this.mipmapType != MipmapType.NONE);
if (this.open != null) if (this.open != null)
{ {
this.open.updateScreen(); this.open.updateScreen();
@ -1100,13 +1109,13 @@ public class Client implements IThreadListener {
} }
public void render() { public void render() {
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA);
GlState.enableDepth(); GlState.enableDepth();
GlState.clearColor(0.0f, 0.0f, 0.0f, 1.0f); GlState.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
GL46.glClear(GL46.GL_COLOR_BUFFER_BIT | GL46.GL_DEPTH_BUFFER_BIT); GL15.glClear(GL15.GL_COLOR_BUFFER_BIT | GL15.GL_DEPTH_BUFFER_BIT);
if(this.wireframe) { if(this.wireframe) {
GL46.glLineWidth(1.0f); GL15.glLineWidth(1.0f);
GL46.glPolygonMode(GL46.GL_FRONT_AND_BACK, GL46.GL_LINE); GL15.glPolygonMode(GL15.GL_FRONT_AND_BACK, GL15.GL_LINE);
} }
if(this.open == null) { if(this.open == null) {
if(this.player != null && this.viewEntity == this.player) if(this.player != null && this.viewEntity == this.player)
@ -1119,18 +1128,18 @@ public class Client implements IThreadListener {
this.soundManager.setListener(this.player, (float)this.tickFraction); this.soundManager.setListener(this.player, (float)this.tickFraction);
if(this.player != null && (this.player.isEntityInsideOpaqueBlock() || this.viewEntity != this.player)) if(this.player != null && (this.player.isEntityInsideOpaqueBlock() || this.viewEntity != this.player))
this.thirdPersonView = 0; this.thirdPersonView = 0;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glClear(16640); GL15.glClear(GL15.GL_COLOR_BUFFER_BIT | GL15.GL_DEPTH_BUFFER_BIT);
GlState.enableTexture2D(); GlState.enableTexture2D();
if(this.world != null) if(this.world != null)
this.renderer.renderWorld((float)this.tickFraction, System.nanoTime() - this.tickStart); this.renderer.renderWorld((float)this.tickFraction, System.nanoTime() - this.tickStart);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.disableCull(); GlState.disableCull();
GlState.enableBlend(); GlState.enableBlend();
if(this.wireframe) if(this.wireframe)
GL46.glPolygonMode(GL46.GL_FRONT_AND_BACK, GL46.GL_FILL); GL15.glPolygonMode(GL15.GL_FRONT_AND_BACK, GL15.GL_FILL);
} }
private int drawStat(int x, int y, String name, int value, int max, int color) { private int drawStat(int x, int y, String name, int value, int max, int color) {
@ -1327,17 +1336,17 @@ public class Client implements IThreadListener {
} }
GlState.bindTexture(0); GlState.bindTexture(0);
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.enableTexture2D(); GlState.enableTexture2D();
if(this.world != null && this.open == null && this.player != null && this.viewEntity == this.player) { if(this.world != null && this.open == null && this.player != null && this.viewEntity == this.player) {
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GlState.enableBlend(); GlState.enableBlend();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
ItemRenderer.enableGUIStandardItemLighting(); ItemRenderer.enableGUIStandardItemLighting();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0f, (float)by, 0.0f); GL15.glTranslatef(0.0f, (float)by, 0.0f);
if(this.scaleHotbar) if(this.scaleHotbar)
GL46.glScalef(2.0f, 2.0f, 2.0f); GL15.glScalef(2.0f, 2.0f, 2.0f);
int xPos = xoff; int xPos = xoff;
for(int index = 0; index < size; ++index) { for(int index = 0; index < size; ++index) {
@ -1345,12 +1354,12 @@ public class Client implements IThreadListener {
if(itemstack != null) { if(itemstack != null) {
if(width < 20 && selected != index && selected != index + 1 && index != size - 1) { if(width < 20 && selected != index && selected != index + 1 && index != size - 1) {
this.scissor(xPos * scale, this.fbY - (by + 16 * scale), (width - 1) * scale, 16 * scale); this.scissor(xPos * scale, this.fbY - (by + 16 * scale), (width - 1) * scale, 16 * scale);
GL46.glEnable(GL46.GL_SCISSOR_TEST); GL15.glEnable(GL15.GL_SCISSOR_TEST);
} }
GlState.enableDepth(); GlState.enableDepth();
this.renderItem.renderItemAndEffectIntoGUI(itemstack, xPos, 0); this.renderItem.renderItemAndEffectIntoGUI(itemstack, xPos, 0);
if(width < 20 && selected != index && selected != index + 1 && index != size - 1) if(width < 20 && selected != index && selected != index + 1 && index != size - 1)
GL46.glDisable(GL46.GL_SCISSOR_TEST); GL15.glDisable(GL15.GL_SCISSOR_TEST);
} }
xPos += width >= 20 || selected == index || selected == index + 1 ? 20 : width; xPos += width >= 20 || selected == index || selected == index + 1 ? 20 : width;
} }
@ -1362,16 +1371,16 @@ public class Client implements IThreadListener {
else if(this.pointed != null && this.pointed.type == ObjectType.ENTITY && this.pointed.entity != null) else if(this.pointed != null && this.pointed.type == ObjectType.ENTITY && this.pointed.entity != null)
item = this.pointed.entity.getItem(); item = this.pointed.entity.getItem();
if(item != null) { if(item != null) {
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)(this.fbX / 2 - 180 + 4 + 1), (float)(this.hudMargin + 20 + 1), 0.0f); GL15.glTranslatef((float)(this.fbX / 2 - 180 + 4 + 1), (float)(this.hudMargin + 20 + 1), 0.0f);
GL46.glScalef(2.0f, 2.0f, 2.0f); GL15.glScalef(2.0f, 2.0f, 2.0f);
GlState.enableDepth(); GlState.enableDepth();
this.renderItem.renderItemAndEffectIntoGUI(new ItemStack(item), 0, 0); this.renderItem.renderItemAndEffectIntoGUI(new ItemStack(item), 0, 0);
} }
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
ItemRenderer.disableStandardItemLighting(); ItemRenderer.disableStandardItemLighting();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GlState.disableBlend(); GlState.disableBlend();
@ -1440,8 +1449,8 @@ public class Client implements IThreadListener {
"Tickrate: %s%.2f" + Color.RESET + " %s [" + Color.GREEN + "%.1f" + Color.RESET + "], %.3f ms, E %d ms" + "Tickrate: %s%.2f" + Color.RESET + " %s [" + Color.GREEN + "%.1f" + Color.RESET + "], %.3f ms, E %d ms" +
"%s%s" "%s%s"
, ,
GL46.glGetString(GL46.GL_VERSION), GL15.glGetString(GL15.GL_VERSION),
GL46.glGetString(GL46.GL_RENDERER), GL46.glGetString(GL46.GL_VENDOR), GL15.glGetString(GL15.GL_RENDERER), GL15.glGetString(GL15.GL_VENDOR),
this.framecode(), this.framerate < 1.0f ? 1.0f / this.framerate : this.framerate, this.framerate < 1.0f ? "SPF" : "FPS", this.framecode(), this.framerate < 1.0f ? 1.0f / this.framerate : this.framerate, this.framerate < 1.0f ? "SPF" : "FPS",
this.vsync ? Color.DARK_GRAY + "VSYNC" : (this.syncLimited ? Color.GREEN + "" + this.syncLimit : Color.RED + "UNL"), this.vsync ? Color.DARK_GRAY + "VSYNC" : (this.syncLimited ? Color.GREEN + "" + this.syncLimit : Color.RED + "UNL"),
(float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY, (float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
@ -2125,7 +2134,7 @@ public class Client implements IThreadListener {
} }
private void fbsize(int x, int y) { private void fbsize(int x, int y) {
GL46.glViewport(0, 0, x, y); GL15.glViewport(0, 0, x, y);
this.fbRawX = x; this.fbRawX = x;
this.fbRawY = y; this.fbRawY = y;
this.rescale(); this.rescale();
@ -2308,22 +2317,22 @@ public class Client implements IThreadListener {
public void setupOverlay() { public void setupOverlay() {
GlState.disableDepth(); GlState.disableDepth();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ONE_MINUS_SRC_ALPHA);
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.color(1.0f, 1.0f, 1.0f, 1.0f); GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
GL46.glClear(256); GL15.glClear(GL15.GL_DEPTH_BUFFER_BIT);
GL46.glMatrixMode(GL46.GL_PROJECTION); GL15.glMatrixMode(GL15.GL_PROJECTION);
GL46.glLoadIdentity(); GL15.glLoadIdentity();
GL46.glOrtho(0.0D, (double)this.fbRawX, (double)this.fbRawY, 0.0D, 1000.0D, 3000.0D); GL15.glOrtho(0.0D, (double)this.fbRawX, (double)this.fbRawY, 0.0D, 1000.0D, 3000.0D);
GL46.glMatrixMode(GL46.GL_MODELVIEW); GL15.glMatrixMode(GL15.GL_MODELVIEW);
GL46.glLoadIdentity(); GL15.glLoadIdentity();
GL46.glTranslatef(0.0F, 0.0F, -2000.0F); GL15.glTranslatef(0.0F, 0.0F, -2000.0F);
if(this.scale != 1) if(this.scale != 1)
GL46.glScalef((float)this.scale, (float)this.scale, 1.0f); GL15.glScalef((float)this.scale, (float)this.scale, 1.0f);
} }
public void scissor(int x, int y, int width, int height) { public void scissor(int x, int y, int width, int height) {
GL46.glScissor(x * this.scale, y * this.scale, width * this.scale, height * this.scale); GL15.glScissor(x * this.scale, y * this.scale, width * this.scale, height * this.scale);
} }
private void addFrame(long runningTime) private void addFrame(long runningTime)
@ -2363,13 +2372,13 @@ public class Client implements IThreadListener {
if(!Window.createWindow(VERSION, System.getProperty("opengl.debug") != null)) if(!Window.createWindow(VERSION, System.getProperty("opengl.debug") != null))
System.exit(1); System.exit(1);
GL.createCapabilities(); GL.createCapabilities();
if(!GL.getCapabilities().OpenGL46) { if(!GL.getCapabilities().OpenGL15) {
Window.destroyWindow(); Window.destroyWindow();
Util.panic("Inkompatible OpenGL-Version", "OpenGL 4.6 oder höher ist erforderlich, um dieses Programm auszuführen."); Util.panic("Inkompatible OpenGL-Version", "OpenGL 1.5 oder höher ist erforderlich, um dieses Programm auszuführen.");
} }
Log.SYSTEM.info("OpenGL %s", GL46.glGetString(GL46.GL_VERSION)); Log.SYSTEM.info("OpenGL %s", GL15.glGetString(GL15.GL_VERSION));
Log.SYSTEM.info("GL_VENDOR: %s", GL46.glGetString(GL46.GL_VENDOR)); Log.SYSTEM.info("GL_VENDOR: %s", GL15.glGetString(GL15.GL_VENDOR));
Log.SYSTEM.info("GL_RENDERER: %s", GL46.glGetString(GL46.GL_RENDERER)); Log.SYSTEM.info("GL_RENDERER: %s", GL15.glGetString(GL15.GL_RENDERER));
Log.SYSTEM.info("Starte ..."); Log.SYSTEM.info("Starte ...");
this.init(); this.init();
@ -2379,8 +2388,9 @@ public class Client implements IThreadListener {
Font.loadFonts(); Font.loadFonts();
Font.select(this.font); Font.select(this.font);
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA);
this.initConsole(); this.initConsole();
if(this.shaders)
Shader.loadShaders(); Shader.loadShaders();
this.startSound(true); this.startSound(true);
this.vidMode = Window.getDisplayMode(); this.vidMode = Window.getDisplayMode();
@ -2410,7 +2420,7 @@ public class Client implements IThreadListener {
Bind.updateBinds(); Bind.updateBinds();
this.input(); this.input();
Bind.enableInput(); Bind.enableInput();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.bindTexture(0); GlState.bindTexture(0);
this.inputGui(); this.inputGui();
if(this.open != null) if(this.open != null)
@ -2427,7 +2437,7 @@ public class Client implements IThreadListener {
this.finish(); this.finish();
PerfSection.SWAP.enter(); PerfSection.SWAP.enter();
if(this.glFlush) if(this.glFlush)
GL46.glFlush(); GL15.glFlush();
Window.swapBuffers(); Window.swapBuffers();
PerfSection.EVENTS.enter(); PerfSection.EVENTS.enter();
Log.flushLog(); Log.flushLog();
@ -2451,6 +2461,7 @@ public class Client implements IThreadListener {
Log.flushLog(); Log.flushLog();
this.save(); this.save();
Font.unloadFonts(); Font.unloadFonts();
if(this.shaders)
Shader.unloadShaders(); Shader.unloadShaders();
Window.destroyWindow(); Window.destroyWindow();
Log.SYSTEM.info("Beendet."); Log.SYSTEM.info("Beendet.");
@ -2522,7 +2533,7 @@ public class Client implements IThreadListener {
this.saving = true; this.saving = true;
final int stride = ((this.fbRawX * 3) & 3) != 0 ? 4 + ((this.fbRawX * 3) & ~3) : (this.fbRawX * 3); final int stride = ((this.fbRawX * 3) & 3) != 0 ? 4 + ((this.fbRawX * 3) & ~3) : (this.fbRawX * 3);
final ByteBuffer data = ByteBuffer.allocateDirect(stride * this.fbRawY).order(ByteOrder.nativeOrder()); final ByteBuffer data = ByteBuffer.allocateDirect(stride * this.fbRawY).order(ByteOrder.nativeOrder());
GL46.glReadPixels(0, 0, this.fbRawX, this.fbRawY, GL46.GL_RGB, GL46.GL_UNSIGNED_BYTE, data); GL15.glReadPixels(0, 0, this.fbRawX, this.fbRawY, GL15.GL_RGB, GL15.GL_UNSIGNED_BYTE, data);
new Thread(new Runnable() { new Thread(new Runnable() {
public void run() { public void run() {
byte[] pixels = new byte[stride * Client.this.fbRawY]; byte[] pixels = new byte[stride * Client.this.fbRawY];
@ -2710,7 +2721,9 @@ public class Client implements IThreadListener {
if(Util.DEVMODE) if(Util.DEVMODE)
this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() { this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() {
public void execute(Keysym key) { public void execute(Keysym key) {
Client.this.logFeed("Maximale Helligkeit: %s", (Client.this.setGamma ^= true) ? "an" : "aus"); Client.this.setGamma ^= true;
Client.this.renderer.loadRenderers();
Client.this.logFeed("Maximale Helligkeit: %s", Client.this.setGamma ? "an" : "aus");
} }
}); });
this.registerDebug(Keysym.J, "JVM GC ausführen", new DebugRunner() { this.registerDebug(Keysym.J, "JVM GC ausführen", new DebugRunner() {
@ -3262,17 +3275,17 @@ public class Client implements IThreadListener {
private void renderWorldDirections(float partialTicks) { private void renderWorldDirections(float partialTicks) {
GlState.enableBlend(); GlState.enableBlend();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GL46.glLineWidth(1.0F); GL15.glLineWidth(1.0F);
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.depthMask(false); GlState.depthMask(false);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)(this.fbX / 2), (float)(this.fbY / 2), 0.0F); GL15.glTranslatef((float)(this.fbX / 2), (float)(this.fbY / 2), 0.0F);
this.renderer.rotateCamera(this.viewEntity, partialTicks, true); this.renderer.rotateCamera(this.viewEntity, partialTicks, true);
Renderer.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 24D, 1D, 1D), 255, 0, 0, 255); Renderer.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 24D, 1D, 1D), 255, 0, 0, 255);
Renderer.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 1D, 1D, 24D), 0, 0, 255, 255); Renderer.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 1D, 1D, 24D), 0, 0, 255, 255);
Renderer.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 1D, -20D, 1D), 0, 255, 0, 255); Renderer.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 1D, -20D, 1D), 0, 255, 0, 255);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.depthMask(true); GlState.depthMask(true);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.disableBlend(); GlState.disableBlend();

View file

@ -4,7 +4,7 @@ import java.awt.image.BufferedImage;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.texture.TextureUtil; import client.renderer.texture.TextureUtil;
@ -110,7 +110,7 @@ public enum Font implements Identifyable, Displayable {
int[] data = new int[width * 16 * height * 16]; int[] data = new int[width * 16 * height * 16];
img.getRGB(0, 0, width * 16, height * 16, data, 0, width * 16); img.getRGB(0, 0, width * 16, height * 16, data, 0, width * 16);
calculate(data, font.sizes, width, height, 0); calculate(data, font.sizes, width, height, 0);
font.texture = GL46.glGenTextures(); font.texture = GL15.glGenTextures();
TextureUtil.uploadImage(font.texture, img); TextureUtil.uploadImage(font.texture, img);
Log.RENDER.debug("Font-Textur wurde mit ID #%d geladen", font.texture); Log.RENDER.debug("Font-Textur wurde mit ID #%d geladen", font.texture);
} }
@ -141,7 +141,7 @@ public enum Font implements Identifyable, Displayable {
public static void unloadFonts() { public static void unloadFonts() {
for(Font font : values()) { for(Font font : values()) {
if(font.texture != 0) { if(font.texture != 0) {
GL46.glDeleteTextures(font.texture); GL15.glDeleteTextures(font.texture);
Log.RENDER.debug("Font-Textur mit ID #%d wurde gelöscht", font.texture); Log.RENDER.debug("Font-Textur mit ID #%d wurde gelöscht", font.texture);
font.texture = 0; font.texture = 0;
} }

View file

@ -2,7 +2,7 @@ package client.gui;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.gui.element.Dropdown; import client.gui.element.Dropdown;
@ -230,7 +230,7 @@ public abstract class Gui {
if(this.gm.fbX != 0 && this.gm.fbY != 0) if(this.gm.fbX != 0 && this.gm.fbY != 0)
this.draw(); this.draw();
GlState.bindTexture(0); GlState.bindTexture(0);
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.disableDepth(); GlState.disableDepth();
this.drawPost(); this.drawPost();

View file

@ -12,7 +12,7 @@ import java.util.List;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.Client.FileMode; import client.Client.FileMode;
@ -613,41 +613,41 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.enableDepth(); GlState.enableDepth();
GlState.enableColorMaterial(); GlState.enableColorMaterial();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)posX, (float)posY, 200.0F); GL15.glTranslatef((float)posX, (float)posY, 200.0F);
GL46.glScalef(-scale, scale, scale); GL15.glScalef(-scale, scale, scale);
GL46.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
float f = ent.yawOffset; float f = ent.yawOffset;
float f1 = ent.rotYaw; float f1 = ent.rotYaw;
float f2 = ent.rotPitch; float f2 = ent.rotPitch;
float f3 = ent.prevHeadYaw; float f3 = ent.prevHeadYaw;
float f4 = ent.headYaw; float f4 = ent.headYaw;
GL46.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
ItemRenderer.enableStandardItemLighting(); ItemRenderer.enableStandardItemLighting();
GL46.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(0.0F, ent.height / 2, 0.0F); GL15.glTranslatef(0.0F, ent.height / 2, 0.0F);
GL46.glRotatef(-pitch, 1.0F, 0.0F, 0.0F); GL15.glRotatef(-pitch, 1.0F, 0.0F, 0.0F);
ent.yawOffset = yaw; ent.yawOffset = yaw;
ent.rotYaw = yaw; ent.rotYaw = yaw;
ent.rotPitch = 0.0f; ent.rotPitch = 0.0f;
ent.headYaw = ent.rotYaw; ent.headYaw = ent.rotYaw;
ent.prevHeadYaw = ent.rotYaw; ent.prevHeadYaw = ent.rotYaw;
GL46.glTranslatef(0.0F, -(ent.height / 2), 0.0F); GL15.glTranslatef(0.0F, -(ent.height / 2), 0.0F);
RenderManager rendermanager = Client.CLIENT.getRenderManager(); RenderManager rendermanager = Client.CLIENT.getRenderManager();
rendermanager.setPlayerViewY(180.0F); rendermanager.setPlayerViewY(180.0F);
rendermanager.renderEntity(ent, 0.0D, 0.0D, 0.0D, 1.0F); rendermanager.renderEntity(ent, 0.0D, 0.0D, 0.0D, 1.0F);
// GL46.glTranslatef(0.0F, 0.0F, 0.0F); // GL15.glTranslatef(0.0F, 0.0F, 0.0F);
ent.yawOffset = f; ent.yawOffset = f;
ent.rotYaw = f1; ent.rotYaw = f1;
ent.rotPitch = f2; ent.rotPitch = f2;
ent.prevHeadYaw = f3; ent.prevHeadYaw = f3;
ent.headYaw = f4; ent.headYaw = f4;
GL46.glPopMatrix(); GL15.glPopMatrix();
ItemRenderer.disableStandardItemLighting(); ItemRenderer.disableStandardItemLighting();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GlState.setActiveTexture(GL46.GL_TEXTURE1); GlState.setActiveTexture(GL15.GL_TEXTURE1);
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.disableDepth(); GlState.disableDepth();
} }
} }

View file

@ -7,7 +7,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.Map.Entry; import java.util.Map.Entry;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.gui.Font; import client.gui.Font;
@ -332,10 +332,10 @@ public abstract class GuiContainer extends Gui
} }
if(this.gm.itemCheat) { if(this.gm.itemCheat) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(-(float)((this.gm.fbX - this.xSize * this.container_scale) / 2) * (1.0f / (float)this.container_scale), -(float)((this.gm.fbY - this.ySize * this.container_scale) / 2) * (1.0f / (float)this.container_scale), 0.0f); GL15.glTranslatef(-(float)((this.gm.fbX - this.xSize * this.container_scale) / 2) * (1.0f / (float)this.container_scale), -(float)((this.gm.fbY - this.ySize * this.container_scale) / 2) * (1.0f / (float)this.container_scale), 0.0f);
if(this.container_scale != 1) if(this.container_scale != 1)
GL46.glScalef(1.0f / (float)this.container_scale, 1.0f / (float)this.container_scale, 1.0f / (float)this.container_scale); GL15.glScalef(1.0f / (float)this.container_scale, 1.0f / (float)this.container_scale, 1.0f / (float)this.container_scale);
int i = (ITEM_LIST.size() + this.cheatWidth - 1) / this.cheatWidth - this.cheatHeight; int i = (ITEM_LIST.size() + this.cheatWidth - 1) / this.cheatWidth - this.cheatHeight;
int j = (int)((double)(this.currentScroll * (float)i) + 0.5D); int j = (int)((double)(this.currentScroll * (float)i) + 0.5D);
@ -366,7 +366,7 @@ public abstract class GuiContainer extends Gui
{ {
this.drawTab(tabs); this.drawTab(tabs);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }
@ -421,7 +421,7 @@ public abstract class GuiContainer extends Gui
this.theSlot = null; this.theSlot = null;
int k = 240; int k = 240;
int l = 240; int l = 240;
GL46.glMultiTexCoord2f(GL46.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F); GL15.glMultiTexCoord2f(GL15.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
this.drawSlots(mouseX, mouseY); this.drawSlots(mouseX, mouseY);
@ -487,7 +487,7 @@ public abstract class GuiContainer extends Gui
private void drawItemStack(ItemStack stack, int x, int y, String altText) private void drawItemStack(ItemStack stack, int x, int y, String altText)
{ {
GL46.glTranslatef(0.0F, 0.0F, 32.0F); GL15.glTranslatef(0.0F, 0.0F, 32.0F);
this.itemRender.zLevel = 200.0F; this.itemRender.zLevel = 200.0F;
this.itemRender.renderItemAndEffectIntoGUI(stack, x, y); this.itemRender.renderItemAndEffectIntoGUI(stack, x, y);
this.drawnOverlays.add(new Overlay(stack, x, y, altText)); this.drawnOverlays.add(new Overlay(stack, x, y, altText));
@ -526,12 +526,12 @@ public abstract class GuiContainer extends Gui
} }
public void drawPost() { public void drawPost() {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)((this.gm.fbX - this.xSize * this.container_scale) / 2), (float)((this.gm.fbY - this.ySize * this.container_scale) / 2), 0.0f); GL15.glTranslatef((float)((this.gm.fbX - this.xSize * this.container_scale) / 2), (float)((this.gm.fbY - this.ySize * this.container_scale) / 2), 0.0f);
if(this.container_scale != 1) if(this.container_scale != 1)
GL46.glScalef((float)this.container_scale, (float)this.container_scale, (float)this.container_scale); GL15.glScalef((float)this.container_scale, (float)this.container_scale, (float)this.container_scale);
this.drawScreen((this.gm.mouseX - this.container_x) / this.container_scale, (this.gm.mouseY - this.container_y) / this.container_scale); this.drawScreen((this.gm.mouseX - this.container_x) / this.container_scale, (this.gm.mouseY - this.container_y) / this.container_scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
ItemRenderer.disableStandardItemLighting(); ItemRenderer.disableStandardItemLighting();
} }

View file

@ -1,6 +1,6 @@
package client.gui.container; package client.gui.container;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.gui.element.ActButton; import client.gui.element.ActButton;
import client.gui.element.ButtonCallback; import client.gui.element.ButtonCallback;
@ -96,7 +96,7 @@ public class GuiMerchant extends GuiContainer implements ButtonCallback {
ItemStack itemstack = merchantrecipe.first(); ItemStack itemstack = merchantrecipe.first();
ItemStack itemstack1 = merchantrecipe.second(); ItemStack itemstack1 = merchantrecipe.second();
ItemStack itemstack2 = merchantrecipe.result(); ItemStack itemstack2 = merchantrecipe.result();
GL46.glPushMatrix(); GL15.glPushMatrix();
ItemRenderer.enableGUIStandardItemLighting(); ItemRenderer.enableGUIStandardItemLighting();
GlState.disableLighting(); GlState.disableLighting();
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
@ -123,7 +123,7 @@ public class GuiMerchant extends GuiContainer implements ButtonCallback {
this.renderToolTip(itemstack2, mouseX, mouseY); this.renderToolTip(itemstack2, mouseX, mouseY);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.enableLighting(); GlState.enableLighting();
GlState.enableDepth(); GlState.enableDepth();
ItemRenderer.enableStandardItemLighting(); ItemRenderer.enableStandardItemLighting();

View file

@ -1,6 +1,6 @@
package client.gui.element; package client.gui.element;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.gui.Formatter; import client.gui.Formatter;
@ -222,7 +222,7 @@ public abstract class Element {
int y2 = this.size_y - (this.margin_y1 + this.margin_y2); int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
// if(elem.type == ElemType.FIELD) { // if(elem.type == ElemType.FIELD) {
this.gm.scissor(x1 < 0 ? 0 : x1, (this.gm.fbY - (y1 + y2)) < 0 ? 0 : (this.gm.fbY - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2); this.gm.scissor(x1 < 0 ? 0 : x1, (this.gm.fbY - (y1 + y2)) < 0 ? 0 : (this.gm.fbY - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2);
GL46.glEnable(GL46.GL_SCISSOR_TEST); GL15.glEnable(GL15.GL_SCISSOR_TEST);
// } // }
// if(this.type == ElemType.CUSTOM) // if(this.type == ElemType.CUSTOM)
// this.func(this, 1); // this.func(this, 1);
@ -230,7 +230,7 @@ public abstract class Element {
this.drawForeground(x1, y1, x2, y2); this.drawForeground(x1, y1, x2, y2);
// logd("DBG", "%d @ %d %d -> %d %d", elem.id, x1, y1, elem.pos_x + x2, elem.pos_y + y2); // logd("DBG", "%d @ %d %d -> %d %d", elem.id, x1, y1, elem.pos_x + x2, elem.pos_y + y2);
// if(elem.type == ElemType.FIELD) { // if(elem.type == ElemType.FIELD) {
GL46.glDisable(GL46.GL_SCISSOR_TEST); GL15.glDisable(GL15.GL_SCISSOR_TEST);
// glScissor(0, 0, sys.fb_x, sys.fb_y); // glScissor(0, 0, sys.fb_x, sys.fb_y);
// } // }
} }

View file

@ -1,6 +1,6 @@
package client.gui.element; package client.gui.element;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.gui.Font; import client.gui.Font;
import client.renderer.Drawing; import client.renderer.Drawing;
@ -242,9 +242,9 @@ abstract class Textbox extends Element {
int x2 = this.size_x - (this.margin_x1 + this.margin_x2); int x2 = this.size_x - (this.margin_x1 + this.margin_x2);
int y2 = this.size_y - (this.margin_y1 + this.margin_y2); int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
this.gm.scissor(x1 < 0 ? 0 : x1, (this.gm.fbY - (y1 + y2)) < 0 ? 0 : (this.gm.fbY - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2); this.gm.scissor(x1 < 0 ? 0 : x1, (this.gm.fbY - (y1 + y2)) < 0 ? 0 : (this.gm.fbY - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2);
GL46.glEnable(GL46.GL_SCISSOR_TEST); GL15.glEnable(GL15.GL_SCISSOR_TEST);
Drawing.drawRect(this.getCursorX(x1, x2), this.getCursorY(y1, y2), 1, Font.HEIGHT, 0xff000000 | (~Util.mixColor(this.gm.style.field_top, this.gm.style.field_btm))); Drawing.drawRect(this.getCursorX(x1, x2), this.getCursorY(y1, y2), 1, Font.HEIGHT, 0xff000000 | (~Util.mixColor(this.gm.style.field_top, this.gm.style.field_btm)));
GL46.glDisable(GL46.GL_SCISSOR_TEST); GL15.glDisable(GL15.GL_SCISSOR_TEST);
} }
} }

View file

@ -1,5 +1,8 @@
package client.gui.options; package client.gui.options;
import client.gui.element.Fill;
import common.util.Color;
public class GuiGraphics extends GuiOptions { public class GuiGraphics extends GuiOptions {
protected GuiGraphics() { protected GuiGraphics() {
} }
@ -21,10 +24,14 @@ public class GuiGraphics extends GuiOptions {
this.addSelector("hud_margin", 0, 140, 240, 0); this.addSelector("hud_margin", 0, 140, 240, 0);
if(this.gm.shaders)
this.addSelector("gl_use_shader", 0, 180, 240, 0); this.addSelector("gl_use_shader", 0, 180, 240, 0);
this.addSelector("gl_light_blend", 242, 180, 240, 0); else
this.add(new Fill(0, 180, 240, 0, Color.RED + "Shader nicht unterstützt"));
this.addSelector("gl_tex_mipmaps", 242, 200, 240, 0); if(this.gm.mipmaps)
this.addSelector("gl_tex_mipmaps", 242, 180, 240, 0);
else
this.add(new Fill(242, 180, 240, 0, Color.RED + "Mipmaps nicht unterstützt"));
super.init(width, height); super.init(width, height);
} }

View file

@ -1,6 +1,6 @@
package client.renderer; package client.renderer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.gui.Font; import client.gui.Font;
@ -33,12 +33,12 @@ public abstract class Drawing {
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.enableBlend(); GlState.enableBlend();
GlState.disableAlpha(); GlState.disableAlpha();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
GlState.color(1.0f, 1.0f, 1.0f, 1.0f); GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
Font.bindTexture(); Font.bindTexture();
RenderBuffer rb = Tessellator.getBuffer(); RenderBuffer rb = Tessellator.getBuffer();
rb.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); rb.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
int h = Font.HEIGHT; int h = Font.HEIGHT;
int tx, ty, u, v; int tx, ty, u, v;
FontChar glyph; FontChar glyph;
@ -79,7 +79,7 @@ public abstract class Drawing {
x += u; x += u;
} }
Tessellator.draw(); Tessellator.draw();
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
GlState.disableBlend(); GlState.disableBlend();
GlState.enableAlpha(); GlState.enableAlpha();
GlState.enableTexture2D(); GlState.enableTexture2D();
@ -292,12 +292,12 @@ public abstract class Drawing {
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.enableBlend(); GlState.enableBlend();
GlState.disableAlpha(); GlState.disableAlpha();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
GlState.color(1.0f, 1.0f, 1.0f, 1.0f); GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
Font.bindTexture(); Font.bindTexture();
RenderBuffer rb = Tessellator.getBuffer(); RenderBuffer rb = Tessellator.getBuffer();
rb.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); rb.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
int ox = x; int ox = x;
int ncolor = color; int ncolor = color;
FontChar glyph; FontChar glyph;
@ -361,7 +361,7 @@ public abstract class Drawing {
x += glyph.u + 3 - glyph.s; x += glyph.u + 3 - glyph.s;
} }
Tessellator.draw(); Tessellator.draw();
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
GlState.disableBlend(); GlState.disableBlend();
GlState.enableAlpha(); GlState.enableAlpha();
GlState.enableTexture2D(); GlState.enableTexture2D();
@ -403,16 +403,16 @@ public abstract class Drawing {
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.enableBlend(); GlState.enableBlend();
GlState.disableAlpha(); GlState.disableAlpha();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
RenderBuffer buf = Tessellator.getBuffer(); RenderBuffer buf = Tessellator.getBuffer();
buf.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_COLOR); buf.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
buf.pos((double)(x + w), (double)y, 0.0).color(top).endVertex(); buf.pos((double)(x + w), (double)y, 0.0).color(top).endVertex();
buf.pos((double)x, (double)y, 0.0).color(top).endVertex(); buf.pos((double)x, (double)y, 0.0).color(top).endVertex();
buf.pos((double)x, (double)(y + h), 0.0).color(bottom).endVertex(); buf.pos((double)x, (double)(y + h), 0.0).color(bottom).endVertex();
buf.pos((double)(x + w), (double)(y + h), 0.0).color(bottom).endVertex(); buf.pos((double)(x + w), (double)(y + h), 0.0).color(bottom).endVertex();
Tessellator.draw(); Tessellator.draw();
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
GlState.disableBlend(); GlState.disableBlend();
GlState.enableAlpha(); GlState.enableAlpha();
GlState.enableTexture2D(); GlState.enableTexture2D();
@ -423,16 +423,16 @@ public abstract class Drawing {
// GlState.disableTexture2D(); // GlState.disableTexture2D();
// GlState.enableBlend(); // GlState.enableBlend();
// GlState.disableAlpha(); // GlState.disableAlpha();
// GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); // GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
// GlState.shadeModel(GL46.GL_SMOOTH); // GlState.shadeModel(GL15.GL_SMOOTH);
// RenderBuffer buf = Tessellator.getBuffer(); // RenderBuffer buf = Tessellator.getBuffer();
// buf.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_COLOR); // buf.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
// buf.pos((double)(x + w), (double)y, 0.0).color(topright).endVertex(); // buf.pos((double)(x + w), (double)y, 0.0).color(topright).endVertex();
// buf.pos((double)x, (double)y, 0.0).color(topleft).endVertex(); // buf.pos((double)x, (double)y, 0.0).color(topleft).endVertex();
// buf.pos((double)x, (double)(y + h), 0.0).color(btmleft).endVertex(); // buf.pos((double)x, (double)(y + h), 0.0).color(btmleft).endVertex();
// buf.pos((double)(x + w), (double)(y + h), 0.0).color(btmright).endVertex(); // buf.pos((double)(x + w), (double)(y + h), 0.0).color(btmright).endVertex();
// Tessellator.draw(); // Tessellator.draw();
// GlState.shadeModel(GL46.GL_FLAT); // GlState.shadeModel(GL15.GL_FLAT);
// GlState.disableBlend(); // GlState.disableBlend();
// GlState.enableAlpha(); // GlState.enableAlpha();
// GlState.enableTexture2D(); // GlState.enableTexture2D();
@ -444,16 +444,16 @@ public abstract class Drawing {
GlState.enableBlend(); GlState.enableBlend();
GlState.disableAlpha(); GlState.disableAlpha();
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
GlState.color(color); GlState.color(color);
rb.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION); rb.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION);
rb.pos((double)x, (double)(y + h), 0.0D).endVertex(); rb.pos((double)x, (double)(y + h), 0.0D).endVertex();
rb.pos((double)(x + w), (double)(y + h), 0.0D).endVertex(); rb.pos((double)(x + w), (double)(y + h), 0.0D).endVertex();
rb.pos((double)(x + w), (double)y, 0.0D).endVertex(); rb.pos((double)(x + w), (double)y, 0.0D).endVertex();
rb.pos((double)x, (double)y, 0.0D).endVertex(); rb.pos((double)x, (double)y, 0.0D).endVertex();
Tessellator.draw(); Tessellator.draw();
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.disableBlend(); GlState.disableBlend();
GlState.enableAlpha(); GlState.enableAlpha();
@ -575,7 +575,7 @@ public abstract class Drawing {
gm.getTextureManager().bindTexture(texture); gm.getTextureManager().bindTexture(texture);
GlState.color(color); GlState.color(color);
double scale = 32.0; double scale = 32.0;
buf.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); buf.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
buf.pos((double)x, (double)y + (double)height, 0.0D).tex(0.0D, (double)height / scale).endVertex(); buf.pos((double)x, (double)y + (double)height, 0.0D).tex(0.0D, (double)height / scale).endVertex();
buf.pos((double)x + (double)width, (double)y + (double)height, 0.0D).tex((double)width / scale, (double)height / scale).endVertex(); buf.pos((double)x + (double)width, (double)y + (double)height, 0.0D).tex((double)width / scale, (double)height / scale).endVertex();
buf.pos((double)x + (double)width, (double)y, 0.0D).tex((double)width / scale, 0.0).endVertex(); buf.pos((double)x + (double)width, (double)y, 0.0D).tex((double)width / scale, 0.0).endVertex();
@ -594,13 +594,13 @@ public abstract class Drawing {
// GlState.color(color); // GlState.color(color);
float xs = 1.0f / (float)texWidth; // 0.00390625F; float xs = 1.0f / (float)texWidth; // 0.00390625F;
float ys = 1.0f / (float)texHeight; // 0.00390625F; float ys = 1.0f / (float)texHeight; // 0.00390625F;
buf.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); buf.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
buf.pos((double)(x + 0), (double)(y + height), 0.0).tex((double)((float)(u + 0) * xs), (double)((float)(v + height) * ys)).endVertex(); buf.pos((double)(x + 0), (double)(y + height), 0.0).tex((double)((float)(u + 0) * xs), (double)((float)(v + height) * ys)).endVertex();
buf.pos((double)(x + width), (double)(y + height), 0.0).tex((double)((float)(u + width) * xs), (double)((float)(v + height) * ys)).endVertex(); buf.pos((double)(x + width), (double)(y + height), 0.0).tex((double)((float)(u + width) * xs), (double)((float)(v + height) * ys)).endVertex();
buf.pos((double)(x + width), (double)(y + 0), 0.0).tex((double)((float)(u + width) * xs), (double)((float)(v + 0) * ys)).endVertex(); buf.pos((double)(x + width), (double)(y + 0), 0.0).tex((double)((float)(u + width) * xs), (double)((float)(v + 0) * ys)).endVertex();
buf.pos((double)(x + 0), (double)(y + 0), 0.0).tex((double)((float)(u + 0) * xs), (double)((float)(v + 0) * ys)).endVertex(); buf.pos((double)(x + 0), (double)(y + 0), 0.0).tex((double)((float)(u + 0) * xs), (double)((float)(v + 0) * ys)).endVertex();
// double scale = 32.0; // double scale = 32.0;
// buf.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); // buf.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
// buf.pos((double)x, (double)y + (double)height, 0.0D).tex(0.0D, (double)height / scale).endVertex(); // buf.pos((double)x, (double)y + (double)height, 0.0D).tex(0.0D, (double)height / scale).endVertex();
// buf.pos((double)x + (double)width, (double)y + (double)height, 0.0D).tex((double)width / scale, (double)height / scale).endVertex(); // buf.pos((double)x + (double)width, (double)y + (double)height, 0.0D).tex((double)width / scale, (double)height / scale).endVertex();
// buf.pos((double)x + (double)width, (double)y, 0.0D).tex((double)width / scale, 0.0).endVertex(); // buf.pos((double)x + (double)width, (double)y, 0.0D).tex((double)width / scale, 0.0).endVertex();

View file

@ -3,7 +3,7 @@ package client.renderer;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.texture.Sprite; import client.renderer.texture.Sprite;
@ -815,7 +815,7 @@ public class EffectRenderer {
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.disableLighting(); GlState.disableLighting();
ItemRenderer.disableStandardItemLighting(); ItemRenderer.disableStandardItemLighting();
rb.begin(GL46.GL_QUADS, VERTEX_FORMAT); rb.begin(GL15.GL_QUADS, VERTEX_FORMAT);
rb.pos((double)(x - rotX * scale - rotXY * scale), (double)(y - rotZ * scale), (double)(z - rotYZ * scale - rotXZ * scale)) rb.pos((double)(x - rotX * scale - rotXY * scale), (double)(y - rotZ * scale), (double)(z - rotYZ * scale - rotXZ * scale))
.tex((double)u2, (double)v2).color(this.brightness, this.brightness, this.brightness, 1.0F).lightmap(0, 240) .tex((double)u2, (double)v2).color(this.brightness, this.brightness, this.brightness, 1.0F).lightmap(0, 240)
.normal(0.0F, 1.0F, 0.0F).endVertex(); .normal(0.0F, 1.0F, 0.0F).endVertex();
@ -1002,8 +1002,8 @@ public class EffectRenderer {
this.interpPosY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partial; this.interpPosY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partial;
this.interpPosZ = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partial; this.interpPosZ = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partial;
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA);
GlState.alphaFunc(GL46.GL_GREATER, 0.003921569F); GlState.alphaFunc(GL15.GL_GREATER, 0.003921569F);
for(int i = 0; i < 2; ++i) { for(int i = 0; i < 2; ++i) {
if(!this.layers[i].isEmpty()) { if(!this.layers[i].isEmpty()) {
@ -1021,7 +1021,7 @@ public class EffectRenderer {
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for(int k = 0; k < this.layers[i].size(); ++k) { for(int k = 0; k < this.layers[i].size(); ++k) {
this.layers[i].get(k).render(worldrenderer, partial, f, f4, f1, f2, f3); this.layers[i].get(k).render(worldrenderer, partial, f, f4, f1, f2, f3);
@ -1033,7 +1033,7 @@ public class EffectRenderer {
GlState.depthMask(true); GlState.depthMask(true);
GlState.disableBlend(); GlState.disableBlend();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
} }
public void renderTextured(Entity entity, float partial) { public void renderTextured(Entity entity, float partial) {

View file

@ -4,7 +4,7 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.util.BoundingBox; import common.util.BoundingBox;
import common.util.ExtMath; import common.util.ExtMath;
@ -44,8 +44,8 @@ public class Frustum {
public void init() { public void init() {
this.projection.clear(); this.projection.clear();
this.modelview.clear(); this.modelview.clear();
GL46.glGetFloatv(2983, this.projection); GL15.glGetFloatv(2983, this.projection);
GL46.glGetFloatv(2982, this.modelview); GL15.glGetFloatv(2982, this.modelview);
float[] proj = this.projectionMat; float[] proj = this.projectionMat;
float[] view = this.modelviewMat; float[] view = this.modelviewMat;
this.projection.flip().limit(16); this.projection.flip().limit(16);

View file

@ -1,11 +1,11 @@
package client.renderer; package client.renderer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
public class GlState public class GlState
{ {
private static GlState.AlphaState alphaState = new GlState.AlphaState(); private static GlState.AlphaState alphaState = new GlState.AlphaState();
private static GlState.BooleanState lightingState = new GlState.BooleanState(GL46.GL_LIGHTING); private static GlState.BooleanState lightingState = new GlState.BooleanState(GL15.GL_LIGHTING);
private static GlState.BooleanState[] lightState = new GlState.BooleanState[2]; private static GlState.BooleanState[] lightState = new GlState.BooleanState[2];
private static GlState.ColorMaterialState colorMaterialState = new GlState.ColorMaterialState(); private static GlState.ColorMaterialState colorMaterialState = new GlState.ColorMaterialState();
private static GlState.BlendState blendState = new GlState.BlendState(); private static GlState.BlendState blendState = new GlState.BlendState();
@ -14,11 +14,11 @@ public class GlState
private static GlState.CullState cullState = new GlState.CullState(); private static GlState.CullState cullState = new GlState.CullState();
private static GlState.PolygonOffsetState polygonOffsetState = new GlState.PolygonOffsetState(); private static GlState.PolygonOffsetState polygonOffsetState = new GlState.PolygonOffsetState();
private static GlState.Color clearState = new GlState.Color(); private static GlState.Color clearState = new GlState.Color();
private static GlState.BooleanState normalizeState = new GlState.BooleanState(GL46.GL_NORMALIZE); private static GlState.BooleanState normalizeState = new GlState.BooleanState(GL15.GL_NORMALIZE);
private static int activeTextureUnit = 0; private static int activeTextureUnit = 0;
private static GlState.TextureState[] textureState = new GlState.TextureState[2]; private static GlState.TextureState[] textureState = new GlState.TextureState[2];
private static int activeShadeModel = GL46.GL_SMOOTH; private static int activeShadeModel = GL15.GL_SMOOTH;
private static GlState.BooleanState rescaleNormalState = new GlState.BooleanState(GL46.GL_RESCALE_NORMAL); private static GlState.BooleanState rescaleNormalState = new GlState.BooleanState(GL15.GL_RESCALE_NORMAL);
private static GlState.ColorMask colorMaskState = new GlState.ColorMask(); private static GlState.ColorMask colorMaskState = new GlState.ColorMask();
private static GlState.Color colorState = new GlState.Color(); private static GlState.Color colorState = new GlState.Color();
@ -38,7 +38,7 @@ public class GlState
{ {
alphaState.func = func; alphaState.func = func;
alphaState.ref = ref; alphaState.ref = ref;
GL46.glAlphaFunc(func, ref); GL15.glAlphaFunc(func, ref);
} }
} }
@ -78,7 +78,7 @@ public class GlState
{ {
colorMaterialState.face = face; colorMaterialState.face = face;
colorMaterialState.mode = mode; colorMaterialState.mode = mode;
GL46.glColorMaterial(face, mode); GL15.glColorMaterial(face, mode);
} }
} }
@ -97,7 +97,7 @@ public class GlState
if (depthFunc != depthState.depthFunc) if (depthFunc != depthState.depthFunc)
{ {
depthState.depthFunc = depthFunc; depthState.depthFunc = depthFunc;
GL46.glDepthFunc(depthFunc); GL15.glDepthFunc(depthFunc);
} }
} }
@ -106,7 +106,7 @@ public class GlState
if (flagIn != depthState.maskEnabled) if (flagIn != depthState.maskEnabled)
{ {
depthState.maskEnabled = flagIn; depthState.maskEnabled = flagIn;
GL46.glDepthMask(flagIn); GL15.glDepthMask(flagIn);
} }
} }
@ -126,7 +126,7 @@ public class GlState
{ {
blendState.srcFactor = srcFactor; blendState.srcFactor = srcFactor;
blendState.dstFactor = dstFactor; blendState.dstFactor = dstFactor;
GL46.glBlendFunc(srcFactor, dstFactor); GL15.glBlendFunc(srcFactor, dstFactor);
} }
} }
@ -138,7 +138,7 @@ public class GlState
blendState.dstFactor = dstFactor; blendState.dstFactor = dstFactor;
blendState.srcFactorAlpha = srcFactorAlpha; blendState.srcFactorAlpha = srcFactorAlpha;
blendState.dstFactorAlpha = dstFactorAlpha; blendState.dstFactorAlpha = dstFactorAlpha;
GL46.glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha); GL15.glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha);
} }
} }
@ -171,7 +171,7 @@ public class GlState
if (param != fogState.mode) if (param != fogState.mode)
{ {
fogState.mode = param; fogState.mode = param;
GL46.glFogi(GL46.GL_FOG_MODE, param); GL15.glFogi(GL15.GL_FOG_MODE, param);
} }
} }
@ -180,7 +180,7 @@ public class GlState
if (param != fogState.density) if (param != fogState.density)
{ {
fogState.density = param; fogState.density = param;
GL46.glFogf(GL46.GL_FOG_DENSITY, param); GL15.glFogf(GL15.GL_FOG_DENSITY, param);
} }
} }
@ -189,7 +189,7 @@ public class GlState
if (param != fogState.start) if (param != fogState.start)
{ {
fogState.start = param; fogState.start = param;
GL46.glFogf(GL46.GL_FOG_START, param); GL15.glFogf(GL15.GL_FOG_START, param);
} }
} }
@ -198,7 +198,7 @@ public class GlState
if (param != fogState.end) if (param != fogState.end)
{ {
fogState.end = param; fogState.end = param;
GL46.glFogf(GL46.GL_FOG_END, param); GL15.glFogf(GL15.GL_FOG_END, param);
} }
} }
@ -222,7 +222,7 @@ public class GlState
if (mode != cullState.mode) if (mode != cullState.mode)
{ {
cullState.mode = mode; cullState.mode = mode;
GL46.glCullFace(mode); GL15.glCullFace(mode);
} }
} }
@ -242,16 +242,16 @@ public class GlState
{ {
polygonOffsetState.factor = factor; polygonOffsetState.factor = factor;
polygonOffsetState.units = units; polygonOffsetState.units = units;
GL46.glPolygonOffset(factor, units); GL15.glPolygonOffset(factor, units);
} }
} }
public static void setActiveTexture(int texture) public static void setActiveTexture(int texture)
{ {
if (activeTextureUnit != texture - GL46.GL_TEXTURE0) if (activeTextureUnit != texture - GL15.GL_TEXTURE0)
{ {
activeTextureUnit = texture - GL46.GL_TEXTURE0; activeTextureUnit = texture - GL15.GL_TEXTURE0;
GL46.glActiveTexture(texture); GL15.glActiveTexture(texture);
} }
} }
@ -267,7 +267,7 @@ public class GlState
public static void deleteTexture(int texture) public static void deleteTexture(int texture)
{ {
GL46.glDeleteTextures(texture); GL15.glDeleteTextures(texture);
for (GlState.TextureState glstatemanager$texturestate : textureState) for (GlState.TextureState glstatemanager$texturestate : textureState)
{ {
@ -283,7 +283,7 @@ public class GlState
if (texture != textureState[activeTextureUnit].textureName) if (texture != textureState[activeTextureUnit].textureName)
{ {
textureState[activeTextureUnit].textureName = texture; textureState[activeTextureUnit].textureName = texture;
GL46.glBindTexture(GL46.GL_TEXTURE_2D, texture); GL15.glBindTexture(GL15.GL_TEXTURE_2D, texture);
} }
} }
@ -302,7 +302,7 @@ public class GlState
if (mode != activeShadeModel) if (mode != activeShadeModel)
{ {
activeShadeModel = mode; activeShadeModel = mode;
GL46.glShadeModel(mode); GL15.glShadeModel(mode);
} }
} }
@ -324,7 +324,7 @@ public class GlState
colorMaskState.green = green; colorMaskState.green = green;
colorMaskState.blue = blue; colorMaskState.blue = blue;
colorMaskState.alpha = alpha; colorMaskState.alpha = alpha;
GL46.glColorMask(red, green, blue, alpha); GL15.glColorMask(red, green, blue, alpha);
} }
} }
@ -336,7 +336,7 @@ public class GlState
clearState.green = green; clearState.green = green;
clearState.blue = blue; clearState.blue = blue;
clearState.alpha = alpha; clearState.alpha = alpha;
GL46.glClearColor(red, green, blue, alpha); GL15.glClearColor(red, green, blue, alpha);
} }
} }
@ -348,7 +348,7 @@ public class GlState
colorState.green = colorGreen; colorState.green = colorGreen;
colorState.blue = colorBlue; colorState.blue = colorBlue;
colorState.alpha = colorAlpha; colorState.alpha = colorAlpha;
GL46.glColor4f(colorRed, colorGreen, colorBlue, colorAlpha); GL15.glColor4f(colorRed, colorGreen, colorBlue, colorAlpha);
} }
} }
@ -369,7 +369,7 @@ public class GlState
{ {
for (int i = 0; i < lightState.length; ++i) for (int i = 0; i < lightState.length; ++i)
{ {
lightState[i] = new GlState.BooleanState(GL46.GL_LIGHT0 + i); lightState[i] = new GlState.BooleanState(GL15.GL_LIGHT0 + i);
} }
for (int j = 0; j < textureState.length; ++j) for (int j = 0; j < textureState.length; ++j)
@ -386,8 +386,8 @@ public class GlState
private AlphaState() private AlphaState()
{ {
this.alphaTest = new GlState.BooleanState(GL46.GL_ALPHA_TEST); this.alphaTest = new GlState.BooleanState(GL15.GL_ALPHA_TEST);
this.func = GL46.GL_ALWAYS; this.func = GL15.GL_ALWAYS;
this.ref = -1.0F; this.ref = -1.0F;
} }
} }
@ -402,11 +402,11 @@ public class GlState
private BlendState() private BlendState()
{ {
this.blend = new GlState.BooleanState(GL46.GL_BLEND); this.blend = new GlState.BooleanState(GL15.GL_BLEND);
this.srcFactor = GL46.GL_ONE; this.srcFactor = GL15.GL_ONE;
this.dstFactor = GL46.GL_ZERO; this.dstFactor = GL15.GL_ZERO;
this.srcFactorAlpha = GL46.GL_ONE; this.srcFactorAlpha = GL15.GL_ONE;
this.dstFactorAlpha = GL46.GL_ZERO; this.dstFactorAlpha = GL15.GL_ZERO;
} }
} }
@ -438,11 +438,11 @@ public class GlState
if (state) if (state)
{ {
GL46.glEnable(this.capability); GL15.glEnable(this.capability);
} }
else else
{ {
GL46.glDisable(this.capability); GL15.glDisable(this.capability);
} }
} }
} }
@ -484,9 +484,9 @@ public class GlState
private ColorMaterialState() private ColorMaterialState()
{ {
this.colorMaterial = new GlState.BooleanState(GL46.GL_COLOR_MATERIAL); this.colorMaterial = new GlState.BooleanState(GL15.GL_COLOR_MATERIAL);
this.face = GL46.GL_FRONT_AND_BACK; this.face = GL15.GL_FRONT_AND_BACK;
this.mode = GL46.GL_AMBIENT_AND_DIFFUSE; this.mode = GL15.GL_AMBIENT_AND_DIFFUSE;
} }
} }
@ -497,8 +497,8 @@ public class GlState
private CullState() private CullState()
{ {
this.cullFace = new GlState.BooleanState(GL46.GL_CULL_FACE); this.cullFace = new GlState.BooleanState(GL15.GL_CULL_FACE);
this.mode = GL46.GL_BACK; this.mode = GL15.GL_BACK;
} }
} }
@ -510,9 +510,9 @@ public class GlState
private DepthState() private DepthState()
{ {
this.depthTest = new GlState.BooleanState(GL46.GL_DEPTH_TEST); this.depthTest = new GlState.BooleanState(GL15.GL_DEPTH_TEST);
this.maskEnabled = true; this.maskEnabled = true;
this.depthFunc = GL46.GL_LESS; this.depthFunc = GL15.GL_LESS;
} }
} }
@ -527,9 +527,9 @@ public class GlState
private FogState() private FogState()
{ {
this.fog = new GlState.BooleanState(GL46.GL_FOG); this.fog = new GlState.BooleanState(GL15.GL_FOG);
this.enabled = true; this.enabled = true;
this.mode = GL46.GL_EXP; this.mode = GL15.GL_EXP;
this.density = 1.0F; this.density = 1.0F;
this.start = 0.0F; this.start = 0.0F;
this.end = 1.0F; this.end = 1.0F;
@ -545,8 +545,8 @@ public class GlState
private PolygonOffsetState() private PolygonOffsetState()
{ {
this.polygonOffsetFill = new GlState.BooleanState(GL46.GL_POLYGON_OFFSET_FILL); this.polygonOffsetFill = new GlState.BooleanState(GL15.GL_POLYGON_OFFSET_FILL);
this.polygonOffsetLine = new GlState.BooleanState(GL46.GL_POLYGON_OFFSET_LINE); this.polygonOffsetLine = new GlState.BooleanState(GL15.GL_POLYGON_OFFSET_LINE);
this.factor = 0.0F; this.factor = 0.0F;
this.units = 0.0F; this.units = 0.0F;
} }
@ -559,7 +559,7 @@ public class GlState
private TextureState() private TextureState()
{ {
this.texture2DState = new GlState.BooleanState(GL46.GL_TEXTURE_2D); this.texture2DState = new GlState.BooleanState(GL15.GL_TEXTURE_2D);
this.textureName = 0; this.textureName = 0;
} }
} }

View file

@ -4,7 +4,7 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.entity.RenderItem; import client.renderer.entity.RenderItem;
@ -50,11 +50,11 @@ public class ItemRenderer
public static void enableGUIStandardItemLighting() public static void enableGUIStandardItemLighting()
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glRotatef(-30.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-30.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(165.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(165.0F, 1.0F, 0.0F, 0.0F);
enableStandardItemLighting(); enableStandardItemLighting();
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
public static void enableStandardItemLighting() public static void enableStandardItemLighting()
@ -63,22 +63,22 @@ public class ItemRenderer
GlState.enableLight(0); GlState.enableLight(0);
GlState.enableLight(1); GlState.enableLight(1);
GlState.enableColorMaterial(); GlState.enableColorMaterial();
GlState.colorMaterial(GL46.GL_FRONT_AND_BACK, GL46.GL_AMBIENT_AND_DIFFUSE); GlState.colorMaterial(GL15.GL_FRONT_AND_BACK, GL15.GL_AMBIENT_AND_DIFFUSE);
float f = 0.4F; float f = 0.4F;
float f1 = 0.6F; float f1 = 0.6F;
float f2 = 0.0F; float f2 = 0.0F;
GL46.glLightfv(GL46.GL_LIGHT0, GL46.GL_POSITION, setColorBuffer( GL15.glLightfv(GL15.GL_LIGHT0, GL15.GL_POSITION, setColorBuffer(
(float)LIGHT0_POS.xCoord, (float)LIGHT0_POS.yCoord, (float)LIGHT0_POS.zCoord, 0.0f)); (float)LIGHT0_POS.xCoord, (float)LIGHT0_POS.yCoord, (float)LIGHT0_POS.zCoord, 0.0f));
GL46.glLightfv(GL46.GL_LIGHT0, GL46.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F)); GL15.glLightfv(GL15.GL_LIGHT0, GL15.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
GL46.glLightfv(GL46.GL_LIGHT0, GL46.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F)); GL15.glLightfv(GL15.GL_LIGHT0, GL15.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
GL46.glLightfv(GL46.GL_LIGHT0, GL46.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F)); GL15.glLightfv(GL15.GL_LIGHT0, GL15.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
GL46.glLightfv(GL46.GL_LIGHT1, GL46.GL_POSITION, setColorBuffer( GL15.glLightfv(GL15.GL_LIGHT1, GL15.GL_POSITION, setColorBuffer(
(float)LIGHT1_POS.xCoord, (float)LIGHT1_POS.yCoord, (float)LIGHT1_POS.zCoord, 0.0f)); (float)LIGHT1_POS.xCoord, (float)LIGHT1_POS.yCoord, (float)LIGHT1_POS.zCoord, 0.0f));
GL46.glLightfv(GL46.GL_LIGHT1, GL46.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F)); GL15.glLightfv(GL15.GL_LIGHT1, GL15.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
GL46.glLightfv(GL46.GL_LIGHT1, GL46.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F)); GL15.glLightfv(GL15.GL_LIGHT1, GL15.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
GL46.glLightfv(GL46.GL_LIGHT1, GL46.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F)); GL15.glLightfv(GL15.GL_LIGHT1, GL15.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
GL46.glLightModelfv(GL46.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F)); GL15.glLightModelfv(GL15.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F));
} }
public static void disableStandardItemLighting() public static void disableStandardItemLighting()
@ -102,26 +102,26 @@ public class ItemRenderer
{ {
Item item = heldStack.getItem(); Item item = heldStack.getItem();
Block block = item.getBlock(); Block block = item.getBlock();
GL46.glPushMatrix(); GL15.glPushMatrix();
if (this.itemRenderer.shouldRenderItemIn3D(heldStack)) if (this.itemRenderer.shouldRenderItemIn3D(heldStack))
{ {
GL46.glScalef(2.0F, 2.0F, 2.0F); GL15.glScalef(2.0F, 2.0F, 2.0F);
} }
this.itemRenderer.renderItemForEntity(heldStack, entityIn, third); this.itemRenderer.renderItemForEntity(heldStack, entityIn, third);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }
private void rotateArroundXAndY(float angle, float angleY) private void rotateArroundXAndY(float angle, float angleY)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glRotatef(angle, 1.0F, 0.0F, 0.0F); GL15.glRotatef(angle, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(angleY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(angleY, 0.0F, 1.0F, 0.0F);
ItemRenderer.enableStandardItemLighting(); ItemRenderer.enableStandardItemLighting();
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
private void setLightMapFromPlayer(EntityNPC clientPlayer) private void setLightMapFromPlayer(EntityNPC clientPlayer)
@ -129,15 +129,15 @@ public class ItemRenderer
int i = this.gm.renderer.getCombinedBrightness(new BlockPos(clientPlayer.posX, clientPlayer.posY + (double)clientPlayer.getEyeHeight(), clientPlayer.posZ)); int i = this.gm.renderer.getCombinedBrightness(new BlockPos(clientPlayer.posX, clientPlayer.posY + (double)clientPlayer.getEyeHeight(), clientPlayer.posZ));
float f = (float)(i & 65535); float f = (float)(i & 65535);
float f1 = (float)(i >> 16); float f1 = (float)(i >> 16);
GL46.glMultiTexCoord2f(GL46.GL_TEXTURE1, f, f1); GL15.glMultiTexCoord2f(GL15.GL_TEXTURE1, f, f1);
} }
private void rotateWithPlayerRotations(EntityNPC entityplayerspIn, float partialTicks) private void rotateWithPlayerRotations(EntityNPC entityplayerspIn, float partialTicks)
{ {
float f = entityplayerspIn.prevRenderArmPitch + (entityplayerspIn.renderArmPitch - entityplayerspIn.prevRenderArmPitch) * partialTicks; float f = entityplayerspIn.prevRenderArmPitch + (entityplayerspIn.renderArmPitch - entityplayerspIn.prevRenderArmPitch) * partialTicks;
float f1 = entityplayerspIn.prevRenderArmYaw + (entityplayerspIn.renderArmYaw - entityplayerspIn.prevRenderArmYaw) * partialTicks; float f1 = entityplayerspIn.prevRenderArmYaw + (entityplayerspIn.renderArmYaw - entityplayerspIn.prevRenderArmYaw) * partialTicks;
GL46.glRotatef((entityplayerspIn.rotPitch - f) * 0.1F, 1.0F, 0.0F, 0.0F); GL15.glRotatef((entityplayerspIn.rotPitch - f) * 0.1F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef((entityplayerspIn.rotYaw - f1) * 0.1F, 0.0F, 1.0F, 0.0F); GL15.glRotatef((entityplayerspIn.rotYaw - f1) * 0.1F, 0.0F, 1.0F, 0.0F);
} }
private float getMapAngleFromPitch(float pitch) private float getMapAngleFromPitch(float pitch)
@ -214,7 +214,7 @@ public class ItemRenderer
//// Tessellator tessellator = Tessellator.getInstance(); //// Tessellator tessellator = Tessellator.getInstance();
// RenderBuffer worldrenderer = Tessellator.getBuffer(); // RenderBuffer worldrenderer = Tessellator.getBuffer();
// SKC.glNormal3f(0.0F, 0.0F, -1.0F); // SKC.glNormal3f(0.0F, 0.0F, -1.0F);
// worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); // worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
// worldrenderer.pos(-7.0D, 135.0D, 0.0D).tex(0.0D, 1.0D).endVertex(); // worldrenderer.pos(-7.0D, 135.0D, 0.0D).tex(0.0D, 1.0D).endVertex();
// worldrenderer.pos(135.0D, 135.0D, 0.0D).tex(1.0D, 1.0D).endVertex(); // worldrenderer.pos(135.0D, 135.0D, 0.0D).tex(1.0D, 1.0D).endVertex();
// worldrenderer.pos(135.0D, -7.0D, 0.0D).tex(1.0D, 0.0D).endVertex(); // worldrenderer.pos(135.0D, -7.0D, 0.0D).tex(1.0D, 0.0D).endVertex();
@ -233,21 +233,21 @@ public class ItemRenderer
float f = -0.3F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI); float f = -0.3F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
float f1 = 0.4F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI * 2.0F); float f1 = 0.4F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI * 2.0F);
float f2 = -0.4F * ExtMath.sin(swingProgress * (float)Math.PI); float f2 = -0.4F * ExtMath.sin(swingProgress * (float)Math.PI);
GL46.glTranslatef(f, f1, f2); GL15.glTranslatef(f, f1, f2);
GL46.glTranslatef(0.64000005F, -0.6F, -0.71999997F); GL15.glTranslatef(0.64000005F, -0.6F, -0.71999997F);
GL46.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F); GL15.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F);
GL46.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
float f3 = ExtMath.sin(swingProgress * swingProgress * (float)Math.PI); float f3 = ExtMath.sin(swingProgress * swingProgress * (float)Math.PI);
float f4 = ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI); float f4 = ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
GL46.glRotatef(f4 * 70.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(f3 * -20.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
this.gm.getTextureManager().bindTexture(EntityTexManager.getSkin(clientPlayer)); this.gm.getTextureManager().bindTexture(EntityTexManager.getSkin(clientPlayer));
GL46.glTranslatef(-1.0F, 3.6F, 3.5F); GL15.glTranslatef(-1.0F, 3.6F, 3.5F);
GL46.glRotatef(120.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
GL46.glRotatef(200.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
GL46.glScalef(1.0F, 1.0F, 1.0F); GL15.glScalef(1.0F, 1.0F, 1.0F);
GL46.glTranslatef(5.6F, 0.0F, 0.0F); GL15.glTranslatef(5.6F, 0.0F, 0.0F);
RenderNpc render = this.renderManager.getRenderObject(this.gm.player.getModel()); RenderNpc render = this.renderManager.getRenderObject(this.gm.player.getModel());
GlState.disableCull(); GlState.disableCull();
render.renderPlayerArm(this.gm.player); render.renderPlayerArm(this.gm.player);
@ -259,7 +259,7 @@ public class ItemRenderer
float f = -0.4F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI); float f = -0.4F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
float f1 = 0.2F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI * 2.0F); float f1 = 0.2F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI * 2.0F);
float f2 = -0.2F * ExtMath.sin(swingProgress * (float)Math.PI); float f2 = -0.2F * ExtMath.sin(swingProgress * (float)Math.PI);
GL46.glTranslatef(f, f1, f2); GL15.glTranslatef(f, f1, f2);
} }
private void performDrinking(EntityNPC clientPlayer, float partialTicks) private void performDrinking(EntityNPC clientPlayer, float partialTicks)
@ -273,33 +273,33 @@ public class ItemRenderer
f2 = 0.0F; f2 = 0.0F;
} }
GL46.glTranslatef(0.0F, f2, 0.0F); GL15.glTranslatef(0.0F, f2, 0.0F);
float f3 = 1.0F - (float)Math.pow((double)f1, 27.0D); float f3 = 1.0F - (float)Math.pow((double)f1, 27.0D);
GL46.glTranslatef(f3 * 0.6F, f3 * -0.5F, f3 * 0.0F); GL15.glTranslatef(f3 * 0.6F, f3 * -0.5F, f3 * 0.0F);
GL46.glRotatef(f3 * 90.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(f3 * 90.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(f3 * 10.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(f3 * 10.0F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(f3 * 30.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(f3 * 30.0F, 0.0F, 0.0F, 1.0F);
} }
private void transformFirstPersonItem(float equipProgress, float swingProgress) private void transformFirstPersonItem(float equipProgress, float swingProgress)
{ {
GL46.glTranslatef(0.56F, -0.52F, -0.71999997F); GL15.glTranslatef(0.56F, -0.52F, -0.71999997F);
GL46.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F); GL15.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F);
GL46.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
float f = ExtMath.sin(swingProgress * swingProgress * (float)Math.PI); float f = ExtMath.sin(swingProgress * swingProgress * (float)Math.PI);
float f1 = ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI); float f1 = ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
GL46.glRotatef(f * -20.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(f * -20.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(f1 * -20.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(f1 * -20.0F, 0.0F, 0.0F, 1.0F);
GL46.glRotatef(f1 * -80.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(f1 * -80.0F, 1.0F, 0.0F, 0.0F);
GL46.glScalef(0.4F, 0.4F, 0.4F); GL15.glScalef(0.4F, 0.4F, 0.4F);
} }
private void doBowTransformations(float partialTicks, EntityNPC clientPlayer) private void doBowTransformations(float partialTicks, EntityNPC clientPlayer)
{ {
GL46.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F);
GL46.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F);
GL46.glTranslatef(-0.9F, 0.2F, 0.0F); GL15.glTranslatef(-0.9F, 0.2F, 0.0F);
float f = (float)this.itemToRender.getMaxItemUseDuration() - ((float)clientPlayer.getItemInUseCount() - partialTicks + 1.0F); float f = (float)this.itemToRender.getMaxItemUseDuration() - ((float)clientPlayer.getItemInUseCount() - partialTicks + 1.0F);
float f1 = f / 20.0F; float f1 = f / 20.0F;
f1 = (f1 * f1 + f1 * 2.0F) / 3.0F; f1 = (f1 * f1 + f1 * 2.0F) / 3.0F;
@ -314,19 +314,19 @@ public class ItemRenderer
float f2 = ExtMath.sin((f - 0.1F) * 1.3F); float f2 = ExtMath.sin((f - 0.1F) * 1.3F);
float f3 = f1 - 0.1F; float f3 = f1 - 0.1F;
float f4 = f2 * f3; float f4 = f2 * f3;
GL46.glTranslatef(f4 * 0.0F, f4 * 0.01F, f4 * 0.0F); GL15.glTranslatef(f4 * 0.0F, f4 * 0.01F, f4 * 0.0F);
} }
GL46.glTranslatef(f1 * 0.0F, f1 * 0.0F, f1 * 0.1F); GL15.glTranslatef(f1 * 0.0F, f1 * 0.0F, f1 * 0.1F);
GL46.glScalef(1.0F, 1.0F, 1.0F + f1 * 0.2F); GL15.glScalef(1.0F, 1.0F, 1.0F + f1 * 0.2F);
} }
private void doBlockTransformations() private void doBlockTransformations()
{ {
GL46.glTranslatef(-0.5F, 0.2F, 0.0F); GL15.glTranslatef(-0.5F, 0.2F, 0.0F);
GL46.glRotatef(30.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(30.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(60.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
} }
public void renderItemInFirstPerson(float partialTicks) public void renderItemInFirstPerson(float partialTicks)
@ -340,7 +340,7 @@ public class ItemRenderer
this.setLightMapFromPlayer(clientplayer); this.setLightMapFromPlayer(clientplayer);
this.rotateWithPlayerRotations(clientplayer, partialTicks); this.rotateWithPlayerRotations(clientplayer, partialTicks);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glPushMatrix(); GL15.glPushMatrix();
if (this.itemToRender != null && (this.itemToRender.getItem().getWieldType() != null || (clientplayer.getItemInUseCount() > 0 && this.itemToRender.getItemUseAction() != ItemAction.NONE))) if (this.itemToRender != null && (this.itemToRender.getItem().getWieldType() != null || (clientplayer.getItemInUseCount() > 0 && this.itemToRender.getItemUseAction() != ItemAction.NONE)))
{ {
@ -383,7 +383,7 @@ public class ItemRenderer
this.renderPlayerArm(clientplayer, f, f1); this.renderPlayerArm(clientplayer, f, f1);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
ItemRenderer.disableStandardItemLighting(); ItemRenderer.disableStandardItemLighting();
} }
@ -430,7 +430,7 @@ public class ItemRenderer
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
float f = 0.1F; float f = 0.1F;
GlState.color(0.1F, 0.1F, 0.1F, 0.5F); GlState.color(0.1F, 0.1F, 0.1F, 0.5F);
GL46.glPushMatrix(); GL15.glPushMatrix();
float f1 = -1.0F; float f1 = -1.0F;
float f2 = 1.0F; float f2 = 1.0F;
float f3 = -1.0F; float f3 = -1.0F;
@ -440,13 +440,13 @@ public class ItemRenderer
float f7 = atlas.getMaxU(); float f7 = atlas.getMaxU();
float f8 = atlas.getMinV(); float f8 = atlas.getMinV();
float f9 = atlas.getMaxV(); float f9 = atlas.getMaxV();
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-1.0D, -1.0D, -0.5D).tex((double)f7, (double)f9).endVertex(); worldrenderer.pos(-1.0D, -1.0D, -0.5D).tex((double)f7, (double)f9).endVertex();
worldrenderer.pos(1.0D, -1.0D, -0.5D).tex((double)f6, (double)f9).endVertex(); worldrenderer.pos(1.0D, -1.0D, -0.5D).tex((double)f6, (double)f9).endVertex();
worldrenderer.pos(1.0D, 1.0D, -0.5D).tex((double)f6, (double)f8).endVertex(); worldrenderer.pos(1.0D, 1.0D, -0.5D).tex((double)f6, (double)f8).endVertex();
worldrenderer.pos(-1.0D, 1.0D, -0.5D).tex((double)f7, (double)f8).endVertex(); worldrenderer.pos(-1.0D, 1.0D, -0.5D).tex((double)f7, (double)f8).endVertex();
Tessellator.draw(); Tessellator.draw();
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
} }
@ -454,15 +454,15 @@ public class ItemRenderer
{ {
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
GlState.color(1.0F, 1.0F, 1.0F, 0.9F); GlState.color(1.0F, 1.0F, 1.0F, 0.9F);
GlState.depthFunc(GL46.GL_ALWAYS); GlState.depthFunc(GL15.GL_ALWAYS);
GlState.depthMask(false); GlState.depthMask(false);
GlState.enableBlend(); GlState.enableBlend();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
float f = 1.0F; float f = 1.0F;
for (int i = 0; i < 2; ++i) for (int i = 0; i < 2; ++i)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
Sprite textureatlassprite = this.gm.getTextureMapBlocks().getAtlasSprite("blocks/fire_layer_1"); Sprite textureatlassprite = this.gm.getTextureMapBlocks().getAtlasSprite("blocks/fire_layer_1");
this.gm.getTextureManager().bindTexture(TextureMap.BLOCKS); this.gm.getTextureManager().bindTexture(TextureMap.BLOCKS);
float f1 = textureatlassprite.getMinU(); float f1 = textureatlassprite.getMinU();
@ -474,21 +474,21 @@ public class ItemRenderer
float f7 = 0.0F - f / 2.0F; float f7 = 0.0F - f / 2.0F;
float f8 = f7 + f; float f8 = f7 + f;
float f9 = -0.5F; float f9 = -0.5F;
GL46.glTranslatef((float)(-(i * 2 - 1)) * 0.24F, -0.3F, 0.0F); GL15.glTranslatef((float)(-(i * 2 - 1)) * 0.24F, -0.3F, 0.0F);
GL46.glRotatef((float)(i * 2 - 1) * 10.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef((float)(i * 2 - 1) * 10.0F, 0.0F, 1.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos((double)f5, (double)f7, (double)f9).tex((double)f2, (double)f4).endVertex(); worldrenderer.pos((double)f5, (double)f7, (double)f9).tex((double)f2, (double)f4).endVertex();
worldrenderer.pos((double)f6, (double)f7, (double)f9).tex((double)f1, (double)f4).endVertex(); worldrenderer.pos((double)f6, (double)f7, (double)f9).tex((double)f1, (double)f4).endVertex();
worldrenderer.pos((double)f6, (double)f8, (double)f9).tex((double)f1, (double)f3).endVertex(); worldrenderer.pos((double)f6, (double)f8, (double)f9).tex((double)f1, (double)f3).endVertex();
worldrenderer.pos((double)f5, (double)f8, (double)f9).tex((double)f2, (double)f3).endVertex(); worldrenderer.pos((double)f5, (double)f8, (double)f9).tex((double)f2, (double)f3).endVertex();
Tessellator.draw(); Tessellator.draw();
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.disableBlend(); GlState.disableBlend();
GlState.depthMask(true); GlState.depthMask(true);
GlState.depthFunc(GL46.GL_LEQUAL); GlState.depthFunc(GL15.GL_LEQUAL);
} }
public void update() public void update()

View file

@ -5,7 +5,7 @@ import java.nio.ByteOrder;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.nio.IntBuffer; import java.nio.IntBuffer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.block.Block; import common.block.Block;
import common.block.liquid.BlockLiquid; import common.block.liquid.BlockLiquid;
@ -32,9 +32,9 @@ public class MatrixState {
private static float rotationXY; private static float rotationXY;
public static void update(EntityNPC player, boolean flip) { public static void update(EntityNPC player, boolean flip) {
GL46.glGetFloatv(GL46.GL_MODELVIEW_MATRIX, MODELVIEW); GL15.glGetFloatv(GL15.GL_MODELVIEW_MATRIX, MODELVIEW);
GL46.glGetFloatv(GL46.GL_PROJECTION_MATRIX, PROJECTION); GL15.glGetFloatv(GL15.GL_PROJECTION_MATRIX, PROJECTION);
GL46.glGetIntegerv(GL46.GL_VIEWPORT, VIEWPORT); GL15.glGetIntegerv(GL15.GL_VIEWPORT, VIEWPORT);
float x = (float)((VIEWPORT.get(0) + VIEWPORT.get(2)) / 2); float x = (float)((VIEWPORT.get(0) + VIEWPORT.get(2)) / 2);
float y = (float)((VIEWPORT.get(1) + VIEWPORT.get(3)) / 2); float y = (float)((VIEWPORT.get(1) + VIEWPORT.get(3)) / 2);
Project.gluUnProject(x, y, 0.0F, MODELVIEW, PROJECTION, VIEWPORT, OBJECTCOORDS); Project.gluUnProject(x, y, 0.0F, MODELVIEW, PROJECTION, VIEWPORT, OBJECTCOORDS);

View file

@ -36,7 +36,7 @@ import java.nio.ByteOrder;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.nio.IntBuffer; import java.nio.IntBuffer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
// 11-jan-2004 Erik Duijs // 11-jan-2004 Erik Duijs
public class Project { public class Project {
@ -201,7 +201,7 @@ public class Project {
matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ); matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ);
matrix.put(3 * 4 + 3, 0); matrix.put(3 * 4 + 3, 0);
GL46.glMultMatrixf(matrix); GL15.glMultMatrixf(matrix);
} }
public static void gluLookAt( public static void gluLookAt(
@ -248,8 +248,8 @@ public class Project {
matrix.put(1 * 4 + 2, -forward[1]); matrix.put(1 * 4 + 2, -forward[1]);
matrix.put(2 * 4 + 2, -forward[2]); matrix.put(2 * 4 + 2, -forward[2]);
GL46.glMultMatrixf(matrix); GL15.glMultMatrixf(matrix);
GL46.glTranslatef(-eyex, -eyey, -eyez); GL15.glTranslatef(-eyex, -eyey, -eyez);
} }
public static boolean gluProject( public static boolean gluProject(

View file

@ -154,7 +154,7 @@ public class RegionRenderCache implements IWorldAccess
} }
} }
return (r > 255 ? 255 : r) << 16 | (g > 255 ? 255 : g) << 16 | (b > 255 ? 255 : b); return (r > 255 ? 255 : r) << 16 | (g > 255 ? 255 : g) << 8 | (b > 255 ? 255 : b);
} }
else else
{ {

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,7 @@ import java.util.Map.Entry;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Supplier; import java.util.function.Supplier;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL20;
import client.Client; import client.Client;
import client.util.FileUtils; import client.util.FileUtils;
@ -46,63 +46,63 @@ public enum Shader {
} }
public ShaderContext bool(String name, boolean x) { public ShaderContext bool(String name, boolean x) {
GL46.glUniform1i(GL46.glGetUniformLocation(this.program, name), x ? 1 : 0); GL20.glUniform1i(GL20.glGetUniformLocation(this.program, name), x ? 1 : 0);
return this; return this;
} }
public ShaderContext integer(String name, int x) { public ShaderContext integer(String name, int x) {
GL46.glUniform1i(GL46.glGetUniformLocation(this.program, name), x); GL20.glUniform1i(GL20.glGetUniformLocation(this.program, name), x);
return this; return this;
} }
public ShaderContext vec(String name, float x) { public ShaderContext vec(String name, float x) {
GL46.glUniform1f(GL46.glGetUniformLocation(this.program, name), x); GL20.glUniform1f(GL20.glGetUniformLocation(this.program, name), x);
return this; return this;
} }
public ShaderContext vec(String name, float x, float y) { public ShaderContext vec(String name, float x, float y) {
GL46.glUniform2f(GL46.glGetUniformLocation(this.program, name), x, y); GL20.glUniform2f(GL20.glGetUniformLocation(this.program, name), x, y);
return this; return this;
} }
public ShaderContext vec(String name, float x, float y, float z) { public ShaderContext vec(String name, float x, float y, float z) {
GL46.glUniform3f(GL46.glGetUniformLocation(this.program, name), x, y, z); GL20.glUniform3f(GL20.glGetUniformLocation(this.program, name), x, y, z);
return this; return this;
} }
public ShaderContext vec(String name, float x, float y, float z, float w) { public ShaderContext vec(String name, float x, float y, float z, float w) {
GL46.glUniform4f(GL46.glGetUniformLocation(this.program, name), x, y, z, w); GL20.glUniform4f(GL20.glGetUniformLocation(this.program, name), x, y, z, w);
return this; return this;
} }
public ShaderContext vec(String name, Vec3 vec) { public ShaderContext vec(String name, Vec3 vec) {
GL46.glUniform3f(GL46.glGetUniformLocation(this.program, name), (float)vec.xCoord, (float)vec.yCoord, (float)vec.zCoord); GL20.glUniform3f(GL20.glGetUniformLocation(this.program, name), (float)vec.xCoord, (float)vec.yCoord, (float)vec.zCoord);
return this; return this;
} }
public ShaderContext vec(String name, Vector3f vec) { public ShaderContext vec(String name, Vector3f vec) {
GL46.glUniform3f(GL46.glGetUniformLocation(this.program, name), vec.x, vec.y, vec.z); GL20.glUniform3f(GL20.glGetUniformLocation(this.program, name), vec.x, vec.y, vec.z);
return this; return this;
} }
public ShaderContext vec(String name, Vector4f vec) { public ShaderContext vec(String name, Vector4f vec) {
GL46.glUniform4f(GL46.glGetUniformLocation(this.program, name), vec.x, vec.y, vec.z, vec.w); GL20.glUniform4f(GL20.glGetUniformLocation(this.program, name), vec.x, vec.y, vec.z, vec.w);
return this; return this;
} }
public ShaderContext matrix(String name, FloatBuffer mat) { public ShaderContext matrix(String name, FloatBuffer mat) {
GL46.glUniformMatrix4fv(GL46.glGetUniformLocation(this.program, name), false, mat); GL20.glUniformMatrix4fv(GL20.glGetUniformLocation(this.program, name), false, mat);
return this; return this;
} }
public ShaderContext matrix(String name, Matrix4f mat) { public ShaderContext matrix(String name, Matrix4f mat) {
mat.store(BUFFER); mat.store(BUFFER);
GL46.glUniformMatrix4fv(GL46.glGetUniformLocation(this.program, name), false, BUFFER); GL20.glUniformMatrix4fv(GL20.glGetUniformLocation(this.program, name), false, BUFFER);
return this; return this;
} }
public ShaderContext color(String name, int color) { public ShaderContext color(String name, int color) {
GL46.glUniform4f(GL46.glGetUniformLocation(this.program, name), GL20.glUniform4f(GL20.glGetUniformLocation(this.program, name),
(float)((int)((color >> 16) & 0xff)) / 255.0f, (float)((int)((color >> 8) & 0xff)) / 255.0f, (float)((int)((color >> 16) & 0xff)) / 255.0f, (float)((int)((color >> 8) & 0xff)) / 255.0f,
(float)((int)(color & 0xff)) / 255.0f, (float)((int)((color >> 24) & 0xff)) / 255.0f (float)((int)(color & 0xff)) / 255.0f, (float)((int)((color >> 24) & 0xff)) / 255.0f
); );
@ -110,7 +110,7 @@ public enum Shader {
} }
public ShaderContext color3(String name, int color) { public ShaderContext color3(String name, int color) {
GL46.glUniform3f(GL46.glGetUniformLocation(this.program, name), GL20.glUniform3f(GL20.glGetUniformLocation(this.program, name),
(float)((int)((color >> 16) & 0xff)) / 255.0f, (float)((int)((color >> 8) & 0xff)) / 255.0f, (float)((int)((color >> 16) & 0xff)) / 255.0f, (float)((int)((color >> 8) & 0xff)) / 255.0f,
(float)((int)(color & 0xff)) / 255.0f (float)((int)(color & 0xff)) / 255.0f
); );
@ -120,7 +120,7 @@ public enum Shader {
public void finish() { public void finish() {
if(context != this) if(context != this)
throw new IllegalStateException("Der Shader-Kontext wird nicht mehr verwendet"); throw new IllegalStateException("Der Shader-Kontext wird nicht mehr verwendet");
GL46.glUseProgram(0); GL20.glUseProgram(0);
context = null; context = null;
} }
} }
@ -179,44 +179,44 @@ public enum Shader {
private boolean compile(String vcode, String fcode) { private boolean compile(String vcode, String fcode) {
String include = this.buildInclude(); String include = this.buildInclude();
int vs = GL46.glCreateShader(GL46.GL_VERTEX_SHADER); int vs = GL20.glCreateShader(GL20.GL_VERTEX_SHADER);
GL46.glShaderSource(vs, "#version 460 compatibility\n" + include + vcode); GL20.glShaderSource(vs, "#version 460 compatibility\n" + include + vcode);
GL46.glCompileShader(vs); GL20.glCompileShader(vs);
int ok = GL46.glGetShaderi(vs, GL46.GL_COMPILE_STATUS); int ok = GL20.glGetShaderi(vs, GL20.GL_COMPILE_STATUS);
if(ok == 0) { if(ok == 0) {
Log.RENDER.error(GL46.glGetShaderInfoLog(vs)); Log.RENDER.error(GL20.glGetShaderInfoLog(vs));
Log.RENDER.error("Fehler beim Kompilieren des Vertex-Shaders '%s'", this.vertex); Log.RENDER.error("Fehler beim Kompilieren des Vertex-Shaders '%s'", this.vertex);
GL46.glDeleteShader(vs); GL20.glDeleteShader(vs);
return false; return false;
} }
int fs = GL46.glCreateShader(GL46.GL_FRAGMENT_SHADER); int fs = GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER);
GL46.glShaderSource(fs, "#version 460 compatibility\n" + include + fcode); GL20.glShaderSource(fs, "#version 460 compatibility\n" + include + fcode);
GL46.glCompileShader(fs); GL20.glCompileShader(fs);
ok = GL46.glGetShaderi(fs, GL46.GL_COMPILE_STATUS); ok = GL20.glGetShaderi(fs, GL20.GL_COMPILE_STATUS);
if(ok == 0) { if(ok == 0) {
Log.RENDER.error(GL46.glGetShaderInfoLog(fs)); Log.RENDER.error(GL20.glGetShaderInfoLog(fs));
Log.RENDER.error("Fehler beim Kompilieren des Fragment-Shaders '%s'", this.fragment); Log.RENDER.error("Fehler beim Kompilieren des Fragment-Shaders '%s'", this.fragment);
GL46.glDeleteShader(vs); GL20.glDeleteShader(vs);
GL46.glDeleteShader(fs); GL20.glDeleteShader(fs);
return false; return false;
} }
int pr = GL46.glCreateProgram(); int pr = GL20.glCreateProgram();
GL46.glAttachShader(pr, vs); GL20.glAttachShader(pr, vs);
GL46.glAttachShader(pr, fs); GL20.glAttachShader(pr, fs);
GL46.glLinkProgram(pr); GL20.glLinkProgram(pr);
ok = GL46.glGetProgrami(pr, GL46.GL_LINK_STATUS); ok = GL20.glGetProgrami(pr, GL20.GL_LINK_STATUS);
if(ok == 0) { if(ok == 0) {
Log.RENDER.error(GL46.glGetProgramInfoLog(pr)); Log.RENDER.error(GL20.glGetProgramInfoLog(pr));
Log.RENDER.error("Fehler beim Verbinden des Shader-Programms '%s' / '%s'", this.vertex, this.fragment); Log.RENDER.error("Fehler beim Verbinden des Shader-Programms '%s' / '%s'", this.vertex, this.fragment);
GL46.glDeleteShader(vs); GL20.glDeleteShader(vs);
GL46.glDeleteShader(fs); GL20.glDeleteShader(fs);
GL46.glDeleteProgram(pr); GL20.glDeleteProgram(pr);
return false; return false;
} }
GL46.glDeleteShader(vs); GL20.glDeleteShader(vs);
GL46.glDeleteShader(fs); GL20.glDeleteShader(fs);
if(this.program != 0) { if(this.program != 0) {
GL46.glDeleteProgram(this.program); GL20.glDeleteProgram(this.program);
Log.RENDER.debug("Shader '%s' / '%s' / ID #%d wurde mit ID #%d neu geladen", this.vertex, this.fragment, this.program, pr); Log.RENDER.debug("Shader '%s' / '%s' / ID #%d wurde mit ID #%d neu geladen", this.vertex, this.fragment, this.program, pr);
} }
else { else {
@ -224,7 +224,7 @@ public enum Shader {
} }
this.program = pr; this.program = pr;
if(this.init != null) { if(this.init != null) {
GL46.glUseProgram(this.program); GL20.glUseProgram(this.program);
context = new ShaderContext(this.program); context = new ShaderContext(this.program);
this.init.accept(context); this.init.accept(context);
context.finish(); context.finish();
@ -255,7 +255,7 @@ public enum Shader {
private boolean unload() { private boolean unload() {
if(this.program == 0) if(this.program == 0)
return false; return false;
GL46.glDeleteProgram(this.program); GL20.glDeleteProgram(this.program);
Log.RENDER.debug("Shader '%s' / '%s' / ID #%d wurde gelöscht", this.vertex, this.fragment, this.program); Log.RENDER.debug("Shader '%s' / '%s' / ID #%d wurde gelöscht", this.vertex, this.fragment, this.program);
this.program = 0; this.program = 0;
return true; return true;
@ -264,7 +264,7 @@ public enum Shader {
public ShaderContext use() { public ShaderContext use() {
if(context != null) if(context != null)
throw new IllegalStateException("Ein Shader wird bereits verwendet"); throw new IllegalStateException("Ein Shader wird bereits verwendet");
GL46.glUseProgram(this.program); GL20.glUseProgram(this.program);
context = new ShaderContext(this.program); context = new ShaderContext(this.program);
if(this.draw != null) if(this.draw != null)
this.draw.accept(context); this.draw.accept(context);

View file

@ -3,7 +3,7 @@ package client.renderer;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
public abstract class Tessellator public abstract class Tessellator
{ {
@ -35,29 +35,29 @@ public abstract class Tessellator
switch (vertexformatelement$enumusage) switch (vertexformatelement$enumusage)
{ {
case POSITION: case POSITION:
GL46.glVertexPointer(vertexformatelement.count(), k, i, bytebuffer); GL15.glVertexPointer(vertexformatelement.count(), k, i, bytebuffer);
GL46.glEnableClientState(GL46.GL_VERTEX_ARRAY); GL15.glEnableClientState(GL15.GL_VERTEX_ARRAY);
break; break;
case UV: case UV:
GL46.glClientActiveTexture(GL46.GL_TEXTURE0 + l); GL15.glClientActiveTexture(GL15.GL_TEXTURE0 + l);
GL46.glTexCoordPointer(vertexformatelement.count(), k, i, bytebuffer); GL15.glTexCoordPointer(vertexformatelement.count(), k, i, bytebuffer);
GL46.glEnableClientState(GL46.GL_TEXTURE_COORD_ARRAY); GL15.glEnableClientState(GL15.GL_TEXTURE_COORD_ARRAY);
GL46.glClientActiveTexture(GL46.GL_TEXTURE0); GL15.glClientActiveTexture(GL15.GL_TEXTURE0);
break; break;
case COLOR: case COLOR:
GL46.glColorPointer(vertexformatelement.count(), k, i, bytebuffer); GL15.glColorPointer(vertexformatelement.count(), k, i, bytebuffer);
GL46.glEnableClientState(GL46.GL_COLOR_ARRAY); GL15.glEnableClientState(GL15.GL_COLOR_ARRAY);
break; break;
case NORMAL: case NORMAL:
GL46.glNormalPointer(k, i, bytebuffer); GL15.glNormalPointer(k, i, bytebuffer);
GL46.glEnableClientState(GL46.GL_NORMAL_ARRAY); GL15.glEnableClientState(GL15.GL_NORMAL_ARRAY);
} }
} }
GL46.glDrawArrays(BUFFER.getDrawMode(), 0, BUFFER.getVertexCount()); GL15.glDrawArrays(BUFFER.getDrawMode(), 0, BUFFER.getVertexCount());
int i1 = 0; int i1 = 0;
for (int j1 = list.size(); i1 < j1; ++i1) for (int j1 = list.size(); i1 < j1; ++i1)
@ -69,22 +69,22 @@ public abstract class Tessellator
switch (vertexformatelement$enumusage1) switch (vertexformatelement$enumusage1)
{ {
case POSITION: case POSITION:
GL46.glDisableClientState(GL46.GL_VERTEX_ARRAY); GL15.glDisableClientState(GL15.GL_VERTEX_ARRAY);
break; break;
case UV: case UV:
GL46.glClientActiveTexture(GL46.GL_TEXTURE0 + k1); GL15.glClientActiveTexture(GL15.GL_TEXTURE0 + k1);
GL46.glDisableClientState(GL46.GL_TEXTURE_COORD_ARRAY); GL15.glDisableClientState(GL15.GL_TEXTURE_COORD_ARRAY);
GL46.glClientActiveTexture(GL46.GL_TEXTURE0); GL15.glClientActiveTexture(GL15.GL_TEXTURE0);
break; break;
case COLOR: case COLOR:
GL46.glDisableClientState(GL46.GL_COLOR_ARRAY); GL15.glDisableClientState(GL15.GL_COLOR_ARRAY);
GlState.resetColor(); GlState.resetColor();
break; break;
case NORMAL: case NORMAL:
GL46.glDisableClientState(GL46.GL_NORMAL_ARRAY); GL15.glDisableClientState(GL15.GL_NORMAL_ARRAY);
} }
} }
} }

View file

@ -2,7 +2,7 @@ package client.renderer;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
public class VertexBuffer { public class VertexBuffer {
private int id; private int id;
@ -11,31 +11,31 @@ public class VertexBuffer {
public VertexBuffer(VertexFormat format) { public VertexBuffer(VertexFormat format) {
this.format = format; this.format = format;
this.id = GL46.glGenBuffers(); this.id = GL15.glGenBuffers();
} }
public void bindBuffer() { public void bindBuffer() {
GL46.glBindBuffer(GL46.GL_ARRAY_BUFFER, this.id); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, this.id);
} }
public void bufferData(ByteBuffer buffer) { public void bufferData(ByteBuffer buffer) {
this.bindBuffer(); this.bindBuffer();
GL46.glBufferData(GL46.GL_ARRAY_BUFFER, buffer, GL46.GL_STATIC_DRAW); GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer, GL15.GL_STATIC_DRAW);
this.unbindBuffer(); this.unbindBuffer();
this.count = buffer.limit() / this.format.getNextOffset(); this.count = buffer.limit() / this.format.getNextOffset();
} }
public void drawArrays(int mode) { public void drawArrays(int mode) {
GL46.glDrawArrays(mode, 0, this.count); GL15.glDrawArrays(mode, 0, this.count);
} }
public void unbindBuffer() { public void unbindBuffer() {
GL46.glBindBuffer(GL46.GL_ARRAY_BUFFER, 0); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
} }
public void deleteGlBuffers() { public void deleteGlBuffers() {
if(this.id >= 0) { if(this.id >= 0) {
GL46.glDeleteBuffers(this.id); GL15.glDeleteBuffers(this.id);
this.id = -1; this.id = -1;
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer; package client.renderer;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
public record VertexFormatElement(int index, VertexFormatElement.EnumType type, VertexFormatElement.EnumUsage usage, int count) { public record VertexFormatElement(int index, VertexFormatElement.EnumType type, VertexFormatElement.EnumUsage usage, int count) {
public String toString() { public String toString() {
@ -33,13 +33,13 @@ public record VertexFormatElement(int index, VertexFormatElement.EnumType type,
} }
public static enum EnumType { public static enum EnumType {
FLOAT(4, "Float", GL46.GL_FLOAT), FLOAT(4, "Float", GL15.GL_FLOAT),
UBYTE(1, "Unsigned Byte", GL46.GL_UNSIGNED_BYTE), UBYTE(1, "Unsigned Byte", GL15.GL_UNSIGNED_BYTE),
BYTE(1, "Byte", GL46.GL_BYTE), BYTE(1, "Byte", GL15.GL_BYTE),
USHORT(2, "Unsigned Short", GL46.GL_UNSIGNED_SHORT), USHORT(2, "Unsigned Short", GL15.GL_UNSIGNED_SHORT),
SHORT(2, "Short", GL46.GL_SHORT), SHORT(2, "Short", GL15.GL_SHORT),
UINT(4, "Unsigned Int", GL46.GL_UNSIGNED_INT), UINT(4, "Unsigned Int", GL15.GL_UNSIGNED_INT),
INT(4, "Int", GL46.GL_INT); INT(4, "Int", GL15.GL_INT);
private final int size; private final int size;
private final String name; private final String name;

View file

@ -73,9 +73,9 @@ public class FaceBakery
FACINGS[Constants.EAST_INDEX] = EnumFaceDirection.EAST; FACINGS[Constants.EAST_INDEX] = EnumFaceDirection.EAST;
} }
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, Sprite sprite, Facing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade, float shine, boolean asItem) public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, Sprite sprite, Facing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{ {
int[] aint = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo), modelRotationIn, partRotation, uvLocked, shade, shine, asItem); int[] aint = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo), modelRotationIn, partRotation, uvLocked, shade);
Facing enumfacing = getFacingFromVertexData(aint); Facing enumfacing = getFacingFromVertexData(aint);
if (uvLocked) if (uvLocked)
@ -91,13 +91,13 @@ public class FaceBakery
return new BakedQuad(aint, face.tint, enumfacing); return new BakedQuad(aint, face.tint, enumfacing);
} }
private int[] makeQuadVertexData(BlockPartFace partFace, Sprite sprite, Facing facing, float[] p_178405_4_, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade, float shine, boolean asItem) private int[] makeQuadVertexData(BlockPartFace partFace, Sprite sprite, Facing facing, float[] p_178405_4_, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{ {
int[] aint = new int[28]; int[] aint = new int[28];
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
{ {
this.fillVertexData(aint, i, facing, partFace, p_178405_4_, sprite, modelRotationIn, partRotation, uvLocked, shade, shine, asItem); this.fillVertexData(aint, i, facing, partFace, p_178405_4_, sprite, modelRotationIn, partRotation, uvLocked, shade);
} }
return aint; return aint;
@ -133,30 +133,6 @@ public class FaceBakery
} }
} }
private static int getFaceNormal(Facing facing)
{
switch (facing)
{
case DOWN:
default:
return 0x008100;
case UP:
return 0x007f00;
case WEST:
return 0x000081;
case EAST:
return 0x00007f;
case NORTH:
return 0x810000;
case SOUTH:
return 0x7f0000;
}
}
public static int getFaceNormal(float shine, Facing shade) {
return (int)((shine / 32.0f) * 127.0f) << 24 | (shade != null ? getFaceNormal(shade) : 0x000000);
}
private float[] getPositionsDiv16(Vector3f pos1, Vector3f pos2) private float[] getPositionsDiv16(Vector3f pos1, Vector3f pos2)
{ {
float[] afloat = new float[Facing.values().length]; float[] afloat = new float[Facing.values().length];
@ -169,24 +145,24 @@ public class FaceBakery
return afloat; return afloat;
} }
private void fillVertexData(int[] faceData, int vertexIndex, Facing facing, BlockPartFace partFace, float[] p_178402_5_, Sprite sprite, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade, float shine, boolean asItem) private void fillVertexData(int[] faceData, int vertexIndex, Facing facing, BlockPartFace partFace, float[] p_178402_5_, Sprite sprite, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{ {
Facing enumfacing = modelRotationIn.rotateFace(facing); Facing enumfacing = modelRotationIn.rotateFace(facing);
int normColor = asItem ? (shade ? getFaceShadeColor(enumfacing) : 0xffffffff) : getFaceNormal(shine, shade ? enumfacing : null); int color = shade ? getFaceShadeColor(enumfacing) : 0xffffffff;
VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.getFacing(facing).getVertexInformation(vertexIndex); VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.getFacing(facing).getVertexInformation(vertexIndex);
Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.xIndex], p_178402_5_[enumfacedirection$vertexinformation.yIndex], p_178402_5_[enumfacedirection$vertexinformation.zIndex]); Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.xIndex], p_178402_5_[enumfacedirection$vertexinformation.yIndex], p_178402_5_[enumfacedirection$vertexinformation.zIndex]);
this.rotatePart(vector3f, partRotation); this.rotatePart(vector3f, partRotation);
int j = this.rotateVertex(vector3f, facing, vertexIndex, modelRotationIn, uvLocked); int j = this.rotateVertex(vector3f, facing, vertexIndex, modelRotationIn, uvLocked);
this.storeVertexData(faceData, j, vertexIndex, vector3f, normColor, sprite, partFace.uv); this.storeVertexData(faceData, j, vertexIndex, vector3f, color, sprite, partFace.uv);
} }
private void storeVertexData(int[] faceData, int storeIndex, int vertexIndex, Vector3f position, int normColor, Sprite sprite, BlockFaceUV faceUV) private void storeVertexData(int[] faceData, int storeIndex, int vertexIndex, Vector3f position, int color, Sprite sprite, BlockFaceUV faceUV)
{ {
int i = storeIndex * 7; int i = storeIndex * 7;
faceData[i] = Float.floatToRawIntBits(position.x); faceData[i] = Float.floatToRawIntBits(position.x);
faceData[i + 1] = Float.floatToRawIntBits(position.y); faceData[i + 1] = Float.floatToRawIntBits(position.y);
faceData[i + 2] = Float.floatToRawIntBits(position.z); faceData[i + 2] = Float.floatToRawIntBits(position.z);
faceData[i + 3] = normColor; faceData[i + 3] = color;
faceData[i + 4] = Float.floatToRawIntBits(sprite.getInterpolatedU((double)faceUV.getU(vertexIndex))); faceData[i + 4] = Float.floatToRawIntBits(sprite.getInterpolatedU((double)faceUV.getU(vertexIndex)));
faceData[i + 4 + 1] = Float.floatToRawIntBits(sprite.getInterpolatedV((double)faceUV.getV(vertexIndex))); faceData[i + 4 + 1] = Float.floatToRawIntBits(sprite.getInterpolatedV((double)faceUV.getV(vertexIndex)));
} }

View file

@ -61,7 +61,6 @@ public abstract class ModelBakery
for(Entry<State, String> entry : map.entrySet()) { for(Entry<State, String> entry : map.entrySet()) {
ModelBlock model = (ModelBlock)entry.getKey().getBlock().getModel(provider, BlockRegistry.getName(entry.getKey().getBlock()) ModelBlock model = (ModelBlock)entry.getKey().getBlock().getModel(provider, BlockRegistry.getName(entry.getKey().getBlock())
.toString(), entry.getKey()); .toString(), entry.getKey());
model.setShinyness(entry.getKey().getBlock().getShinyness());
models.put(entry.getValue(), model); models.put(entry.getValue(), model);
variants.add(entry.getValue()); variants.add(entry.getValue());
} }
@ -175,7 +174,7 @@ public abstract class ModelBakery
if (modelblock != null) if (modelblock != null)
{ {
bakedRegistry.put(modelresourcelocation, bakeModel(sprites, faceBakery, textureMap.getMissingSprite(), bakedRegistry.put(modelresourcelocation, bakeModel(sprites, faceBakery, textureMap.getMissingSprite(),
modelblock, modelblock.getRotation(), modelblock.isUvLocked(), false)); modelblock, modelblock.getRotation(), modelblock.isUvLocked()));
} }
else else
{ {
@ -196,7 +195,7 @@ public abstract class ModelBakery
else else
{ {
bakedRegistry.put(entry, bakeModel(sprites, faceBakery, textureMap.getMissingSprite(), bakedRegistry.put(entry, bakeModel(sprites, faceBakery, textureMap.getMissingSprite(),
modelblock1, modelblock1.getRotation(), modelblock1.isUvLocked(), true)); modelblock1, modelblock1.getRotation(), modelblock1.isUvLocked()));
} }
} }
else else
@ -219,7 +218,7 @@ public abstract class ModelBakery
} }
private static IBakedModel bakeModel(Map<String, Sprite> sprites, FaceBakery faceBakery, private static IBakedModel bakeModel(Map<String, Sprite> sprites, FaceBakery faceBakery,
Sprite fallback, ModelBlock modelBlockIn, ModelRotation modelRotationIn, boolean uvLocked, boolean asItem) Sprite fallback, ModelBlock modelBlockIn, ModelRotation modelRotationIn, boolean uvLocked)
{ {
Sprite particle = sprites.get(modelBlockIn.getPrimary()); Sprite particle = sprites.get(modelBlockIn.getPrimary());
BakedModel.Builder builder = new BakedModel.Builder(modelBlockIn).setTexture(particle == null ? fallback : particle); BakedModel.Builder builder = new BakedModel.Builder(modelBlockIn).setTexture(particle == null ? fallback : particle);
@ -232,9 +231,9 @@ public abstract class ModelBakery
sprite = sprite == null ? fallback : sprite; sprite = sprite == null ? fallback : sprite;
if (face.cull == null) if (face.cull == null)
builder.addGeneralQuad(faceBakery.makeBakedQuad(blockpart.positionFrom, blockpart.positionTo, face, sprite, enumfacing, modelRotationIn, blockpart.partRotation, uvLocked, blockpart.shade, modelBlockIn.getShinyness(), asItem)); builder.addGeneralQuad(faceBakery.makeBakedQuad(blockpart.positionFrom, blockpart.positionTo, face, sprite, enumfacing, modelRotationIn, blockpart.partRotation, uvLocked, blockpart.shade));
else else
builder.addFaceQuad(modelRotationIn.rotateFace(face.cull), faceBakery.makeBakedQuad(blockpart.positionFrom, blockpart.positionTo, face, sprite, enumfacing, modelRotationIn, blockpart.partRotation, uvLocked, blockpart.shade, modelBlockIn.getShinyness(), asItem)); builder.addFaceQuad(modelRotationIn.rotateFace(face.cull), faceBakery.makeBakedQuad(blockpart.positionFrom, blockpart.positionTo, face, sprite, enumfacing, modelRotationIn, blockpart.partRotation, uvLocked, blockpart.shade));
} }
} }
return builder.makeBakedModel(); return builder.makeBakedModel();

View file

@ -21,7 +21,6 @@ public class ModelBlock extends Model {
private ModelRotation rotation; private ModelRotation rotation;
private boolean uvLock; private boolean uvLock;
private GuiPosition transform; private GuiPosition transform;
private float shinyness;
private BlockPart lastPart; private BlockPart lastPart;
private BlockPartFace[] last; private BlockPartFace[] last;
@ -160,12 +159,4 @@ public class ModelBlock extends Model {
public boolean isUvLocked() { public boolean isUvLocked() {
return this.uvLock; return this.uvLock;
} }
public void setShinyness(float shinyness) {
this.shinyness = shinyness;
}
public float getShinyness() {
return this.shinyness;
}
} }

View file

@ -8,7 +8,7 @@ import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
@ -241,20 +241,20 @@ public class RenderChunk
private void preRenderBlocks(RenderBuffer worldRendererIn, BlockPos pos) private void preRenderBlocks(RenderBuffer worldRendererIn, BlockPos pos)
{ {
worldRendererIn.begin(GL46.GL_QUADS, DefaultVertexFormats.BLOCK); worldRendererIn.begin(GL15.GL_QUADS, DefaultVertexFormats.BLOCK);
worldRendererIn.setTranslation((double)(-pos.getX()), (double)(-pos.getY()), (double)(-pos.getZ())); worldRendererIn.setTranslation((double)(-pos.getX()), (double)(-pos.getY()), (double)(-pos.getZ()));
} }
private void initModelviewMatrix() private void initModelviewMatrix()
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glLoadIdentity(); GL15.glLoadIdentity();
float f = 1.000001F; float f = 1.000001F;
GL46.glTranslatef(-8.0F, -8.0F, -8.0F); GL15.glTranslatef(-8.0F, -8.0F, -8.0F);
GL46.glScalef(f, f, f); GL15.glScalef(f, f, f);
GL46.glTranslatef(8.0F, 8.0F, 8.0F); GL15.glTranslatef(8.0F, 8.0F, 8.0F);
GL46.glGetFloatv(2982, this.modelviewMatrix); GL15.glGetFloatv(2982, this.modelviewMatrix);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
public FloatBuffer getModelviewMatrix() public FloatBuffer getModelviewMatrix()

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.layers.LayerArachnoidArmor; import client.renderer.layers.LayerArachnoidArmor;
import client.renderer.model.ModelArachnoid; import client.renderer.model.ModelArachnoid;
@ -22,10 +22,10 @@ public class RenderArachnoid extends RenderHumanoid
// } // }
protected void renderLayers(EntityNPC entity, float swing, float amount, float partial, float time, float dYaw, float dPitch, float scale) { protected void renderLayers(EntityNPC entity, float swing, float amount, float partial, float time, float dYaw, float dPitch, float scale) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f); GL15.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f);
super.renderLayers(entity, swing, amount, partial, time, dYaw, dPitch, scale); super.renderLayers(entity, swing, amount, partial, time, dYaw, dPitch, scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
public ModelArachnoid getMainModel() public ModelArachnoid getMainModel()

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -26,10 +26,10 @@ public class RenderArrow extends Render<EntityArrow>
{ {
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
GL46.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F); GL15.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
// Tessellator tessellator = Tessellator.getInstance(); // Tessellator tessellator = Tessellator.getInstance();
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
int i = 0; int i = 0;
@ -48,21 +48,21 @@ public class RenderArrow extends Render<EntityArrow>
if (f9 > 0.0F) if (f9 > 0.0F)
{ {
float f10 = -ExtMath.sin(f9 * 3.0F) * f9; float f10 = -ExtMath.sin(f9 * 3.0F) * f9;
GL46.glRotatef(f10, 0.0F, 0.0F, 1.0F); GL15.glRotatef(f10, 0.0F, 0.0F, 1.0F);
} }
GL46.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
GL46.glScalef(f8, f8, f8); GL15.glScalef(f8, f8, f8);
GL46.glTranslatef(-4.0F, 0.0F, 0.0F); GL15.glTranslatef(-4.0F, 0.0F, 0.0F);
GL46.glNormal3f(f8, 0.0F, 0.0F); GL15.glNormal3f(f8, 0.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex(); worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex(); worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex(); worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex(); worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
Tessellator.draw(); Tessellator.draw();
GL46.glNormal3f(-f8, 0.0F, 0.0F); GL15.glNormal3f(-f8, 0.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex(); worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex(); worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f7).endVertex(); worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
@ -71,9 +71,9 @@ public class RenderArrow extends Render<EntityArrow>
for (int j = 0; j < 4; ++j) for (int j = 0; j < 4; ++j)
{ {
GL46.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
GL46.glNormal3f(0.0F, 0.0F, f8); GL15.glNormal3f(0.0F, 0.0F, f8);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex(); worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex();
worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex(); worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex();
worldrenderer.pos(8.0D, 2.0D, 0.0D).tex((double)f1, (double)f3).endVertex(); worldrenderer.pos(8.0D, 2.0D, 0.0D).tex((double)f1, (double)f3).endVertex();
@ -82,7 +82,7 @@ public class RenderArrow extends Render<EntityArrow>
} }
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.model.ModelBat; import client.renderer.model.ModelBat;
import common.entity.animal.EntityBat; import common.entity.animal.EntityBat;
@ -30,18 +30,18 @@ public class RenderBat extends RenderLiving<EntityBat>
*/ */
protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime) protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime)
{ {
GL46.glScalef(0.35F, 0.35F, 0.35F); GL15.glScalef(0.35F, 0.35F, 0.35F);
} }
protected void rotateCorpse(EntityBat bat, float p_77043_2_, float p_77043_3_, float partialTicks) protected void rotateCorpse(EntityBat bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{ {
if (!bat.getIsBatHanging()) if (!bat.getIsBatHanging())
{ {
GL46.glTranslatef(0.0F, ExtMath.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F); GL15.glTranslatef(0.0F, ExtMath.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
} }
else else
{ {
GL46.glTranslatef(0.0F, -0.1F, 0.0F); GL15.glTranslatef(0.0F, -0.1F, 0.0F);
} }
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks); super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.texture.TextureMap; import client.renderer.texture.TextureMap;
@ -21,13 +21,13 @@ public class RenderBlockEntity extends Render<Entity>
public void doRender(Entity entity, double x, double y, double z, float partialTicks) public void doRender(Entity entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y + 0.5F, (float)z); GL15.glTranslatef((float)x, (float)y + 0.5F, (float)z);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GL46.glTranslatef(-0.5F, -0.5F, 0.5F); GL15.glTranslatef(-0.5F, -0.5F, 0.5F);
Client.CLIENT.renderer.renderBlockEntity(this.state, new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ)); Client.CLIENT.renderer.renderBlockEntity(this.state, new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ));
GL46.glTranslatef(0.0F, 0.0F, 1.0F); GL15.glTranslatef(0.0F, 0.0F, 1.0F);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.model.ModelBase; import client.renderer.model.ModelBase;
import client.renderer.model.ModelBoat; import client.renderer.model.ModelBoat;
@ -26,9 +26,9 @@ public class RenderBoat extends Render<EntityBoat>
*/ */
public void doRender(EntityBoat entity, double x, double y, double z, float partialTicks) public void doRender(EntityBoat entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y + 0.25F, (float)z); GL15.glTranslatef((float)x, (float)y + 0.25F, (float)z);
GL46.glRotatef(180.0F - (entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks), 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F - (entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks), 0.0F, 1.0F, 0.0F);
float f = (float)entity.getTimeSinceHit() - partialTicks; float f = (float)entity.getTimeSinceHit() - partialTicks;
float f1 = (float)entity.getDamageTaken() - partialTicks; float f1 = (float)entity.getDamageTaken() - partialTicks;
@ -39,16 +39,16 @@ public class RenderBoat extends Render<EntityBoat>
if (f > 0.0F) if (f > 0.0F)
{ {
GL46.glRotatef(ExtMath.sin(f) * f * f1 / 10.0F * (float)entity.getForwardDirection(), 1.0F, 0.0F, 0.0F); GL15.glRotatef(ExtMath.sin(f) * f * f1 / 10.0F * (float)entity.getForwardDirection(), 1.0F, 0.0F, 0.0F);
} }
float f2 = 0.75F; float f2 = 0.75F;
GL46.glScalef(f2, f2, f2); GL15.glScalef(f2, f2, f2);
GL46.glScalef(1.0F / f2, 1.0F / f2, 1.0F / f2); GL15.glScalef(1.0F / f2, 1.0F / f2, 1.0F / f2);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GL46.glScalef(-1.0F, -1.0F, 1.0F); GL15.glScalef(-1.0F, -1.0F, 1.0F);
this.modelBoat.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); this.modelBoat.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -22,10 +22,10 @@ public class RenderBullet extends Render<EntityBullet>
{ {
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
GL46.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F); GL15.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
float f = 0.0F; float f = 0.0F;
float f1 = 0.5F; float f1 = 0.5F;
@ -38,18 +38,18 @@ public class RenderBullet extends Render<EntityBullet>
float f8 = 0.05625F; float f8 = 0.05625F;
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
GL46.glScalef(f8, f8, f8); GL15.glScalef(f8, f8, f8);
GL46.glTranslatef(-4.0F, 0.0F, 0.0F); GL15.glTranslatef(-4.0F, 0.0F, 0.0F);
GL46.glNormal3f(f8, 0.0F, 0.0F); GL15.glNormal3f(f8, 0.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex(); worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex(); worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex(); worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex(); worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
Tessellator.draw(); Tessellator.draw();
GL46.glNormal3f(-f8, 0.0F, 0.0F); GL15.glNormal3f(-f8, 0.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex(); worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex(); worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f7).endVertex(); worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
@ -58,9 +58,9 @@ public class RenderBullet extends Render<EntityBullet>
for (int j = 0; j < 4; ++j) for (int j = 0; j < 4; ++j)
{ {
GL46.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
GL46.glNormal3f(0.0F, 0.0F, f8); GL15.glNormal3f(0.0F, 0.0F, f8);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex(); worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex();
worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex(); worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex();
worldrenderer.pos(8.0D, 2.0D, 0.0D).tex((double)f1, (double)f3).endVertex(); worldrenderer.pos(8.0D, 2.0D, 0.0D).tex((double)f1, (double)f3).endVertex();
@ -69,7 +69,7 @@ public class RenderBullet extends Render<EntityBullet>
} }
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.model.ModelBase; import client.renderer.model.ModelBase;
import common.entity.animal.EntityCat; import common.entity.animal.EntityCat;
@ -50,7 +50,7 @@ public class RenderCat extends RenderLiving<EntityCat>
if (entitylivingbaseIn.isTamed()) if (entitylivingbaseIn.isTamed())
{ {
GL46.glScalef(0.8F, 0.8F, 0.8F); GL15.glScalef(0.8F, 0.8F, 0.8F);
} }
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.model.ModelBase; import client.renderer.model.ModelBase;
import client.renderer.model.ModelCrystal; import client.renderer.model.ModelCrystal;
@ -26,13 +26,13 @@ public class RenderCrystal extends Render<EntityCrystal>
public void doRender(EntityCrystal entity, double x, double y, double z, float partialTicks) public void doRender(EntityCrystal entity, double x, double y, double z, float partialTicks)
{ {
float f = (float)entity.innerRotation + partialTicks; float f = (float)entity.innerRotation + partialTicks;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
this.bindTexture(crystalTextures); this.bindTexture(crystalTextures);
float f1 = ExtMath.sin(f * 0.2F) / 2.0F + 0.5F; float f1 = ExtMath.sin(f * 0.2F) / 2.0F + 0.5F;
f1 = f1 * f1 + f1; f1 = f1 * f1 + f1;
this.modelCrystal.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F); this.modelCrystal.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.model.ModelDie; import client.renderer.model.ModelDie;
@ -19,16 +19,16 @@ public class RenderDie extends Render<EntityDie> {
} }
public void doRender(EntityDie entity, double x, double y, double z, float partialTicks) { public void doRender(EntityDie entity, double x, double y, double z, float partialTicks) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y + 0.05F, (float)z); GL15.glTranslatef((float)x, (float)y + 0.05F, (float)z);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
if(entity.getValue() == 0) if(entity.getValue() == 0)
GL46.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f); GL15.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f);
GL46.glScalef(-0.1f, -0.1f, 0.1f); GL15.glScalef(-0.1f, -0.1f, 0.1f);
GlState.disableCull(); GlState.disableCull();
this.model.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); this.model.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GlState.enableCull(); GlState.enableCull();
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -18,7 +18,7 @@ public class RenderEntity extends Render<Entity>
RenderBuffer rb = Tessellator.getBuffer(); RenderBuffer rb = Tessellator.getBuffer();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
rb.setTranslation(x, y, z); rb.setTranslation(x, y, z);
rb.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_NORMAL); rb.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_NORMAL);
rb.pos(bb.minX, bb.maxY, bb.minZ).normal(0.0F, 0.0F, -1.0F).endVertex(); rb.pos(bb.minX, bb.maxY, bb.minZ).normal(0.0F, 0.0F, -1.0F).endVertex();
rb.pos(bb.maxX, bb.maxY, bb.minZ).normal(0.0F, 0.0F, -1.0F).endVertex(); rb.pos(bb.maxX, bb.maxY, bb.minZ).normal(0.0F, 0.0F, -1.0F).endVertex();
rb.pos(bb.maxX, bb.minY, bb.minZ).normal(0.0F, 0.0F, -1.0F).endVertex(); rb.pos(bb.maxX, bb.minY, bb.minZ).normal(0.0F, 0.0F, -1.0F).endVertex();
@ -55,9 +55,9 @@ public class RenderEntity extends Render<Entity>
public void doRender(Entity entity, double x, double y, double z, float partialTicks) public void doRender(Entity entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
renderOffsetAABB(entity.getEntityBoundingBox(), x - entity.lastTickPosX, y - entity.lastTickPosY, z - entity.lastTickPosZ); renderOffsetAABB(entity.getEntityBoundingBox(), x - entity.lastTickPosX, y - entity.lastTickPosY, z - entity.lastTickPosZ);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.blockmodel.IBakedModel; import client.renderer.blockmodel.IBakedModel;
@ -39,12 +39,12 @@ public class RenderEntityItem extends Render<EntityItem>
int i = this.getMultiplier(itemstack); int i = this.getMultiplier(itemstack);
float f = 0.25F; float f = 0.25F;
float f1 = ExtMath.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F; float f1 = ExtMath.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F;
GL46.glTranslatef((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F, (float)p_177077_6_); GL15.glTranslatef((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F, (float)p_177077_6_);
if (flag || this.manager.gm != null) if (flag || this.manager.gm != null)
{ {
float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI); float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI);
GL46.glRotatef(f3, 0.0F, 1.0F, 0.0F); GL15.glRotatef(f3, 0.0F, 1.0F, 0.0F);
} }
if (!flag) if (!flag)
@ -52,7 +52,7 @@ public class RenderEntityItem extends Render<EntityItem>
float f6 = -0.0F * (float)(i - 1) * 0.5F; float f6 = -0.0F * (float)(i - 1) * 0.5F;
float f4 = -0.0F * (float)(i - 1) * 0.5F; float f4 = -0.0F * (float)(i - 1) * 0.5F;
float f5 = -0.046875F * (float)(i - 1) * 0.5F; float f5 = -0.046875F * (float)(i - 1) * 0.5F;
GL46.glTranslatef(f6, f4, f5); GL15.glTranslatef(f6, f4, f5);
} }
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
@ -102,10 +102,10 @@ public class RenderEntityItem extends Render<EntityItem>
// } // }
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
GlState.enableBlend(); GlState.enableBlend();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GL46.glPushMatrix(); GL15.glPushMatrix();
IBakedModel ibakedmodel = this.itemRenderer.getItemModelMesher().getItemModel(itemstack); IBakedModel ibakedmodel = this.itemRenderer.getItemModelMesher().getItemModel(itemstack);
int i = this.func_177077_a(entity, x, y, z, partialTicks, ibakedmodel); int i = this.func_177077_a(entity, x, y, z, partialTicks, ibakedmodel);
@ -113,30 +113,30 @@ public class RenderEntityItem extends Render<EntityItem>
{ {
if (ibakedmodel.isGui3d()) if (ibakedmodel.isGui3d())
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
if (j > 0) if (j > 0)
{ {
float f = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F; float f = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F;
float f1 = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F; float f1 = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F;
float f2 = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F; float f2 = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F;
GL46.glTranslatef(f, f1, f2); GL15.glTranslatef(f, f1, f2);
} }
GL46.glScalef(0.5F, 0.5F, 0.5F); GL15.glScalef(0.5F, 0.5F, 0.5F);
this.itemRenderer.renderItem(itemstack, ibakedmodel); this.itemRenderer.renderItem(itemstack, ibakedmodel);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else else
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
this.itemRenderer.renderItem(itemstack, ibakedmodel); this.itemRenderer.renderItem(itemstack, ibakedmodel);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glTranslatef(0.0F, 0.0F, 0.046875F); GL15.glTranslatef(0.0F, 0.0F, 0.046875F);
} }
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GlState.disableBlend(); GlState.disableBlend();
this.bindEntityTexture(entity); this.bindEntityTexture(entity);

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.texture.TextureMap; import client.renderer.texture.TextureMap;
@ -25,13 +25,13 @@ public class RenderFallingBlock extends Render<EntityFalling> {
if(state != world.getState(pos) && block != Blocks.air && !block.getMaterial().isLiquid()) { if(state != world.getState(pos) && block != Blocks.air && !block.getMaterial().isLiquid()) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y + 0.5F, (float)z); GL15.glTranslatef((float)x, (float)y + 0.5F, (float)z);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GL46.glTranslatef(-0.5F, -0.5F, 0.5F); GL15.glTranslatef(-0.5F, -0.5F, 0.5F);
Client.CLIENT.renderer.renderBlockEntity(state, new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ)); Client.CLIENT.renderer.renderBlockEntity(state, new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ));
GL46.glTranslatef(0.0F, 0.0F, 1.0F); GL15.glTranslatef(0.0F, 0.0F, 1.0F);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
@ -28,11 +28,11 @@ public class RenderFireball extends Render<EntityProjectile>
*/ */
public void doRender(EntityProjectile entity, double x, double y, double z, float partialTicks) public void doRender(EntityProjectile entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glScalef(this.scale, this.scale, this.scale); GL15.glScalef(this.scale, this.scale, this.scale);
Sprite textureatlassprite = Client.CLIENT.getRenderItem().getItemModelMesher().getParticleIcon(Items.fireball); Sprite textureatlassprite = Client.CLIENT.getRenderItem().getItemModelMesher().getParticleIcon(Items.fireball);
// Tessellator tessellator = Tessellator.getInstance(); // Tessellator tessellator = Tessellator.getInstance();
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
@ -43,16 +43,16 @@ public class RenderFireball extends Render<EntityProjectile>
float f4 = 1.0F; float f4 = 1.0F;
float f5 = 0.5F; float f5 = 0.5F;
float f6 = 0.25F; float f6 = 0.25F;
GL46.glRotatef(180.0F - this.manager.playerViewY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F - this.manager.playerViewY, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-this.manager.playerViewX, 1.0F, 0.0F, 0.0F); GL15.glRotatef(-this.manager.playerViewX, 1.0F, 0.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
Tessellator.draw(); Tessellator.draw();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
@ -25,10 +25,10 @@ public class RenderFish extends Render<EntityHook>
*/ */
public void doRender(EntityHook entity, double x, double y, double z, float partialTicks) public void doRender(EntityHook entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glScalef(0.5F, 0.5F, 0.5F); GL15.glScalef(0.5F, 0.5F, 0.5F);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
// Tessellator tessellator = Tessellator.getInstance(); // Tessellator tessellator = Tessellator.getInstance();
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
@ -41,16 +41,16 @@ public class RenderFish extends Render<EntityHook>
float f4 = 1.0F; float f4 = 1.0F;
float f5 = 0.5F; float f5 = 0.5F;
float f6 = 0.5F; float f6 = 0.5F;
GL46.glRotatef(180.0F - this.manager.playerViewY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F - this.manager.playerViewY, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-this.manager.playerViewX, 1.0F, 0.0F, 0.0F); GL15.glRotatef(-this.manager.playerViewX, 1.0F, 0.0F, 0.0F);
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
worldrenderer.pos(-0.5D, -0.5D, 0.0D).tex(0.0D, 0.25D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(-0.5D, -0.5D, 0.0D).tex(0.0D, 0.25D).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, -0.5D, 0.0D).tex(0.25D, 0.25D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(0.5D, -0.5D, 0.0D).tex(0.25D, 0.25D).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, 0.5D, 0.0D).tex(0.25D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(0.5D, 0.5D, 0.0D).tex(0.25D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(-0.5D, 0.5D, 0.0D).tex(0.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex(); worldrenderer.pos(-0.5D, 0.5D, 0.0D).tex(0.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
Tessellator.draw(); Tessellator.draw();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL46.glPopMatrix(); GL15.glPopMatrix();
if (entity.angler != null) if (entity.angler != null)
{ {
@ -87,7 +87,7 @@ public class RenderFish extends Render<EntityHook>
double d12 = (double)((float)(d2 - d7)); double d12 = (double)((float)(d2 - d7));
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.disableLighting(); GlState.disableLighting();
worldrenderer.begin(GL46.GL_LINE_STRIP, DefaultVertexFormats.POSITION_COLOR); worldrenderer.begin(GL15.GL_LINE_STRIP, DefaultVertexFormats.POSITION_COLOR);
int k = 16; int k = 16;
for (int l = 0; l <= 16; ++l) for (int l = 0; l <= 16; ++l)

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.model.ModelHead; import client.renderer.model.ModelHead;
@ -40,19 +40,19 @@ public class RenderFlyingBox extends Render<EntityBox>
*/ */
public void doRender(EntityBox entity, double x, double y, double z, float partialTicks) public void doRender(EntityBox entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GlState.disableCull(); GlState.disableCull();
float f = this.func_82400_a(entity.prevYaw, entity.rotYaw, partialTicks); float f = this.func_82400_a(entity.prevYaw, entity.rotYaw, partialTicks);
float f1 = entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks; float f1 = entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks;
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
GL46.glRotatef((float)(entity.ticksExisted % 100) * 360.0f / 100.0f, 0.3f, 0.4f, 0.1f); GL15.glRotatef((float)(entity.ticksExisted % 100) * 360.0f / 100.0f, 0.3f, 0.4f, 0.1f);
float f2 = 0.0625F; float f2 = 0.0625F;
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glScalef(-1.0F, -1.0F, 1.0F); GL15.glScalef(-1.0F, -1.0F, 1.0F);
GlState.enableAlpha(); GlState.enableAlpha();
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
this.boxModel.render(entity, 0.0F, 0.0F, 0.0F, f, f1, f2); this.boxModel.render(entity, 0.0F, 0.0F, 0.0F, f, f1, f2);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -2,7 +2,7 @@ package client.renderer.entity;
import java.util.Set; import java.util.Set;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.model.ModelHorse; import client.renderer.model.ModelHorse;
@ -40,7 +40,7 @@ public class RenderHorse extends RenderLiving<EntityHorse>
f *= 0.92F; f *= 0.92F;
} }
GL46.glScalef(f, f, f); GL15.glScalef(f, f, f);
super.preRenderCallback(entitylivingbaseIn, partialTickTime); super.preRenderCallback(entitylivingbaseIn, partialTickTime);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.layers.LayerArmor; import client.renderer.layers.LayerArmor;
@ -178,7 +178,7 @@ public class RenderHumanoid extends RenderNpc
// SKC.glScalef(f2, f3, f2); // SKC.glScalef(f2, f3, f2);
// } // }
float f = entitylivingbaseIn.getRenderScale(); // 0.9375F; float f = entitylivingbaseIn.getRenderScale(); // 0.9375F;
GL46.glScalef(f, f, f); GL15.glScalef(f, f, f);
} }
// protected int getColorMultiplier(EntityNPC entitylivingbaseIn, float lightBrightness, float partialTickTime) // protected int getColorMultiplier(EntityNPC entitylivingbaseIn, float lightBrightness, float partialTickTime)

View file

@ -2,7 +2,7 @@ package client.renderer.entity;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -67,7 +67,7 @@ public class RenderItem
private void renderModel(IBakedModel model, int color, ItemStack stack) private void renderModel(IBakedModel model, int color, ItemStack stack)
{ {
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
worldrenderer.begin(GL46.GL_QUADS, DefaultVertexFormats.ITEM); worldrenderer.begin(GL15.GL_QUADS, DefaultVertexFormats.ITEM);
for (Facing enumfacing : Facing.values()) for (Facing enumfacing : Facing.values())
{ {
@ -82,31 +82,31 @@ public class RenderItem
{ {
if (stack != null) if (stack != null)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(0.5F, 0.5F, 0.5F); GL15.glScalef(0.5F, 0.5F, 0.5F);
if (model.isBuiltin()) if (model.isBuiltin())
{ {
GL46.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(-0.5F, -0.5F, -0.5F); GL15.glTranslatef(-0.5F, -0.5F, -0.5F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
this.renderBuiltin(stack); this.renderBuiltin(stack);
} }
else else
{ {
GL46.glTranslatef(-0.5F, -0.5F, -0.5F); GL15.glTranslatef(-0.5F, -0.5F, -0.5F);
this.renderModel(model, stack); this.renderModel(model, stack);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }
private void renderBuiltin(ItemStack stack) { private void renderBuiltin(ItemStack stack) {
if(stack.getItem() instanceof ItemArmor armor) { if(stack.getItem() instanceof ItemArmor armor) {
this.stack = stack; this.stack = stack;
GL46.glPushMatrix(); GL15.glPushMatrix();
float offset = 0.0f; float offset = 0.0f;
switch(armor.getArmorType()) { switch(armor.getArmorType()) {
case HELMET: case HELMET:
@ -128,9 +128,9 @@ public class RenderItem
offset = 0.0f; offset = 0.0f;
break; break;
} }
GL46.glTranslatef(1.0f, offset, 0.0f); GL15.glTranslatef(1.0f, offset, 0.0f);
GL46.glRotatef(180.0f, 0.0f, 1.0f, 0.0f); GL15.glRotatef(180.0f, 0.0f, 1.0f, 0.0f);
GL46.glScalef(1.4f, -1.4f, 1.4f); GL15.glScalef(1.4f, -1.4f, 1.4f);
boolean cull = GlState.isCullEnabled(); boolean cull = GlState.isCullEnabled();
if(cull) if(cull)
GlState.disableCull(); GlState.disableCull();
@ -142,14 +142,14 @@ public class RenderItem
// //
if(cull) if(cull)
GlState.enableCull(); GlState.enableCull();
GL46.glPopMatrix(); GL15.glPopMatrix();
this.stack = null; this.stack = null;
} }
else if(stack.getItem() instanceof ItemAnimalArmor horseArmor) { else if(stack.getItem() instanceof ItemAnimalArmor horseArmor) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.9f, 0.5f, 0.0f); GL15.glTranslatef(0.9f, 0.5f, 0.0f);
GL46.glRotatef(180.0f, 0.0f, 1.0f, 0.0f); GL15.glRotatef(180.0f, 0.0f, 1.0f, 0.0f);
GL46.glScalef(0.85f, -0.85f, 0.85f); GL15.glScalef(0.85f, -0.85f, 0.85f);
Class<? extends EntityLiving> clazz = horseArmor.getArmorType().getAnimalType(); Class<? extends EntityLiving> clazz = horseArmor.getArmorType().getAnimalType();
boolean cull = GlState.isCullEnabled(); boolean cull = GlState.isCullEnabled();
if(cull) if(cull)
@ -160,7 +160,7 @@ public class RenderItem
} }
if(cull) if(cull)
GlState.enableCull(); GlState.enableCull();
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }
@ -214,7 +214,7 @@ public class RenderItem
if (!flag) if (!flag)
{ {
GL46.glScalef(2.0F, 2.0F, 2.0F); GL15.glScalef(2.0F, 2.0F, 2.0F);
} }
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
@ -254,45 +254,45 @@ public class RenderItem
this.manager.bindTexture(TextureMap.BLOCKS); this.manager.bindTexture(TextureMap.BLOCKS);
this.preTransform(stack); this.preTransform(stack);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
GlState.enableBlend(); GlState.enableBlend();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GL46.glPushMatrix(); GL15.glPushMatrix();
if(transform) { if(transform) {
WieldType type = stack.getItem().getWieldType(); WieldType type = stack.getItem().getWieldType();
if(third && type != null) { if(third && type != null) {
switch(type) { switch(type) {
case TOOL_FLIP: case TOOL_FLIP:
GL46.glTranslatef(0.0f, 0.0f, -3.5f * 0.0625f); GL15.glTranslatef(0.0f, 0.0f, -3.5f * 0.0625f);
GL46.glRotatef(90.0f, 0.0F, 1.0F, 0.0F); GL15.glRotatef(90.0f, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(180.0f, 1.0F, 0.0F, 0.0F); GL15.glRotatef(180.0f, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(-35.0f, 0.0F, 0.0F, 1.0F); GL15.glRotatef(-35.0f, 0.0F, 0.0F, 1.0F);
GL46.glScalef(0.85f, 0.85f, 0.85f); GL15.glScalef(0.85f, 0.85f, 0.85f);
break; break;
case TOOL: case TOOL:
GL46.glTranslatef(0.0f, 1.25f * 0.0625f, -3.5f * 0.0625f); GL15.glTranslatef(0.0f, 1.25f * 0.0625f, -3.5f * 0.0625f);
GL46.glRotatef(90.0f, 0.0F, 1.0F, 0.0F); GL15.glRotatef(90.0f, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-35.0f, 0.0F, 0.0F, 1.0F); GL15.glRotatef(-35.0f, 0.0F, 0.0F, 1.0F);
GL46.glScalef(0.85f, 0.85f, 0.85f); GL15.glScalef(0.85f, 0.85f, 0.85f);
break; break;
case RANGED: case RANGED:
GL46.glTranslatef(0.75f * 0.0625f, 0.0f, 0.25f * 0.0625f); GL15.glTranslatef(0.75f * 0.0625f, 0.0f, 0.25f * 0.0625f);
GL46.glRotatef(80.0f, 0.0F, 1.0F, 0.0F); GL15.glRotatef(80.0f, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(5.0f, 1.0F, 0.0F, 0.0F); GL15.glRotatef(5.0f, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(-45.0f, 0.0F, 0.0F, 1.0F); GL15.glRotatef(-45.0f, 0.0F, 0.0F, 1.0F);
break; break;
} }
} }
else if(!third) { else if(!third) {
GL46.glTranslatef(0.0f, 4.0f * 0.0625f, 2.0f * 0.0625f); GL15.glTranslatef(0.0f, 4.0f * 0.0625f, 2.0f * 0.0625f);
GL46.glRotatef(type == WieldType.TOOL_FLIP ? 45.0f : -135.0f, 0.0F, 1.0F, 0.0F); GL15.glRotatef(type == WieldType.TOOL_FLIP ? 45.0f : -135.0f, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(25.0f, 0.0F, 0.0F, 1.0F); GL15.glRotatef(25.0f, 0.0F, 0.0F, 1.0F);
GL46.glScalef(1.7f, 1.7f, 1.7f); GL15.glScalef(1.7f, 1.7f, 1.7f);
} }
} }
this.renderItem(stack, model); this.renderItem(stack, model);
GlState.cullFace(GL46.GL_BACK); GlState.cullFace(GL15.GL_BACK);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GlState.disableBlend(); GlState.disableBlend();
this.manager.bindTexture(TextureMap.BLOCKS); this.manager.bindTexture(TextureMap.BLOCKS);
@ -301,22 +301,22 @@ public class RenderItem
private void renderItemIntoGUI(ItemStack stack, int x, int y) private void renderItemIntoGUI(ItemStack stack, int x, int y)
{ {
IBakedModel ibakedmodel = this.mesher.getItemModel(stack); IBakedModel ibakedmodel = this.mesher.getItemModel(stack);
GL46.glPushMatrix(); GL15.glPushMatrix();
this.manager.bindTexture(TextureMap.BLOCKS); this.manager.bindTexture(TextureMap.BLOCKS);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GlState.enableAlpha(); GlState.enableAlpha();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
this.setupGuiTransform(x, y, ibakedmodel.isGui3d()); this.setupGuiTransform(x, y, ibakedmodel.isGui3d());
GuiPosition vec = ibakedmodel.getTransforms(); GuiPosition vec = ibakedmodel.getTransforms();
if(vec != GuiPosition.NORMAL) { if(vec != GuiPosition.NORMAL) {
GL46.glTranslatef(vec.translationX(), vec.translationY(), vec.translationZ()); GL15.glTranslatef(vec.translationX(), vec.translationY(), vec.translationZ());
GL46.glRotatef(vec.rotationY(), 0.0F, 1.0F, 0.0F); GL15.glRotatef(vec.rotationY(), 0.0F, 1.0F, 0.0F);
GL46.glRotatef(vec.rotationX(), 1.0F, 0.0F, 0.0F); GL15.glRotatef(vec.rotationX(), 1.0F, 0.0F, 0.0F);
GL46.glRotatef(vec.rotationZ(), 0.0F, 0.0F, 1.0F); GL15.glRotatef(vec.rotationZ(), 0.0F, 0.0F, 1.0F);
GL46.glScalef(vec.scale(), vec.scale(), vec.scale()); GL15.glScalef(vec.scale(), vec.scale(), vec.scale());
} }
boolean cull = GlState.isCullEnabled(); boolean cull = GlState.isCullEnabled();
if(!cull) if(!cull)
@ -327,28 +327,28 @@ public class RenderItem
GlState.disableAlpha(); GlState.disableAlpha();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GlState.disableLighting(); GlState.disableLighting();
GL46.glPopMatrix(); GL15.glPopMatrix();
this.manager.bindTexture(TextureMap.BLOCKS); this.manager.bindTexture(TextureMap.BLOCKS);
} }
private void setupGuiTransform(int xPosition, int yPosition, boolean isGui3d) private void setupGuiTransform(int xPosition, int yPosition, boolean isGui3d)
{ {
GL46.glTranslatef((float)xPosition, (float)yPosition, 100.0F + this.zLevel); GL15.glTranslatef((float)xPosition, (float)yPosition, 100.0F + this.zLevel);
GL46.glTranslatef(8.0F, 8.0F, 0.0F); GL15.glTranslatef(8.0F, 8.0F, 0.0F);
GL46.glScalef(1.0F, 1.0F, -1.0F); GL15.glScalef(1.0F, 1.0F, -1.0F);
GL46.glScalef(0.5F, 0.5F, 0.5F); GL15.glScalef(0.5F, 0.5F, 0.5F);
if (isGui3d) if (isGui3d)
{ {
GL46.glScalef(40.0F, 40.0F, 40.0F); GL15.glScalef(40.0F, 40.0F, 40.0F);
GL46.glRotatef(210.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
GlState.enableLighting(); GlState.enableLighting();
} }
else else
{ {
GL46.glScalef(64.0F, 64.0F, 64.0F); GL15.glScalef(64.0F, 64.0F, 64.0F);
GL46.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
GlState.disableLighting(); GlState.disableLighting();
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.texture.TextureMap; import client.renderer.texture.TextureMap;
@ -23,16 +23,16 @@ public class RenderItemEntity<T extends Entity> extends Render<T>
public void doRender(T entity, double x, double y, double z, float partialTicks) public void doRender(T entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glScalef(0.5F, 0.5F, 0.5F); GL15.glScalef(0.5F, 0.5F, 0.5F);
GL46.glRotatef(-this.manager.playerViewY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-this.manager.playerViewY, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(this.manager.playerViewX, 1.0F, 0.0F, 0.0F); GL15.glRotatef(this.manager.playerViewX, 1.0F, 0.0F, 0.0F);
this.bindTexture(TextureMap.BLOCKS); this.bindTexture(TextureMap.BLOCKS);
this.itemRenderer.renderItemAsGround(this.getStack(entity)); this.itemRenderer.renderItemAsGround(this.getStack(entity));
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.model.ModelLeashKnot; import client.renderer.model.ModelLeashKnot;
@ -22,16 +22,16 @@ public class RenderLeashKnot extends Render<EntityLeashKnot>
*/ */
public void doRender(EntityLeashKnot entity, double x, double y, double z, float partialTicks) public void doRender(EntityLeashKnot entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GlState.disableCull(); GlState.disableCull();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
float f = 0.0625F; float f = 0.0625F;
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glScalef(-1.0F, -1.0F, 1.0F); GL15.glScalef(-1.0F, -1.0F, 1.0F);
GlState.enableAlpha(); GlState.enableAlpha();
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
this.leashKnotModel.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, f); this.leashKnotModel.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, f);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -27,7 +27,7 @@ public class RenderLightning extends Render<EntityLightning>
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.disableLighting(); GlState.disableLighting();
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE);
double[] adouble = new double[8]; double[] adouble = new double[8];
double[] adouble1 = new double[8]; double[] adouble1 = new double[8];
double d0 = 0.0D; double d0 = 0.0D;
@ -83,7 +83,7 @@ public class RenderLightning extends Render<EntityLightning>
d3 += (double)(random1.zrange(31) - 15); d3 += (double)(random1.zrange(31) - 15);
} }
worldrenderer.begin(GL46.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_COLOR); worldrenderer.begin(GL15.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_COLOR);
float f = 0.5F; float f = 0.5F;
float f1 = 0.45F; float f1 = 0.45F;
float f2 = 0.45F; float f2 = 0.45F;

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.Frustum; import client.renderer.Frustum;
@ -46,7 +46,7 @@ public abstract class RenderLiving<T extends EntityLiving> extends RendererLivin
int l = RenderManager.getBrightnessForRender(entity); int l = RenderManager.getBrightnessForRender(entity);
int a = l % 65536; int a = l % 65536;
int b = l / 65536; int b = l / 65536;
GL46.glMultiTexCoord2f(GL46.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F); GL15.glMultiTexCoord2f(GL15.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F);
} }
private static double interpolateValue(double start, double end, double pct) { private static double interpolateValue(double start, double end, double pct) {
@ -95,7 +95,7 @@ public abstract class RenderLiving<T extends EntityLiving> extends RendererLivin
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.disableLighting(); GlState.disableLighting();
GlState.disableCull(); GlState.disableCull();
renderer.begin(GL46.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_COLOR); renderer.begin(GL15.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_COLOR);
for(int n = 0; n <= 24; ++n) { for(int n = 0; n <= 24; ++n) {
float cr = r; float cr = r;
float cg = g; float cg = g;
@ -118,7 +118,7 @@ public abstract class RenderLiving<T extends EntityLiving> extends RendererLivin
).color(cr, cg, cb, 1.0F).endVertex(); ).color(cr, cg, cb, 1.0F).endVertex();
} }
Tessellator.draw(); Tessellator.draw();
renderer.begin(GL46.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_COLOR); renderer.begin(GL15.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_COLOR);
for(int n = 0; n <= 24; ++n) { for(int n = 0; n <= 24; ++n) {
float cr = r; float cr = r;
float cg = g; float cg = g;

View file

@ -2,7 +2,7 @@ package client.renderer.entity;
import java.util.Map; import java.util.Map;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.init.RenderRegistry; import client.init.RenderRegistry;
@ -142,7 +142,7 @@ public class RenderManager {
int j = i % 65536; int j = i % 65536;
int k = i / 65536; int k = i / 65536;
GL46.glMultiTexCoord2f(GL46.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F); GL15.glMultiTexCoord2f(GL15.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
return this.renderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, partialTicks); return this.renderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, partialTicks);
} }
@ -180,22 +180,22 @@ public class RenderManager {
if(dist > (double)(maxDistance * maxDistance) || !this.gm.canRenderHud()) if(dist > (double)(maxDistance * maxDistance) || !this.gm.canRenderHud())
return; return;
float scale = 0.016666668F; float scale = 0.016666668F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x + 0.0F, (float)y + entity.height + 0.5F, (float)z); GL15.glTranslatef((float)x + 0.0F, (float)y + entity.height + 0.5F, (float)z);
GL46.glNormal3f(0.0F, 1.0F, 0.0F); GL15.glNormal3f(0.0F, 1.0F, 0.0F);
GL46.glRotatef(-this.playerViewY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-this.playerViewY, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(this.playerViewX, 1.0F, 0.0F, 0.0F); GL15.glRotatef(this.playerViewX, 1.0F, 0.0F, 0.0F);
GL46.glScalef(-scale, -scale, scale); GL15.glScalef(-scale, -scale, scale);
GlState.disableLighting(); GlState.disableLighting();
GlState.depthMask(false); GlState.depthMask(false);
GlState.enableBlend(); GlState.enableBlend();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
GlState.depthMask(true); GlState.depthMask(true);
Drawing.drawTextboxCentered(str, 0, 0, 0x3f000000); Drawing.drawTextboxCentered(str, 0, 0, 0x3f000000);
GlState.enableLighting(); GlState.enableLighting();
GlState.disableBlend(); GlState.disableBlend();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
private void renderEntityFire(Entity entity, double x, double y, double z) { private void renderEntityFire(Entity entity, double x, double y, double z) {
@ -203,21 +203,21 @@ public class RenderManager {
TextureMap map = this.gm.getTextureMapBlocks(); TextureMap map = this.gm.getTextureMapBlocks();
Sprite layer0 = map.getAtlasSprite("blocks/fire_layer_0"); Sprite layer0 = map.getAtlasSprite("blocks/fire_layer_0");
Sprite layer1 = map.getAtlasSprite("blocks/fire_layer_1"); Sprite layer1 = map.getAtlasSprite("blocks/fire_layer_1");
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
float scale = entity.width * 1.4F; float scale = entity.width * 1.4F;
GL46.glScalef(scale, scale, scale); GL15.glScalef(scale, scale, scale);
RenderBuffer rb = Tessellator.getBuffer(); RenderBuffer rb = Tessellator.getBuffer();
float f1 = 0.5F; float f1 = 0.5F;
float f2 = 0.0F; float f2 = 0.0F;
float f3 = entity.height / scale; float f3 = entity.height / scale;
float f4 = (float)(entity.posY - entity.getEntityBoundingBox().minY); float f4 = (float)(entity.posY - entity.getEntityBoundingBox().minY);
GL46.glRotatef(-this.playerViewY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-this.playerViewY, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(0.0F, 0.0F, -0.3F + (float)((int)f3) * 0.02F); GL15.glTranslatef(0.0F, 0.0F, -0.3F + (float)((int)f3) * 0.02F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
float f5 = 0.0F; float f5 = 0.0F;
int i = 0; int i = 0;
rb.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX); rb.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
while(f3 > 0.0F) { while(f3 > 0.0F) {
Sprite layer = i % 2 == 0 ? layer0 : layer1; Sprite layer = i % 2 == 0 ? layer0 : layer1;
@ -245,7 +245,7 @@ public class RenderManager {
} }
Tessellator.draw(); Tessellator.draw();
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.enableLighting(); GlState.enableLighting();
} }
@ -269,7 +269,7 @@ public class RenderManager {
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
Vec3 vec3 = entityIn.getLook(partialTicks); Vec3 vec3 = entityIn.getLook(partialTicks);
worldrenderer.begin(GL46.GL_LINE_STRIP, DefaultVertexFormats.POSITION_COLOR); worldrenderer.begin(GL15.GL_LINE_STRIP, DefaultVertexFormats.POSITION_COLOR);
worldrenderer.pos(x, y + (double)entityIn.getEyeHeight(), z).color(0, 0, 255, 255).endVertex(); worldrenderer.pos(x, y + (double)entityIn.getEyeHeight(), z).color(0, 0, 255, 255).endVertex();
worldrenderer.pos(x + vec3.xCoord * 2.0D, y + (double)entityIn.getEyeHeight() + vec3.yCoord * 2.0D, z + vec3.zCoord * 2.0D).color(0, 0, 255, 255).endVertex(); worldrenderer.pos(x + vec3.xCoord * 2.0D, y + (double)entityIn.getEyeHeight() + vec3.yCoord * 2.0D, z + vec3.zCoord * 2.0D).color(0, 0, 255, 255).endVertex();
Tessellator.draw(); Tessellator.draw();

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.GlState; import client.renderer.GlState;
@ -33,14 +33,14 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
public void doRender(T entity, double x, double y, double z, float partialTicks) public void doRender(T entity, double x, double y, double z, float partialTicks)
{ {
float entityYaw = entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks; float entityYaw = entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks;
GL46.glPushMatrix(); GL15.glPushMatrix();
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
long i = (long)entity.getId() * 493286711L; long i = (long)entity.getId() * 493286711L;
i = i * i * 4392167121L + i * 98761L; i = i * i * 4392167121L + i * 98761L;
float f = (((float)(i >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; float f = (((float)(i >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
float f1 = (((float)(i >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; float f1 = (((float)(i >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
float f2 = (((float)(i >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; float f2 = (((float)(i >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
GL46.glTranslatef(f, f1, f2); GL15.glTranslatef(f, f1, f2);
double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks; double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks; double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks; double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks;
@ -76,9 +76,9 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
} }
} }
GL46.glTranslatef((float)x, (float)y + 0.375F, (float)z); GL15.glTranslatef((float)x, (float)y + 0.375F, (float)z);
GL46.glRotatef(180.0F - entityYaw, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-f3, 0.0F, 0.0F, 1.0F); GL15.glRotatef(-f3, 0.0F, 0.0F, 1.0F);
float f5 = (float)entity.getRollingAmplitude() - partialTicks; float f5 = (float)entity.getRollingAmplitude() - partialTicks;
float f6 = (float)entity.getDamage() - partialTicks; float f6 = (float)entity.getDamage() - partialTicks;
@ -89,7 +89,7 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
if (f5 > 0.0F) if (f5 > 0.0F)
{ {
GL46.glRotatef(ExtMath.sin(f5) * f5 * f6 / 10.0F * (float)entity.getRollingDirection(), 1.0F, 0.0F, 0.0F); GL15.glRotatef(ExtMath.sin(f5) * f5 * f6 / 10.0F * (float)entity.getRollingDirection(), 1.0F, 0.0F, 0.0F);
} }
int j = entity.getDisplayTileOffset(); int j = entity.getDisplayTileOffset();
@ -97,20 +97,20 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
if (iblockstate.getBlock() != Blocks.air && !iblockstate.getBlock().getMaterial().isLiquid()) if (iblockstate.getBlock() != Blocks.air && !iblockstate.getBlock().getMaterial().isLiquid())
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
this.bindTexture(TextureMap.BLOCKS); this.bindTexture(TextureMap.BLOCKS);
float f4 = 0.75F; float f4 = 0.75F;
GL46.glScalef(f4, f4, f4); GL15.glScalef(f4, f4, f4);
GL46.glTranslatef(-0.5F, (float)(j - 8) / 16.0F, 0.5F); GL15.glTranslatef(-0.5F, (float)(j - 8) / 16.0F, 0.5F);
this.func_180560_a(entity, partialTicks, iblockstate); this.func_180560_a(entity, partialTicks, iblockstate);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
} }
GL46.glScalef(-1.0F, -1.0F, 1.0F); GL15.glScalef(-1.0F, -1.0F, 1.0F);
this.modelMinecart.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); this.modelMinecart.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }
@ -124,8 +124,8 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
protected void func_180560_a(T minecart, float partialTicks, State state) protected void func_180560_a(T minecart, float partialTicks, State state)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
Client.CLIENT.renderer.renderBlockEntity(state, new BlockPos(minecart.posX, minecart.posY + (double)minecart.getEyeHeight(), minecart.posZ)); Client.CLIENT.renderer.renderBlockEntity(state, new BlockPos(minecart.posX, minecart.posY + (double)minecart.getEyeHeight(), minecart.posZ));
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.layers.LayerSlimeGel; import client.renderer.layers.LayerSlimeGel;
import client.renderer.model.ModelSlime; import client.renderer.model.ModelSlime;
@ -25,7 +25,7 @@ public class RenderSlime extends RenderNpc
f1 = (slime.prevSquishFactor + (slime.squishFactor - slime.prevSquishFactor) * partialTickTime) / (f * 0.5F + 1.0F); f1 = (slime.prevSquishFactor + (slime.squishFactor - slime.prevSquishFactor) * partialTickTime) / (f * 0.5F + 1.0F);
} }
float f2 = 1.0F / (f1 + 1.0F); float f2 = 1.0F / (f1 + 1.0F);
GL46.glScalef(f2 * f, 1.0F / f2 * f, f2 * f); GL15.glScalef(f2 * f, 1.0F / f2 * f, f2 * f);
} }
public void doRender(EntityNPC entity, double x, double y, double z, float partialTicks) public void doRender(EntityNPC entity, double x, double y, double z, float partialTicks)

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.layers.LayerArrow; import client.renderer.layers.LayerArrow;
import client.renderer.layers.LayerHeldItem; import client.renderer.layers.LayerHeldItem;
@ -83,7 +83,7 @@ public class RenderSpaceMarine extends RenderNpc
protected void preRenderCallback(EntityNPC entitylivingbaseIn, float partialTickTime) protected void preRenderCallback(EntityNPC entitylivingbaseIn, float partialTickTime)
{ {
float f = entitylivingbaseIn.getRenderScale(); // 0.9375F; float f = entitylivingbaseIn.getRenderScale(); // 0.9375F;
GL46.glScalef(f, f, f); GL15.glScalef(f, f, f);
} }
// public void renderPlayerArm(EntityNPC entity) // public void renderPlayerArm(EntityNPC entity)

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.GlState; import client.renderer.GlState;
@ -27,7 +27,7 @@ public class RenderTntMinecart extends RenderMinecart<EntityTntCart>
f = f * f; f = f * f;
f = f * f; f = f * f;
float f1 = 1.0F + f * 0.3F; float f1 = 1.0F + f * 0.3F;
GL46.glScalef(f1, f1, f1); GL15.glScalef(f1, f1, f1);
} }
super.func_180560_a(minecart, partialTicks, state); super.func_180560_a(minecart, partialTicks, state);
@ -37,11 +37,11 @@ public class RenderTntMinecart extends RenderMinecart<EntityTntCart>
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.disableLighting(); GlState.disableLighting();
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_DST_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_DST_ALPHA);
GlState.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F); GlState.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F);
GL46.glPushMatrix(); GL15.glPushMatrix();
Client.CLIENT.renderer.renderBlockEntity(Blocks.tnt.getState(), null); Client.CLIENT.renderer.renderBlockEntity(Blocks.tnt.getState(), null);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.disableBlend(); GlState.disableBlend();
GlState.enableLighting(); GlState.enableLighting();

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.GlState; import client.renderer.GlState;
@ -23,8 +23,8 @@ public class RenderTntPrimed extends Render<EntityTnt>
public void doRender(EntityTnt entity, double x, double y, double z, float partialTicks) public void doRender(EntityTnt entity, double x, double y, double z, float partialTicks)
{ {
Renderer renderer = Client.CLIENT.renderer; Renderer renderer = Client.CLIENT.renderer;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y + 0.5F, (float)z); GL15.glTranslatef((float)x, (float)y + 0.5F, (float)z);
if ((float)entity.fuse - partialTicks + 1.0F < 10.0F) if ((float)entity.fuse - partialTicks + 1.0F < 10.0F)
{ {
@ -33,22 +33,22 @@ public class RenderTntPrimed extends Render<EntityTnt>
f = f * f; f = f * f;
f = f * f; f = f * f;
float f1 = 1.0F + f * 0.3F; float f1 = 1.0F + f * 0.3F;
GL46.glScalef(f1, f1, f1); GL15.glScalef(f1, f1, f1);
} }
float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F; float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
GL46.glTranslatef(-0.5F, -0.5F, 0.5F); GL15.glTranslatef(-0.5F, -0.5F, 0.5F);
Block tnt = BlockRegistry.byName("tnt" + (entity.explosionSize <= 0 || entity.explosionSize >= 8 ? "" : "_" + entity.explosionSize)); Block tnt = BlockRegistry.byName("tnt" + (entity.explosionSize <= 0 || entity.explosionSize >= 8 ? "" : "_" + entity.explosionSize));
renderer.renderBlockEntity(tnt.getState(), new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ)); renderer.renderBlockEntity(tnt.getState(), new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ));
GL46.glTranslatef(0.0F, 0.0F, 1.0F); GL15.glTranslatef(0.0F, 0.0F, 1.0F);
if (entity.fuse / 5 % 2 == 0) if (entity.fuse / 5 % 2 == 0)
{ {
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.disableLighting(); GlState.disableLighting();
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_DST_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_DST_ALPHA);
GlState.color(1.0F, 1.0F, 1.0F, f2); GlState.color(1.0F, 1.0F, 1.0F, f2);
GlState.doPolygonOffset(-3.0F, -3.0F); GlState.doPolygonOffset(-3.0F, -3.0F);
GlState.enablePolygonOffset(); GlState.enablePolygonOffset();
@ -61,7 +61,7 @@ public class RenderTntPrimed extends Render<EntityTnt>
GlState.enableTexture2D(); GlState.enableTexture2D();
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partialTicks); super.doRender(entity, x, y, z, partialTicks);
} }

View file

@ -1,6 +1,6 @@
package client.renderer.entity; package client.renderer.entity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -17,8 +17,8 @@ public class RenderXp extends Render<EntityXp> {
} }
public void doRender(EntityXp entity, double x, double y, double z, float partial) { public void doRender(EntityXp entity, double x, double y, double z, float partial) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
this.bindEntityTexture(entity); this.bindEntityTexture(entity);
int value = entity.getXpValue(); int value = entity.getXpValue();
float u1 = (float)(value % 4 * 16 + 0) / 64.0F; float u1 = (float)(value % 4 * 16 + 0) / 64.0F;
@ -31,19 +31,19 @@ public class RenderXp extends Render<EntityXp> {
int light = RenderManager.getBrightnessForRender(entity); int light = RenderManager.getBrightnessForRender(entity);
int block = light % 65536; int block = light % 65536;
int sky = light / 65536; int sky = light / 65536;
GL46.glMultiTexCoord2f(GL46.GL_TEXTURE1, (float)block / 1.0F, (float)sky / 1.0F); GL15.glMultiTexCoord2f(GL15.GL_TEXTURE1, (float)block / 1.0F, (float)sky / 1.0F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
float color = ((float)entity.xpColor + partial) / 16.0F; float color = ((float)entity.xpColor + partial) / 16.0F;
int g = (int)((ExtMath.sin(color + 0.0F) + 1.0F) * 0.5F * 255.0F); int g = (int)((ExtMath.sin(color + 0.0F) + 1.0F) * 0.5F * 255.0F);
float n = (int)((ExtMath.sin(color + (float)Math.PI) + 1.0F) * 0.5F * 255.0F); float n = (int)((ExtMath.sin(color + (float)Math.PI) + 1.0F) * 0.5F * 255.0F);
int r = (int)(n * (value / 10.0f)); int r = (int)(n * (value / 10.0f));
int b = (int)(n * ((10 - value) / 10.0f)); int b = (int)(n * ((10 - value) / 10.0f));
GL46.glRotatef(180.0F - this.manager.playerViewY, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F - this.manager.playerViewY, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(-this.manager.playerViewX, 1.0F, 0.0F, 0.0F); GL15.glRotatef(-this.manager.playerViewX, 1.0F, 0.0F, 0.0F);
float size = 0.25F; float size = 0.25F;
GL46.glScalef(size, size, size); GL15.glScalef(size, size, size);
RenderBuffer rb = Tessellator.getBuffer(); RenderBuffer rb = Tessellator.getBuffer();
rb.begin(GL46.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL); rb.begin(GL15.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
rb.pos((double)(0.0F - dx), (double)(0.0F - dy), 0.0D).tex((double)u1, (double)v2).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F) rb.pos((double)(0.0F - dx), (double)(0.0F - dy), 0.0D).tex((double)u1, (double)v2).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F)
.endVertex(); .endVertex();
rb.pos((double)(bx - dx), (double)(0.0F - dy), 0.0D).tex((double)u2, (double)v2).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F) rb.pos((double)(bx - dx), (double)(0.0F - dy), 0.0D).tex((double)u2, (double)v2).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F)
@ -55,7 +55,7 @@ public class RenderXp extends Render<EntityXp> {
Tessellator.draw(); Tessellator.draw();
GlState.disableBlend(); GlState.disableBlend();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GL46.glPopMatrix(); GL15.glPopMatrix();
super.doRender(entity, x, y, z, partial); super.doRender(entity, x, y, z, partial);
} }

View file

@ -5,7 +5,7 @@ import java.nio.ByteOrder;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -86,7 +86,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
*/ */
public void doRender(T entity, double x, double y, double z, float partialTicks) public void doRender(T entity, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GlState.disableCull(); GlState.disableCull();
this.mainModel.swingProgress = this.getSwingProgress(entity, partialTicks); this.mainModel.swingProgress = this.getSwingProgress(entity, partialTicks);
this.mainModel.isRiding = entity.isRiding(); this.mainModel.isRiding = entity.isRiding();
@ -128,10 +128,10 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
float f8 = this.handleRotationFloat(entity, partialTicks); float f8 = this.handleRotationFloat(entity, partialTicks);
this.rotateCorpse(entity, f8, f, partialTicks); this.rotateCorpse(entity, f8, f, partialTicks);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GL46.glScalef(-1.0F, -1.0F, 1.0F); GL15.glScalef(-1.0F, -1.0F, 1.0F);
this.preRenderCallback(entity, partialTicks); this.preRenderCallback(entity, partialTicks);
float f4 = 0.0625F; float f4 = 0.0625F;
GL46.glTranslatef(0.0F, -1.5078125F, 0.0F); GL15.glTranslatef(0.0F, -1.5078125F, 0.0F);
float f5 = entity.prevLswingAmount + (entity.lswingAmount - entity.prevLswingAmount) * partialTicks; float f5 = entity.prevLswingAmount + (entity.lswingAmount - entity.prevLswingAmount) * partialTicks;
float f6 = entity.limbSwing - entity.lswingAmount * (1.0F - partialTicks); float f6 = entity.limbSwing - entity.lswingAmount * (1.0F - partialTicks);
@ -184,11 +184,11 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
Log.RENDER.error((Throwable)exception, (String)"Konnte Objekt nicht rendern"); Log.RENDER.error((Throwable)exception, (String)"Konnte Objekt nicht rendern");
} }
GlState.setActiveTexture(GL46.GL_TEXTURE1); GlState.setActiveTexture(GL15.GL_TEXTURE1);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.enableCull(); GlState.enableCull();
GL46.glPopMatrix(); GL15.glPopMatrix();
if (!this.renderOutlines) if (!this.renderOutlines)
{ {
@ -222,23 +222,23 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
float g = (float)(c >> 8 & 255) / 255.0F; float g = (float)(c >> 8 & 255) / 255.0F;
float b = (float)(c & 255) / 255.0F; float b = (float)(c & 255) / 255.0F;
GlState.disableLighting(); GlState.disableLighting();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.color(r, g, b, 1.0F); GlState.color(r, g, b, 1.0F);
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.setActiveTexture(GL46.GL_TEXTURE1); GlState.setActiveTexture(GL15.GL_TEXTURE1);
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
return true; return true;
} }
protected void unsetOutlineColor() protected void unsetOutlineColor()
{ {
GlState.enableLighting(); GlState.enableLighting();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.setActiveTexture(GL46.GL_TEXTURE1); GlState.setActiveTexture(GL15.GL_TEXTURE1);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.setActiveTexture(GL46.GL_TEXTURE0); GlState.setActiveTexture(GL15.GL_TEXTURE0);
} }
protected void renderModel(T entity, float x, float y, float z, float yaw, float pitch, float scale) protected void renderModel(T entity, float x, float y, float z, float yaw, float pitch, float scale)
@ -255,13 +255,13 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
if (ghost) if (ghost)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GlState.color(1.0F, 1.0F, 1.0F, 0.3F); GlState.color(1.0F, 1.0F, 1.0F, 0.3F);
// GlState.color(entity.getRenderColor() | (vis ? 0x50000000 : 0x26000000)); // GlState.color(entity.getRenderColor() | (vis ? 0x50000000 : 0x26000000));
GlState.depthMask(false); GlState.depthMask(false);
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA);
GlState.alphaFunc(GL46.GL_GREATER, 0.003921569F); GlState.alphaFunc(GL15.GL_GREATER, 0.003921569F);
} }
if(entity.isGlowing()) if(entity.isGlowing())
@ -274,8 +274,8 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
if (ghost) if (ghost)
{ {
GlState.disableBlend(); GlState.disableBlend();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.depthMask(true); GlState.depthMask(true);
} }
// } // }
@ -414,12 +414,12 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
*/ */
protected void renderLivingAt(T entityLivingBaseIn, double x, double y, double z) protected void renderLivingAt(T entityLivingBaseIn, double x, double y, double z)
{ {
GL46.glTranslatef((float)x, (float)y, (float)z); GL15.glTranslatef((float)x, (float)y, (float)z);
} }
protected void rotateCorpse(T bat, float p_77043_2_, float p_77043_3_, float partialTicks) protected void rotateCorpse(T bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{ {
GL46.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
if (bat.deathTime > 0) if (bat.deathTime > 0)
{ {
@ -431,7 +431,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
f = 1.0F; f = 1.0F;
} }
GL46.glRotatef(f * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F); GL15.glRotatef(f * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
} }
else else
{ {
@ -439,8 +439,8 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
if (s != null && (s.startsWith("Australia") || s.startsWith("Australien"))) // && (!(bat.isPlayer()) || ((EntityNPC)bat).isWearing(ModelPart.CAPE))) if (s != null && (s.startsWith("Australia") || s.startsWith("Australien"))) // && (!(bat.isPlayer()) || ((EntityNPC)bat).isWearing(ModelPart.CAPE)))
{ {
GL46.glTranslatef(0.0F, bat.height + 0.1F, 0.0F); GL15.glTranslatef(0.0F, bat.height + 0.1F, 0.0F);
GL46.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
} }
} }
} }
@ -526,19 +526,19 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
float f4 = (float)(crystal.posZ - entity.posZ - (entity.prevZ - entity.posZ) * (double)(1.0F - p_180574_8_)); float f4 = (float)(crystal.posZ - entity.posZ - (entity.prevZ - entity.posZ) * (double)(1.0F - p_180574_8_));
float f5 = ExtMath.sqrtf(f2 * f2 + f4 * f4); float f5 = ExtMath.sqrtf(f2 * f2 + f4 * f4);
float f6 = ExtMath.sqrtf(f2 * f2 + f3 * f3 + f4 * f4); float f6 = ExtMath.sqrtf(f2 * f2 + f3 * f3 + f4 * f4);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)p_180574_2_, (float)p_180574_4_ + 2.0F, (float)p_180574_6_); GL15.glTranslatef((float)p_180574_2_, (float)p_180574_4_ + 2.0F, (float)p_180574_6_);
GL46.glRotatef((float)(-Math.atan2((double)f4, (double)f2)) * 180.0F / (float)Math.PI - 90.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef((float)(-Math.atan2((double)f4, (double)f2)) * 180.0F / (float)Math.PI - 90.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef((float)(-Math.atan2((double)f5, (double)f3)) * 180.0F / (float)Math.PI - 90.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef((float)(-Math.atan2((double)f5, (double)f3)) * 180.0F / (float)Math.PI - 90.0F, 1.0F, 0.0F, 0.0F);
// Tessellator tessellator = Tessellator.getInstance(); // Tessellator tessellator = Tessellator.getInstance();
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
ItemRenderer.disableStandardItemLighting(); ItemRenderer.disableStandardItemLighting();
GlState.disableCull(); GlState.disableCull();
this.bindTexture(crystalBeamTextures); this.bindTexture(crystalBeamTextures);
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
float f7 = 0.0F - ((float)entity.ticksExisted + p_180574_8_) * 0.01F; float f7 = 0.0F - ((float)entity.ticksExisted + p_180574_8_) * 0.01F;
float f8 = ExtMath.sqrtf(f2 * f2 + f3 * f3 + f4 * f4) / 32.0F - ((float)entity.ticksExisted + p_180574_8_) * 0.01F; float f8 = ExtMath.sqrtf(f2 * f2 + f3 * f3 + f4 * f4) / 32.0F - ((float)entity.ticksExisted + p_180574_8_) * 0.01F;
worldrenderer.begin(GL46.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_TEX_COLOR); worldrenderer.begin(GL15.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_TEX_COLOR);
int i = 8; int i = 8;
for (int j = 0; j <= 8; ++j) for (int j = 0; j <= 8; ++j)
@ -552,9 +552,9 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
Tessellator.draw(); Tessellator.draw();
GlState.enableCull(); GlState.enableCull();
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
ItemRenderer.enableStandardItemLighting(); ItemRenderer.enableStandardItemLighting();
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
static static

View file

@ -2,7 +2,7 @@ package client.renderer.layers;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.GlState; import client.renderer.GlState;
@ -19,7 +19,6 @@ import common.util.Equipment;
public class LayerArmor implements LayerRenderer<EntityNPC> public class LayerArmor implements LayerRenderer<EntityNPC>
{ {
protected static final String ENCHANTED_ITEM_GLINT_RES = "textures/glint.png";
private static final Equipment[] SLOTS; private static final Equipment[] SLOTS;
static { static {
@ -93,8 +92,6 @@ public class LayerArmor implements LayerRenderer<EntityNPC>
} }
GlState.color(this.colorR, this.colorG, this.colorB, this.alpha); GlState.color(this.colorR, this.colorG, this.colorB, this.alpha);
t.render(entitylivingbaseIn, limbSwing, limbSwingAmount, yaw, pitch, factor, scale); t.render(entitylivingbaseIn, limbSwing, limbSwingAmount, yaw, pitch, factor, scale);
if (itemstack.isItemEnchanted())
this.renderGlint(entitylivingbaseIn, t, limbSwing, limbSwingAmount, partial, yaw, pitch, factor, scale);
} }
} }
@ -113,44 +110,6 @@ public class LayerArmor implements LayerRenderer<EntityNPC>
return armorSlot == Equipment.LEGGINGS; return armorSlot == Equipment.LEGGINGS;
} }
private void renderGlint(EntityLiving entitylivingbaseIn, ModelArmor modelbaseIn, float p_177183_3_, float p_177183_4_, float partialTicks, float p_177183_6_, float p_177183_7_, float p_177183_8_, float scale)
{
float f = entitylivingbaseIn == null ? (float)(System.currentTimeMillis() % 1000000L) / 50.0f : (float)entitylivingbaseIn.ticksExisted + partialTicks;
if(this.renderer != null)
this.renderer.bindTexture(ENCHANTED_ITEM_GLINT_RES);
else
Client.CLIENT.getTextureManager().bindTexture(ENCHANTED_ITEM_GLINT_RES);
GlState.enableBlend();
GlState.depthFunc(GL46.GL_EQUAL);
GlState.depthMask(false);
float f1 = 0.5F;
GlState.color(f1, f1, f1, 1.0F);
for (int i = 0; i < 2; ++i)
{
GlState.disableLighting();
GlState.blendFunc(GL46.GL_SRC_COLOR, GL46.GL_ONE);
float f2 = 0.76F;
GlState.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
GL46.glMatrixMode(GL46.GL_TEXTURE);
GL46.glLoadIdentity();
float f3 = 0.33333334F;
GL46.glScalef(f3, f3, f3);
GL46.glRotatef(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
GL46.glTranslatef(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
GL46.glMatrixMode(GL46.GL_MODELVIEW);
modelbaseIn.render(entitylivingbaseIn, p_177183_3_, p_177183_4_, p_177183_6_, p_177183_7_, p_177183_8_, scale);
}
GL46.glMatrixMode(GL46.GL_TEXTURE);
GL46.glLoadIdentity();
GL46.glMatrixMode(GL46.GL_MODELVIEW);
GlState.enableLighting();
GlState.depthMask(true);
GlState.depthFunc(GL46.GL_LEQUAL);
GlState.disableBlend();
}
// private String getArmorResource(ItemArmor item, boolean legs) // private String getArmorResource(ItemArmor item, boolean legs)
// { // {
// return this.getArmorResource(item, legs, null); // return this.getArmorResource(item, legs, null);

View file

@ -1,6 +1,6 @@
package client.renderer.layers; package client.renderer.layers;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.ItemRenderer; import client.renderer.ItemRenderer;
import client.renderer.entity.RendererLivingEntity; import client.renderer.entity.RendererLivingEntity;
@ -33,7 +33,7 @@ public class LayerArrow implements LayerRenderer<EntityLiving>
for (int j = 0; j < i; ++j) for (int j = 0; j < i; ++j)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
ModelRenderer modelrenderer = this.field_177168_a.getMainModel().getRandomModelBox(random); ModelRenderer modelrenderer = this.field_177168_a.getMainModel().getRandomModelBox(random);
ModelBox modelbox = (ModelBox)modelrenderer.cubeList.get(random.zrange(modelrenderer.cubeList.size())); ModelBox modelbox = (ModelBox)modelrenderer.cubeList.get(random.zrange(modelrenderer.cubeList.size()));
modelrenderer.postRender(0.0625F); modelrenderer.postRender(0.0625F);
@ -43,7 +43,7 @@ public class LayerArrow implements LayerRenderer<EntityLiving>
float f3 = (modelbox.posX1 + (modelbox.posX2 - modelbox.posX1) * f) / 16.0F; float f3 = (modelbox.posX1 + (modelbox.posX2 - modelbox.posX1) * f) / 16.0F;
float f4 = (modelbox.posY1 + (modelbox.posY2 - modelbox.posY1) * f1) / 16.0F; float f4 = (modelbox.posY1 + (modelbox.posY2 - modelbox.posY1) * f1) / 16.0F;
float f5 = (modelbox.posZ1 + (modelbox.posZ2 - modelbox.posZ1) * f2) / 16.0F; float f5 = (modelbox.posZ1 + (modelbox.posZ2 - modelbox.posZ1) * f2) / 16.0F;
GL46.glTranslatef(f3, f4, f5); GL15.glTranslatef(f3, f4, f5);
f = f * 2.0F - 1.0F; f = f * 2.0F - 1.0F;
f1 = f1 * 2.0F - 1.0F; f1 = f1 * 2.0F - 1.0F;
f2 = f2 * 2.0F - 1.0F; f2 = f2 * 2.0F - 1.0F;
@ -57,7 +57,7 @@ public class LayerArrow implements LayerRenderer<EntityLiving>
double d1 = 0.0D; double d1 = 0.0D;
double d2 = 0.0D; double d2 = 0.0D;
this.field_177168_a.getRenderManager().renderEntity(entity, d0, d1, d2, partialTicks); this.field_177168_a.getRenderManager().renderEntity(entity, d0, d1, d2, partialTicks);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
ItemRenderer.enableStandardItemLighting(); ItemRenderer.enableStandardItemLighting();

View file

@ -1,6 +1,6 @@
package client.renderer.layers; package client.renderer.layers;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.entity.RenderHumanoid; import client.renderer.entity.RenderHumanoid;
@ -31,8 +31,8 @@ public class LayerCape implements LayerRenderer<EntityNPC>
entitylivingbaseIn.getCape() != null) { entitylivingbaseIn.getCape() != null) {
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
this.renderer.bindTexture("textures/npc/cape_" + entitylivingbaseIn.getCape() + ".png"); this.renderer.bindTexture("textures/npc/cape_" + entitylivingbaseIn.getCape() + ".png");
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 0.0F, 0.125F); GL15.glTranslatef(0.0F, 0.0F, 0.125F);
if(entitylivingbaseIn.isPlayer()) { if(entitylivingbaseIn.isPlayer()) {
EntityNPC player = (EntityNPC)entitylivingbaseIn; EntityNPC player = (EntityNPC)entitylivingbaseIn;
double d0 = player.prevChasingPosX + (player.chasingPosX - player.prevChasingPosX) * (double)partialTicks - (entitylivingbaseIn.prevX + (entitylivingbaseIn.posX - entitylivingbaseIn.prevX) * (double)partialTicks); double d0 = player.prevChasingPosX + (player.chasingPosX - player.prevChasingPosX) * (double)partialTicks - (entitylivingbaseIn.prevX + (entitylivingbaseIn.posX - entitylivingbaseIn.prevX) * (double)partialTicks);
@ -59,17 +59,17 @@ public class LayerCape implements LayerRenderer<EntityNPC>
f1 += 25.0F; f1 += 25.0F;
} }
GL46.glRotatef(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F); GL15.glRotatef(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(f3 / 2.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(f3 / 2.0F, 0.0F, 0.0F, 1.0F);
GL46.glRotatef(-f3 / 2.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-f3 / 2.0F, 0.0F, 1.0F, 0.0F);
} }
else { else {
GL46.glRotatef(entitylivingbaseIn.isSneakingVisually() ? 25.0F : 5.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(entitylivingbaseIn.isSneakingVisually() ? 25.0F : 5.0F, 1.0F, 0.0F, 0.0F);
} }
GL46.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
this.bipedCape.rotationPointY = this.shift + (entitylivingbaseIn.isSneakingVisually() ? 2.0f : 0.0f); this.bipedCape.rotationPointY = this.shift + (entitylivingbaseIn.isSneakingVisually() ? 2.0f : 0.0f);
this.bipedCape.render(0.0625F); this.bipedCape.render(0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.layers; package client.renderer.layers;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.entity.RenderHumanoid; import client.renderer.entity.RenderHumanoid;
@ -27,23 +27,23 @@ public class LayerCharge implements LayerRenderer<EntityNPC>
// boolean flag = entitylivingbaseIn.isInvisible(); // boolean flag = entitylivingbaseIn.isInvisible();
GlState.depthMask(true); GlState.depthMask(true);
this.main.bindTexture(LIGHTNING_TEXTURE); this.main.bindTexture(LIGHTNING_TEXTURE);
GL46.glMatrixMode(GL46.GL_TEXTURE); GL15.glMatrixMode(GL15.GL_TEXTURE);
GL46.glLoadIdentity(); GL15.glLoadIdentity();
float f = (float)entitylivingbaseIn.ticksExisted + partialTicks; float f = (float)entitylivingbaseIn.ticksExisted + partialTicks;
GL46.glTranslatef(f * 0.01F, f * 0.01F, 0.0F); GL15.glTranslatef(f * 0.01F, f * 0.01F, 0.0F);
GL46.glMatrixMode(GL46.GL_MODELVIEW); GL15.glMatrixMode(GL15.GL_MODELVIEW);
GlState.enableBlend(); GlState.enableBlend();
float f1 = 0.5F; float f1 = 0.5F;
GlState.color(f1, f1, f1, 1.0F); GlState.color(f1, f1, f1, 1.0F);
GlState.disableLighting(); GlState.disableLighting();
GlState.blendFunc(GL46.GL_ONE, GL46.GL_ONE); GlState.blendFunc(GL15.GL_ONE, GL15.GL_ONE);
this.charge.setModelAttributes(this.main.getMainModel()); this.charge.setModelAttributes(this.main.getMainModel());
GL46.glScalef(entitylivingbaseIn.height, entitylivingbaseIn.height, entitylivingbaseIn.height); GL15.glScalef(entitylivingbaseIn.height, entitylivingbaseIn.height, entitylivingbaseIn.height);
GL46.glTranslatef(0.0f, -0.25f, 0.0f); GL15.glTranslatef(0.0f, -0.25f, 0.0f);
this.charge.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale); this.charge.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
GL46.glMatrixMode(GL46.GL_TEXTURE); GL15.glMatrixMode(GL15.GL_TEXTURE);
GL46.glLoadIdentity(); GL15.glLoadIdentity();
GL46.glMatrixMode(GL46.GL_MODELVIEW); GL15.glMatrixMode(GL15.GL_MODELVIEW);
GlState.enableLighting(); GlState.enableLighting();
GlState.disableBlend(); GlState.disableBlend();
GlState.depthMask(false); GlState.depthMask(false);

View file

@ -1,6 +1,6 @@
package client.renderer.layers; package client.renderer.layers;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.GlState; import client.renderer.GlState;
@ -29,26 +29,26 @@ public class LayerEntityBreak implements LayerRenderer<EntityDragon>
Random random = new Random(432L); Random random = new Random(432L);
GlState.disableTexture2D(); GlState.disableTexture2D();
GlState.shadeModel(GL46.GL_SMOOTH); GlState.shadeModel(GL15.GL_SMOOTH);
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE);
GlState.disableAlpha(); GlState.disableAlpha();
GlState.enableCull(); GlState.enableCull();
GlState.depthMask(false); GlState.depthMask(false);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, -1.0F, -2.0F); GL15.glTranslatef(0.0F, -1.0F, -2.0F);
for (int i = 0; (float)i < (f + f * f) / 2.0F * 60.0F; ++i) for (int i = 0; (float)i < (f + f * f) / 2.0F * 60.0F; ++i)
{ {
GL46.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(random.floatv() * 360.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(random.floatv() * 360.0F, 0.0F, 0.0F, 1.0F);
GL46.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F);
GL46.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F); GL15.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F);
GL46.glRotatef(random.floatv() * 360.0F + f * 90.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(random.floatv() * 360.0F + f * 90.0F, 0.0F, 0.0F, 1.0F);
float f2 = random.floatv() * 20.0F + 5.0F + f1 * 10.0F; float f2 = random.floatv() * 20.0F + 5.0F + f1 * 10.0F;
float f3 = random.floatv() * 2.0F + 1.0F + f1 * 2.0F; float f3 = random.floatv() * 2.0F + 1.0F + f1 * 2.0F;
worldrenderer.begin(GL46.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION_COLOR); worldrenderer.begin(GL15.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION_COLOR);
worldrenderer.pos(0.0D, 0.0D, 0.0D).color(255, 255, 255, (int)(255.0F * (1.0F - f1))).endVertex(); worldrenderer.pos(0.0D, 0.0D, 0.0D).color(255, 255, 255, (int)(255.0F * (1.0F - f1))).endVertex();
worldrenderer.pos(-0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex(); worldrenderer.pos(-0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex();
worldrenderer.pos(0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex(); worldrenderer.pos(0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex();
@ -57,11 +57,11 @@ public class LayerEntityBreak implements LayerRenderer<EntityDragon>
Tessellator.draw(); Tessellator.draw();
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.depthMask(true); GlState.depthMask(true);
GlState.disableCull(); GlState.disableCull();
GlState.disableBlend(); GlState.disableBlend();
GlState.shadeModel(GL46.GL_FLAT); GlState.shadeModel(GL15.GL_FLAT);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.enableTexture2D(); GlState.enableTexture2D();
GlState.enableAlpha(); GlState.enableAlpha();

View file

@ -2,7 +2,7 @@ package client.renderer.layers;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.GlState; import client.renderer.GlState;
@ -62,11 +62,11 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
// { // {
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
Client.CLIENT.getTextureManager().bindTexture(EntityTexManager.getSkin(entity)); Client.CLIENT.getTextureManager().bindTexture(EntityTexManager.getSkin(entity));
GL46.glPushMatrix(); GL15.glPushMatrix();
if (entity.isSneakingVisually()) if (entity.isSneakingVisually())
{ {
GL46.glTranslatef(0.0F, 0.2F, 0.0F); GL15.glTranslatef(0.0F, 0.2F, 0.0F);
} }
// if (entity.isChild()) // if (entity.isChild())
@ -77,20 +77,20 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
// SKC.glTranslatef(0.0F, 24.0F * scale, 0.0F); // SKC.glTranslatef(0.0F, 24.0F * scale, 0.0F);
// } // }
GL46.glPushMatrix(); GL15.glPushMatrix();
this.model.bipedBody.postRender(0.0625F); this.model.bipedBody.postRender(0.0625F);
for(ModelRenderer model : this.wing) { for(ModelRenderer model : this.wing) {
if(entity.hasDualWings()) { if(entity.hasDualWings()) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glRotatef(model.rotateAngleY < 0.0f ? -10.0f : 10.0f, 0.0f, 1.0f, 0.0f); GL15.glRotatef(model.rotateAngleY < 0.0f ? -10.0f : 10.0f, 0.0f, 1.0f, 0.0f);
GL46.glTranslatef(0.0f, 0.125f, -0.0625f); GL15.glTranslatef(0.0f, 0.125f, -0.0625f);
model.render(0.0625F); model.render(0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glRotatef(model.rotateAngleY < 0.0f ? 10.0f : -10.0f, 0.0f, 1.0f, 0.0f); GL15.glRotatef(model.rotateAngleY < 0.0f ? 10.0f : -10.0f, 0.0f, 1.0f, 0.0f);
GL46.glTranslatef(model.rotateAngleY < 0.0f ? 0.0625f : -0.0625f, -0.125f, 0.0f); GL15.glTranslatef(model.rotateAngleY < 0.0f ? 0.0625f : -0.0625f, -0.125f, 0.0f);
model.render(0.0625F); model.render(0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else { else {
model.render(0.0625F); model.render(0.0625F);
@ -99,35 +99,35 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
for(ModelRenderer model : this.body) { for(ModelRenderer model : this.body) {
model.render(0.0625F); model.render(0.0625F);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
this.model.bipedLeftArm.postRender(0.0625F); this.model.bipedLeftArm.postRender(0.0625F);
this.model.slimLeftArm.postRender(0.0625F, -1.0f, 0.0f, 0.0f); this.model.slimLeftArm.postRender(0.0625F, -1.0f, 0.0f, 0.0f);
for(ModelRenderer model : this.larm) { for(ModelRenderer model : this.larm) {
model.render(0.0625F); model.render(0.0625F);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
this.model.bipedRightArm.postRender(0.0625F); this.model.bipedRightArm.postRender(0.0625F);
this.model.slimRightArm.postRender(0.0625F, 1.0f, 0.0f, 0.0f); this.model.slimRightArm.postRender(0.0625F, 1.0f, 0.0f, 0.0f);
for(ModelRenderer model : this.rarm) { for(ModelRenderer model : this.rarm) {
model.render(0.0625F); model.render(0.0625F);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
this.model.bipedHead.postRender(0.0625F); this.model.bipedHead.postRender(0.0625F);
for(ModelRenderer model : this.head) { for(ModelRenderer model : this.head) {
model.render(0.0625F); model.render(0.0625F);
} }
for(ModelRenderer model : this.halo) { for(ModelRenderer model : this.halo) {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glRotatef((float)(entity.ticksExisted % (360 * 4)) * 0.25f, 0.0f, 1.0f, 0.0f); GL15.glRotatef((float)(entity.ticksExisted % (360 * 4)) * 0.25f, 0.0f, 1.0f, 0.0f);
model.render(0.0625F); model.render(0.0625F);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPopMatrix(); GL15.glPopMatrix();
// } // }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.layers; package client.renderer.layers;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.entity.RendererLivingEntity; import client.renderer.entity.RendererLivingEntity;
@ -29,7 +29,7 @@ public class LayerHeldItem implements LayerRenderer<EntityNPC>
if (itemstack != null && itemstack.getItem().getWieldType() != null) if (itemstack != null && itemstack.getItem().getWieldType() != null)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
// if (this.livingEntityRenderer.getMainModel().isChild) // if (this.livingEntityRenderer.getMainModel().isChild)
// { // {
@ -42,7 +42,7 @@ public class LayerHeldItem implements LayerRenderer<EntityNPC>
// } // }
((ModelBiped)this.livingEntityRenderer.getMainModel()).postRenderArm(0.0625F); ((ModelBiped)this.livingEntityRenderer.getMainModel()).postRenderArm(0.0625F);
GL46.glTranslatef(this.xshift, this.yshift, 0.0625F); GL15.glTranslatef(this.xshift, this.yshift, 0.0625F);
if (entitylivingbaseIn.isPlayer() && ((EntityNPC)entitylivingbaseIn).fishEntity != null) if (entitylivingbaseIn.isPlayer() && ((EntityNPC)entitylivingbaseIn).fishEntity != null)
{ {
@ -54,11 +54,11 @@ public class LayerHeldItem implements LayerRenderer<EntityNPC>
if (entitylivingbaseIn.isSneakingVisually()) if (entitylivingbaseIn.isSneakingVisually())
{ {
GL46.glTranslatef(0.0F, 0.203125F, 0.0F); GL15.glTranslatef(0.0F, 0.203125F, 0.0F);
} }
gm.getItemRenderer().renderItem(entitylivingbaseIn, itemstack, true); gm.getItemRenderer().renderItem(entitylivingbaseIn, itemstack, true);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.layers; package client.renderer.layers;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.renderer.entity.RenderSlime; import client.renderer.entity.RenderSlime;
@ -25,7 +25,7 @@ public class LayerSlimeGel implements LayerRenderer<EntityNPC>
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.enableNormalize(); GlState.enableNormalize();
GlState.enableBlend(); GlState.enableBlend();
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA); GlState.blendFunc(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA);
this.slimeModel.setModelAttributes(this.slimeRenderer.getMainModel()); this.slimeModel.setModelAttributes(this.slimeRenderer.getMainModel());
this.slimeModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale); this.slimeModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
GlState.disableBlend(); GlState.disableBlend();

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.util.ExtMath; import common.util.ExtMath;
@ -96,14 +96,14 @@ public class ModelArachnoid extends ModelHumanoid
{ {
this.isSneak = false; this.isSneak = false;
// this.setVisible(true); // this.setVisible(true);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f); GL15.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f);
super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale); super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
// this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn); // this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
// this.spiderHead.render(scale); // this.spiderHead.render(scale);
// this.spiderNeck.render(scale); // this.spiderNeck.render(scale);
GL46.glPushMatrix(); GL15.glPushMatrix();
// if (this.isChild) // if (this.isChild)
// { // {
// float f = 2.0F; // float f = 2.0F;
@ -123,7 +123,7 @@ public class ModelArachnoid extends ModelHumanoid
this.spiderLeg6.render(scale); this.spiderLeg6.render(scale);
this.spiderLeg7.render(scale); this.spiderLeg7.render(scale);
this.spiderLeg8.render(scale); this.spiderLeg8.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
/** /**

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
@ -61,7 +61,7 @@ public abstract class ModelBiped extends ModelBase
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
{ {
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn); this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
GL46.glPushMatrix(); GL15.glPushMatrix();
// if (this.isChild) // if (this.isChild)
// { // {
@ -89,7 +89,7 @@ public abstract class ModelBiped extends ModelBase
// { // {
if (this.isSneak) // entityIn.isSneaking()) if (this.isSneak) // entityIn.isSneaking())
{ {
GL46.glTranslatef(0.0F, 0.2F, 0.0F); GL15.glTranslatef(0.0F, 0.2F, 0.0F);
} }
this.bipedHead.render(scale); this.bipedHead.render(scale);
@ -102,7 +102,7 @@ public abstract class ModelBiped extends ModelBase
this.bipedHeadwear.render(scale); this.bipedHeadwear.render(scale);
// } // }
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
/** /**

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.entity.animal.EntityCat; import common.entity.animal.EntityCat;
@ -65,14 +65,14 @@ public class ModelCat extends ModelBase
if (this.isChild) if (this.isChild)
{ {
float f = 2.0F; float f = 2.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.5F / f, 1.5F / f, 1.5F / f); GL15.glScalef(1.5F / f, 1.5F / f, 1.5F / f);
GL46.glTranslatef(0.0F, 10.0F * scale, 4.0F * scale); GL15.glTranslatef(0.0F, 10.0F * scale, 4.0F * scale);
this.head.render(scale); this.head.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.0F / f, 1.0F / f, 1.0F / f); GL15.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
GL46.glTranslatef(0.0F, 24.0F * scale, 0.0F); GL15.glTranslatef(0.0F, 24.0F * scale, 0.0F);
this.body.render(scale); this.body.render(scale);
this.backLeftLeg.render(scale); this.backLeftLeg.render(scale);
this.backRightLeg.render(scale); this.backRightLeg.render(scale);
@ -80,7 +80,7 @@ public class ModelCat extends ModelBase
this.frontRightLeg.render(scale); this.frontRightLeg.render(scale);
this.tail.render(scale); this.tail.render(scale);
this.tail2.render(scale); this.tail2.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else else
{ {

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.util.ExtMath; import common.util.ExtMath;
@ -55,21 +55,21 @@ public class ModelChicken extends ModelBase
if (this.isChild) if (this.isChild)
{ {
float f = 2.0F; float f = 2.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale); GL15.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
this.head.render(scale); this.head.render(scale);
this.bill.render(scale); this.bill.render(scale);
this.chin.render(scale); this.chin.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.0F / f, 1.0F / f, 1.0F / f); GL15.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
GL46.glTranslatef(0.0F, 24.0F * scale, 0.0F); GL15.glTranslatef(0.0F, 24.0F * scale, 0.0F);
this.body.render(scale); this.body.render(scale);
this.rightLeg.render(scale); this.rightLeg.render(scale);
this.leftLeg.render(scale); this.leftLeg.render(scale);
this.rightWing.render(scale); this.rightWing.render(scale);
this.leftWing.render(scale); this.leftWing.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else else
{ {

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
@ -33,28 +33,28 @@ public class ModelCrystal extends ModelBase
*/ */
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(2.0F, 2.0F, 2.0F); GL15.glScalef(2.0F, 2.0F, 2.0F);
GL46.glTranslatef(0.0F, -0.5F, 0.0F); GL15.glTranslatef(0.0F, -0.5F, 0.0F);
if (this.base != null) if (this.base != null)
{ {
this.base.render(scale); this.base.render(scale);
} }
GL46.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F); GL15.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(0.0F, 0.8F + p_78088_4_, 0.0F); GL15.glTranslatef(0.0F, 0.8F + p_78088_4_, 0.0F);
GL46.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F); GL15.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
this.glass.render(scale); this.glass.render(scale);
float f = 0.875F; float f = 0.875F;
GL46.glScalef(f, f, f); GL15.glScalef(f, f, f);
GL46.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F); GL15.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
GL46.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F); GL15.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
this.glass.render(scale); this.glass.render(scale);
GL46.glScalef(f, f, f); GL15.glScalef(f, f, f);
GL46.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F); GL15.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
GL46.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F); GL15.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
this.cube.render(scale); this.cube.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import common.entity.Entity; import common.entity.Entity;
@ -139,17 +139,17 @@ public class ModelDragon extends ModelBase
*/ */
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 0.5F, 0.0F); GL15.glTranslatef(0.0F, 0.5F, 0.0F);
GL46.glScalef(0.35f, 0.35f, 0.35f); GL15.glScalef(0.35f, 0.35f, 0.35f);
GL46.glPushMatrix(); GL15.glPushMatrix();
EntityDragon entitydragon = (EntityDragon)entityIn; EntityDragon entitydragon = (EntityDragon)entityIn;
float f = entitydragon.prevAnimTime + (entitydragon.animTime - entitydragon.prevAnimTime) * this.partialTicks; float f = entitydragon.prevAnimTime + (entitydragon.animTime - entitydragon.prevAnimTime) * this.partialTicks;
this.jaw.rotateAngleX = (float)(Math.sin((double)(f * (float)Math.PI * 2.0F)) + 1.0D) * 0.2F; this.jaw.rotateAngleX = (float)(Math.sin((double)(f * (float)Math.PI * 2.0F)) + 1.0D) * 0.2F;
float f1 = (float)(Math.sin((double)(f * (float)Math.PI * 2.0F - 1.0F)) + 1.0D); float f1 = (float)(Math.sin((double)(f * (float)Math.PI * 2.0F - 1.0F)) + 1.0D);
f1 = (f1 * f1 * 1.0F + f1 * 2.0F) * 0.05F; f1 = (f1 * f1 * 1.0F + f1 * 2.0F) * 0.05F;
GL46.glTranslatef(0.0F, f1 - 2.0F, -3.0F); GL15.glTranslatef(0.0F, f1 - 2.0F, -3.0F);
GL46.glRotatef(f1 * 2.0F, 1.0F, 0.0F, 0.0F); GL15.glRotatef(f1 * 2.0F, 1.0F, 0.0F, 0.0F);
float f2 = -30.0F; float f2 = -30.0F;
float f4 = 0.0F; float f4 = 0.0F;
float f5 = 1.5F; float f5 = 1.5F;
@ -181,10 +181,10 @@ public class ModelDragon extends ModelBase
this.head.rotateAngleY = 0.0f * (float)Math.PI / 180.0F * 1.0F; this.head.rotateAngleY = 0.0f * (float)Math.PI / 180.0F * 1.0F;
this.head.rotateAngleZ = -this.updateRotations(p_78088_5_ - (double)f7) * (float)Math.PI / 180.0F * 1.0F; this.head.rotateAngleZ = -this.updateRotations(p_78088_5_ - (double)f7) * (float)Math.PI / 180.0F * 1.0F;
this.head.render(scale); this.head.render(scale);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 1.0F, 0.0F); GL15.glTranslatef(0.0F, 1.0F, 0.0F);
GL46.glRotatef(-f6 * f5 * 1.0F, 0.0F, 0.0F, 1.0F); GL15.glRotatef(-f6 * f5 * 1.0F, 0.0F, 0.0F, 1.0F);
GL46.glTranslatef(0.0F, -1.0F, 0.0F); GL15.glTranslatef(0.0F, -1.0F, 0.0F);
this.body.rotateAngleZ = 0.0F; this.body.rotateAngleZ = 0.0F;
this.body.render(scale); this.body.render(scale);
@ -205,16 +205,16 @@ public class ModelDragon extends ModelBase
this.wing.render(scale); this.wing.render(scale);
this.frontLeg.render(scale); this.frontLeg.render(scale);
this.rearLeg.render(scale); this.rearLeg.render(scale);
GL46.glScalef(-1.0F, 1.0F, 1.0F); GL15.glScalef(-1.0F, 1.0F, 1.0F);
if (j == 0) if (j == 0)
{ {
GlState.cullFace(GL46.GL_FRONT); GlState.cullFace(GL15.GL_FRONT);
} }
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.cullFace(GL46.GL_BACK); GlState.cullFace(GL15.GL_BACK);
GlState.disableCull(); GlState.disableCull();
float f10 = -((float)Math.sin((double)(f * (float)Math.PI * 2.0F))) * 0.0F; float f10 = -((float)Math.sin((double)(f * (float)Math.PI * 2.0F))) * 0.0F;
f8 = f * (float)Math.PI * 2.0F; f8 = f * (float)Math.PI * 2.0F;
@ -237,8 +237,8 @@ public class ModelDragon extends ModelBase
this.spine.render(scale); this.spine.render(scale);
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
/** /**

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.util.ExtMath; import common.util.ExtMath;
@ -54,20 +54,20 @@ public class ModelFox extends ModelBase
if (this.isChild) if (this.isChild)
{ {
float f = 2.0F; float f = 2.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 3.5F * scale, 2.0F * scale); GL15.glTranslatef(0.0F, 3.5F * scale, 2.0F * scale);
this.head.renderWithRotation(scale); this.head.renderWithRotation(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.0F / f, 1.0F / f, 1.0F / f); GL15.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
GL46.glTranslatef(0.0F, 24.0F * scale, 0.0F); GL15.glTranslatef(0.0F, 24.0F * scale, 0.0F);
this.body.render(scale); this.body.render(scale);
this.wolfLeg1.render(scale); this.wolfLeg1.render(scale);
this.wolfLeg2.render(scale); this.wolfLeg2.render(scale);
this.wolfLeg3.render(scale); this.wolfLeg3.render(scale);
this.wolfLeg4.render(scale); this.wolfLeg4.render(scale);
this.tail.renderWithRotation(scale); this.tail.renderWithRotation(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else else
{ {

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.entity.animal.EntityHorse; import common.entity.animal.EntityHorse;
@ -242,9 +242,9 @@ public class ModelHorse extends ModelBase
if (!flag) if (!flag)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(f1, 0.5F + f1 * 0.5F, f1); GL15.glScalef(f1, 0.5F + f1 * 0.5F, f1);
GL46.glTranslatef(0.0F, 0.95F * (1.0F - f1), 0.0F); GL15.glTranslatef(0.0F, 0.95F * (1.0F - f1), 0.0F);
} }
this.backLeftLeg.render(scale); this.backLeftLeg.render(scale);
@ -262,10 +262,10 @@ public class ModelHorse extends ModelBase
if (!flag) if (!flag)
{ {
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(f1, f1, f1); GL15.glScalef(f1, f1, f1);
GL46.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F); GL15.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F);
} }
this.body.render(scale); this.body.render(scale);
@ -277,18 +277,18 @@ public class ModelHorse extends ModelBase
if (!flag) if (!flag)
{ {
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
float f2 = 0.5F + f1 * f1 * 0.5F; float f2 = 0.5F + f1 * f1 * 0.5F;
GL46.glScalef(f2, f2, f2); GL15.glScalef(f2, f2, f2);
if (f <= 0.0F) if (f <= 0.0F)
{ {
GL46.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F); GL15.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F);
} }
else else
{ {
GL46.glTranslatef(0.0F, 0.9F * (1.0F - f1) * f + 1.35F * (1.0F - f1) * (1.0F - f), 0.15F * (1.0F - f1) * f); GL15.glTranslatef(0.0F, 0.9F * (1.0F - f1) * f + 1.35F * (1.0F - f1) * (1.0F - f), 0.15F * (1.0F - f1) * f);
} }
} }
@ -307,7 +307,7 @@ public class ModelHorse extends ModelBase
if (!flag) if (!flag)
{ {
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
if (flag2) if (flag2)

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.util.ExtMath; import common.util.ExtMath;
@ -150,7 +150,7 @@ public class ModelHumanoid extends ModelBiped
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
{ {
super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale); super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale);
GL46.glPushMatrix(); GL15.glPushMatrix();
// if (this.isChild) // if (this.isChild)
// { // {
@ -171,7 +171,7 @@ public class ModelHumanoid extends ModelBiped
// { // {
if (this.isSneak) // entityIn.isSneaking()) if (this.isSneak) // entityIn.isSneaking())
{ {
GL46.glTranslatef(0.0F, 0.2F, 0.0F); GL15.glTranslatef(0.0F, 0.2F, 0.0F);
// } // }
} }
@ -188,7 +188,7 @@ public class ModelHumanoid extends ModelBiped
// if(this.sticks) { // if(this.sticks) {
// } // }
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
// public void renderCape(float scale) // public void renderCape(float scale)

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
@ -63,9 +63,9 @@ public class ModelMouse extends ModelBase
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn); this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
float s = this.isChild ? 0.125f : 0.25f; float s = this.isChild ? 0.125f : 0.25f;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(s, s, s); GL15.glScalef(s, s, s);
GL46.glTranslatef(0.0f, (this.isChild ? 171.0f : 74.5f) * scale, 0.0f); GL15.glTranslatef(0.0f, (this.isChild ? 171.0f : 74.5f) * scale, 0.0f);
// if (this.isChild) // if (this.isChild)
// { // {
// float f = 2.0F; // float f = 2.0F;
@ -97,7 +97,7 @@ public class ModelMouse extends ModelBase
this.frontLeftLeg.render(scale); this.frontLeftLeg.render(scale);
this.frontRightLeg.render(scale); this.frontRightLeg.render(scale);
// } // }
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.util.ExtMath; import common.util.ExtMath;
@ -47,19 +47,19 @@ public class ModelQuadruped extends ModelBase
if (this.isChild) if (this.isChild)
{ {
float f = 2.0F; float f = 2.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, this.childYOffset * scale, this.childZOffset * scale); GL15.glTranslatef(0.0F, this.childYOffset * scale, this.childZOffset * scale);
this.head.render(scale); this.head.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.0F / f, 1.0F / f, 1.0F / f); GL15.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
GL46.glTranslatef(0.0F, 24.0F * scale, 0.0F); GL15.glTranslatef(0.0F, 24.0F * scale, 0.0F);
this.body.render(scale); this.body.render(scale);
this.leg1.render(scale); this.leg1.render(scale);
this.leg2.render(scale); this.leg2.render(scale);
this.leg3.render(scale); this.leg3.render(scale);
this.leg4.render(scale); this.leg4.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else else
{ {

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.entity.animal.EntityRabbit; import common.entity.animal.EntityRabbit;
@ -101,16 +101,16 @@ public class ModelRabbit extends ModelBase {
if(this.isChild) { if(this.isChild) {
float f = 2.0F; float f = 2.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale); GL15.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
this.rabbitHead.render(scale); this.rabbitHead.render(scale);
this.rabbitLeftEar.render(scale); this.rabbitLeftEar.render(scale);
this.rabbitRightEar.render(scale); this.rabbitRightEar.render(scale);
this.rabbitNose.render(scale); this.rabbitNose.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.0F / f, 1.0F / f, 1.0F / f); GL15.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
GL46.glTranslatef(0.0F, 24.0F * scale, 0.0F); GL15.glTranslatef(0.0F, 24.0F * scale, 0.0F);
this.rabbitLeftFoot.render(scale); this.rabbitLeftFoot.render(scale);
this.rabbitRightFoot.render(scale); this.rabbitRightFoot.render(scale);
this.rabbitLeftThigh.render(scale); this.rabbitLeftThigh.render(scale);
@ -119,7 +119,7 @@ public class ModelRabbit extends ModelBase {
this.rabbitLeftArm.render(scale); this.rabbitLeftArm.render(scale);
this.rabbitRightArm.render(scale); this.rabbitRightArm.render(scale);
this.rabbitTail.render(scale); this.rabbitTail.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else { else {
this.rabbitLeftFoot.render(scale); this.rabbitLeftFoot.render(scale);

View file

@ -2,7 +2,7 @@ package client.renderer.model;
import java.util.List; import java.util.List;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.RenderBuffer; import client.renderer.RenderBuffer;
import client.renderer.Tessellator; import client.renderer.Tessellator;
@ -173,13 +173,13 @@ public class ModelRenderer
this.compileDisplayList(p_78785_1_); this.compileDisplayList(p_78785_1_);
} }
GL46.glTranslatef(this.offsetX, this.offsetY, this.offsetZ); GL15.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F)
{ {
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F)
{ {
GL46.glCallList(this.displayList); GL15.glCallList(this.displayList);
if (this.childModels != null) if (this.childModels != null)
{ {
@ -191,8 +191,8 @@ public class ModelRenderer
} }
else else
{ {
GL46.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_); GL15.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
GL46.glCallList(this.displayList); GL15.glCallList(this.displayList);
if (this.childModels != null) if (this.childModels != null)
{ {
@ -202,30 +202,30 @@ public class ModelRenderer
} }
} }
GL46.glTranslatef(-this.rotationPointX * p_78785_1_, -this.rotationPointY * p_78785_1_, -this.rotationPointZ * p_78785_1_); GL15.glTranslatef(-this.rotationPointX * p_78785_1_, -this.rotationPointY * p_78785_1_, -this.rotationPointZ * p_78785_1_);
} }
} }
else else
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_); GL15.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
if (this.rotateAngleZ != 0.0F) if (this.rotateAngleZ != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); GL15.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
} }
if (this.rotateAngleY != 0.0F) if (this.rotateAngleY != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); GL15.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
} }
if (this.rotateAngleX != 0.0F) if (this.rotateAngleX != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); GL15.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
} }
GL46.glCallList(this.displayList); GL15.glCallList(this.displayList);
if (this.childModels != null) if (this.childModels != null)
{ {
@ -235,10 +235,10 @@ public class ModelRenderer
} }
} }
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
GL46.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ); GL15.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ);
} }
} }
} }
@ -254,26 +254,26 @@ public class ModelRenderer
this.compileDisplayList(p_78791_1_); this.compileDisplayList(p_78791_1_);
} }
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(this.rotationPointX * p_78791_1_, this.rotationPointY * p_78791_1_, this.rotationPointZ * p_78791_1_); GL15.glTranslatef(this.rotationPointX * p_78791_1_, this.rotationPointY * p_78791_1_, this.rotationPointZ * p_78791_1_);
if (this.rotateAngleY != 0.0F) if (this.rotateAngleY != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); GL15.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
} }
if (this.rotateAngleX != 0.0F) if (this.rotateAngleX != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); GL15.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
} }
if (this.rotateAngleZ != 0.0F) if (this.rotateAngleZ != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); GL15.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
} }
GL46.glCallList(this.displayList); GL15.glCallList(this.displayList);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }
} }
@ -296,26 +296,26 @@ public class ModelRenderer
{ {
if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F) if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F)
{ {
GL46.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); GL15.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);
} }
} }
else else
{ {
GL46.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale); GL15.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);
if (this.rotateAngleZ != 0.0F) if (this.rotateAngleZ != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); GL15.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
} }
if (this.rotateAngleY != 0.0F) if (this.rotateAngleY != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); GL15.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
} }
if (this.rotateAngleX != 0.0F) if (this.rotateAngleX != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); GL15.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
} }
} }
} }
@ -337,26 +337,26 @@ public class ModelRenderer
{ {
if (this.rotationPointX + x != 0.0F || this.rotationPointY + y != 0.0F || this.rotationPointZ + z != 0.0F) if (this.rotationPointX + x != 0.0F || this.rotationPointY + y != 0.0F || this.rotationPointZ + z != 0.0F)
{ {
GL46.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale); GL15.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale);
} }
} }
else else
{ {
GL46.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale); GL15.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale);
if (this.rotateAngleZ != 0.0F) if (this.rotateAngleZ != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F); GL15.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
} }
if (this.rotateAngleY != 0.0F) if (this.rotateAngleY != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F); GL15.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
} }
if (this.rotateAngleX != 0.0F) if (this.rotateAngleX != 0.0F)
{ {
GL46.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); GL15.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
} }
} }
} }
@ -365,8 +365,8 @@ public class ModelRenderer
private void compileDisplayList(float scale) private void compileDisplayList(float scale)
{ {
this.displayList = GL46.glGenLists(1); this.displayList = GL15.glGenLists(1);
GL46.glNewList(this.displayList, GL46.GL_COMPILE); GL15.glNewList(this.displayList, GL15.GL_COMPILE);
// Tessellator.getInstance(); // Tessellator.getInstance();
RenderBuffer worldrenderer = Tessellator.getBuffer(); RenderBuffer worldrenderer = Tessellator.getBuffer();
@ -375,13 +375,13 @@ public class ModelRenderer
((ModelBox)this.cubeList.get(i)).makeList(worldrenderer, scale); ((ModelBox)this.cubeList.get(i)).makeList(worldrenderer, scale);
} }
GL46.glEndList(); GL15.glEndList();
this.compiled = true; this.compiled = true;
} }
public void deleteDisplayList() { public void deleteDisplayList() {
if(this.displayList != 0) if(this.displayList != 0)
GL46.glDeleteLists(this.displayList, 1); GL15.glDeleteLists(this.displayList, 1);
this.displayList = 0; this.displayList = 0;
} }

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import common.entity.Entity; import common.entity.Entity;
import common.entity.animal.EntityWolf; import common.entity.animal.EntityWolf;
@ -77,13 +77,13 @@ public class ModelWolf extends ModelBase
if (this.isChild) if (this.isChild)
{ {
float f = 2.0F; float f = 2.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale); GL15.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
this.wolfHeadMain.renderWithRotation(scale); this.wolfHeadMain.renderWithRotation(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(1.0F / f, 1.0F / f, 1.0F / f); GL15.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
GL46.glTranslatef(0.0F, 24.0F * scale, 0.0F); GL15.glTranslatef(0.0F, 24.0F * scale, 0.0F);
this.wolfBody.render(scale); this.wolfBody.render(scale);
this.wolfLeg1.render(scale); this.wolfLeg1.render(scale);
this.wolfLeg2.render(scale); this.wolfLeg2.render(scale);
@ -91,7 +91,7 @@ public class ModelWolf extends ModelBase
this.wolfLeg4.render(scale); this.wolfLeg4.render(scale);
this.wolfTail.renderWithRotation(scale); this.wolfTail.renderWithRotation(scale);
this.wolfMane.render(scale); this.wolfMane.render(scale);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
else else
{ {

View file

@ -1,6 +1,6 @@
package client.renderer.model; package client.renderer.model;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.DefaultVertexFormats; import client.renderer.DefaultVertexFormats;
import client.renderer.RenderBuffer; import client.renderer.RenderBuffer;
@ -59,7 +59,7 @@ public class TexturedQuad
// ny = -ny; // ny = -ny;
// nz = -nz; // nz = -nz;
// } // }
renderer.begin(GL46.GL_QUADS, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL); renderer.begin(GL15.GL_QUADS, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
{ {
PositionTextureVertex vertex = this.vertices[i]; PositionTextureVertex vertex = this.vertices[i];

View file

@ -2,7 +2,7 @@ package client.renderer.texture;
import java.io.IOException; import java.io.IOException;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
@ -11,7 +11,7 @@ public abstract class Texture {
public final int getGlTextureId() { public final int getGlTextureId() {
if(this.id == -1) if(this.id == -1)
this.id = GL46.glGenTextures(); this.id = GL15.glGenTextures();
return this.id; return this.id;
} }

View file

@ -7,7 +7,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GL30;
import java.util.Map.Entry; import java.util.Map.Entry;
@ -192,7 +193,7 @@ public class TextureMap extends Texture
return textureatlassprite; return textureatlassprite;
} }
public void update() public void update(boolean mips)
{ {
GlState.bindTexture(this.getGlTextureId()); GlState.bindTexture(this.getGlTextureId());
@ -201,7 +202,8 @@ public class TextureMap extends Texture
textureatlassprite.updateAnimation(); textureatlassprite.updateAnimation();
} }
GL46.glGenerateMipmap(GL46.GL_TEXTURE_2D); if(mips)
GL30.glGenerateMipmap(GL15.GL_TEXTURE_2D);
} }
private Sprite registerSprite(String location) private Sprite registerSprite(String location)

View file

@ -11,7 +11,7 @@ import java.nio.IntBuffer;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import client.util.FileUtils; import client.util.FileUtils;
@ -23,10 +23,10 @@ public class TextureUtil
public static final int[] MISSING_DATA = MISSING.getData(); public static final int[] MISSING_DATA = MISSING.getData();
public static void setParams(boolean mips, boolean linear) { public static void setParams(boolean mips, boolean linear) {
GL46.glTexParameteri(GL46.GL_TEXTURE_2D, GL46.GL_TEXTURE_MIN_FILTER, mips ? (linear ? GL46.GL_NEAREST_MIPMAP_LINEAR : GL46.GL_NEAREST_MIPMAP_NEAREST) : GL46.GL_NEAREST); GL15.glTexParameteri(GL15.GL_TEXTURE_2D, GL15.GL_TEXTURE_MIN_FILTER, mips ? (linear ? GL15.GL_NEAREST_MIPMAP_LINEAR : GL15.GL_NEAREST_MIPMAP_NEAREST) : GL15.GL_NEAREST);
GL46.glTexParameteri(GL46.GL_TEXTURE_2D, GL46.GL_TEXTURE_MAG_FILTER, GL46.GL_NEAREST); GL15.glTexParameteri(GL15.GL_TEXTURE_2D, GL15.GL_TEXTURE_MAG_FILTER, GL15.GL_NEAREST);
GL46.glTexParameteri(GL46.GL_TEXTURE_2D, GL46.GL_TEXTURE_WRAP_S, GL46.GL_REPEAT); GL15.glTexParameteri(GL15.GL_TEXTURE_2D, GL15.GL_TEXTURE_WRAP_S, GL15.GL_REPEAT);
GL46.glTexParameteri(GL46.GL_TEXTURE_2D, GL46.GL_TEXTURE_WRAP_T, GL46.GL_REPEAT); GL15.glTexParameteri(GL15.GL_TEXTURE_2D, GL15.GL_TEXTURE_WRAP_T, GL15.GL_REPEAT);
} }
public static void uploadTexture(int[] data, int w, int h, int x, int y, boolean params) public static void uploadTexture(int[] data, int w, int h, int x, int y, boolean params)
@ -44,7 +44,7 @@ public class TextureUtil
BUFFER.clear(); BUFFER.clear();
BUFFER.put(data, j, i1); BUFFER.put(data, j, i1);
BUFFER.position(0).limit(i1); BUFFER.position(0).limit(i1);
GL46.glTexSubImage2D(GL46.GL_TEXTURE_2D, 0, x, y + k, w, l, GL46.GL_BGRA, GL46.GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER); GL15.glTexSubImage2D(GL15.GL_TEXTURE_2D, 0, x, y + k, w, l, GL15.GL_BGRA, GL15.GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER);
} }
} }
@ -67,7 +67,7 @@ public class TextureUtil
BUFFER.clear(); BUFFER.clear();
BUFFER.put(data, 0, k1); BUFFER.put(data, 0, k1);
BUFFER.position(0).limit(k1); BUFFER.position(0).limit(k1);
GL46.glTexSubImage2D(GL46.GL_TEXTURE_2D, 0, 0, i1, w, j1, GL46.GL_BGRA, GL46.GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER); GL15.glTexSubImage2D(GL15.GL_TEXTURE_2D, 0, 0, i1, w, j1, GL15.GL_BGRA, GL15.GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER);
} }
return id; return id;
} }
@ -76,7 +76,7 @@ public class TextureUtil
{ {
// GlState.deleteTexture(id); //TODO: check needed // GlState.deleteTexture(id); //TODO: check needed
GlState.bindTexture(id); GlState.bindTexture(id);
GL46.nglTexImage2D(GL46.GL_TEXTURE_2D, 0, GL46.GL_RGBA, width, height, 0, GL46.GL_BGRA, GL46.GL_UNSIGNED_INT_8_8_8_8_REV, NULL); GL15.nglTexImage2D(GL15.GL_TEXTURE_2D, 0, GL15.GL_RGBA, width, height, 0, GL15.GL_BGRA, GL15.GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
} }
public static int[] readImageData(String loc) throws IOException public static int[] readImageData(String loc) throws IOException

View file

@ -3,7 +3,7 @@ package client.renderer.tileentity;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.Drawing; import client.renderer.Drawing;
@ -92,18 +92,18 @@ public class DisplayRenderer extends ElementRenderer<TileEntityDisplay> {
else if(dir == Facing.EAST) else if(dir == Facing.EAST)
rot = -90.0F; rot = -90.0F;
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x + 0.5F, (float)y + 1.0f, (float)z + 0.5F); GL15.glTranslatef((float)x + 0.5F, (float)y + 1.0f, (float)z + 0.5F);
GL46.glRotatef(-rot, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-rot, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(-0.5F, 0.0f, -0.5f + 0.0625f + 0.005f); GL15.glTranslatef(-0.5F, 0.0f, -0.5f + 0.0625f + 0.005f);
float density = 1.0f / (float)(te.density / 16); float density = 1.0f / (float)(te.density / 16);
GL46.glScalef(0.0625f * density, -0.0625f * density, 0.0625f * density); GL15.glScalef(0.0625f * density, -0.0625f * density, 0.0625f * density);
GlState.disableLighting(); GlState.disableLighting();
Drawing.drawTexturedRect(Client.CLIENT, getTexture(te), te.density, te.density, 0, 0, 0, 0, te.density, te.density); Drawing.drawTexturedRect(Client.CLIENT, getTexture(te), te.density, te.density, 0, 0, 0, 0, te.density, te.density);
GlState.enableLighting(); GlState.enableLighting();
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }

View file

@ -1,6 +1,6 @@
package client.renderer.tileentity; package client.renderer.tileentity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.Client; import client.Client;
import client.renderer.GlState; import client.renderer.GlState;
@ -17,17 +17,17 @@ public class ItemPipeRenderer extends ElementRenderer<TileEntityItemPipe> {
return; return;
Client.CLIENT.getTextureManager().bindTexture(TextureMap.BLOCKS); Client.CLIENT.getTextureManager().bindTexture(TextureMap.BLOCKS);
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
GlState.alphaFunc(GL46.GL_GREATER, 0.1F); GlState.alphaFunc(GL15.GL_GREATER, 0.1F);
GlState.enableBlend(); GlState.enableBlend();
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO); GlState.tryBlendFuncSeparate(GL15.GL_SRC_ALPHA, GL15.GL_ONE_MINUS_SRC_ALPHA, GL15.GL_ONE, GL15.GL_ZERO);
RenderItem itemRenderer = Client.CLIENT.getRenderItem(); RenderItem itemRenderer = Client.CLIENT.getRenderItem();
IBakedModel ibakedmodel = itemRenderer.getItemModelMesher().getItemModel(itemstack); IBakedModel ibakedmodel = itemRenderer.getItemModelMesher().getItemModel(itemstack);
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glTranslatef((float)x + 0.5F, (float)y + 0.5f, (float)z + 0.5F); GL15.glTranslatef((float)x + 0.5F, (float)y + 0.5f, (float)z + 0.5F);
if(ibakedmodel.isGui3d()) if(ibakedmodel.isGui3d())
GL46.glScalef(0.5F, 0.5F, 0.5F); GL15.glScalef(0.5F, 0.5F, 0.5F);
itemRenderer.renderItem(itemstack, ibakedmodel); itemRenderer.renderItem(itemstack, ibakedmodel);
GL46.glPopMatrix(); GL15.glPopMatrix();
GlState.disableRescaleNormal(); GlState.disableRescaleNormal();
GlState.disableBlend(); GlState.disableBlend();
} }

View file

@ -1,6 +1,6 @@
package client.renderer.tileentity; package client.renderer.tileentity;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.Drawing; import client.renderer.Drawing;
import client.renderer.GlState; 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) public void renderElements(TileEntitySign te, double x, double y, double z, float partialTicks)
{ {
GL46.glPushMatrix(); GL15.glPushMatrix();
float f = 0.6666667F; float f = 0.6666667F;
State state = te.getState(); State state = te.getState();
if (state.getBlock() instanceof BlockStandingSign) if (state.getBlock() instanceof BlockStandingSign)
{ {
GL46.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F); GL15.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
int r = state.getValue(BlockStandingSign.FACING).getIndex(); int r = state.getValue(BlockStandingSign.FACING).getIndex();
float f1 = 0.0F; float f1 = 0.0F;
@ -38,8 +38,8 @@ public class SignRenderer extends ElementRenderer<TileEntitySign>
{ {
f1 = -90.0F; f1 = -90.0F;
} }
GL46.glRotatef(-f1, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(0.0F, f * -0.0625f * 2.0f, 0.0F); GL15.glTranslatef(0.0F, f * -0.0625f * 2.0f, 0.0F);
} }
else else
{ {
@ -61,16 +61,16 @@ public class SignRenderer extends ElementRenderer<TileEntitySign>
f2 = -90.0F; f2 = -90.0F;
} }
GL46.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F); GL15.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
GL46.glRotatef(-f2, 0.0F, 1.0F, 0.0F); GL15.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
GL46.glTranslatef(0.0F, -0.3125F - f * 0.0625f * 0.5f, -0.4375F); GL15.glTranslatef(0.0F, -0.3125F - f * 0.0625f * 0.5f, -0.4375F);
} }
GlState.enableRescaleNormal(); GlState.enableRescaleNormal();
float f3 = 0.015625F * f; float f3 = 0.015625F * f;
GL46.glTranslatef(0.0F, 0.5F * f, 0.1F * f); GL15.glTranslatef(0.0F, 0.5F * f, 0.1F * f);
GL46.glScalef(f3, -f3, f3); GL15.glScalef(f3, -f3, f3);
GL46.glNormal3f(0.0F, 0.0F, -1.0F * f3); GL15.glNormal3f(0.0F, 0.0F, -1.0F * f3);
GlState.depthMask(false); GlState.depthMask(false);
for (int j = 0; j < te.text.length; ++j) 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()) 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]; String s = te.text[j].length() > 50 ? te.text[j].substring(0, 50) : te.text[j];
GL46.glPushMatrix(); GL15.glPushMatrix();
GL46.glScalef(0.75f, 0.75f, 0.75f); GL15.glScalef(0.75f, 0.75f, 0.75f);
Drawing.drawTextCenteredN(s, 0, j * (18 - 3) - 30, 0xff000000); Drawing.drawTextCenteredN(s, 0, j * (18 - 3) - 30, 0xff000000);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }
GlState.depthMask(true); GlState.depthMask(true);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GL46.glPopMatrix(); GL15.glPopMatrix();
} }
} }

View file

@ -2,7 +2,7 @@ package client.renderer.tileentity;
import java.util.Map; import java.util.Map;
import org.lwjgl.opengl.GL46; import org.lwjgl.opengl.GL15;
import client.renderer.GlState; import client.renderer.GlState;
import common.collect.Maps; import common.collect.Maps;
@ -58,7 +58,7 @@ public class SpecialRenderer {
int light = this.world.getCombinedBrightness(tile.getPos()); int light = this.world.getCombinedBrightness(tile.getPos());
int block = light % 65536; int block = light % 65536;
int sky = light / 65536; int sky = light / 65536;
GL46.glMultiTexCoord2f(GL46.GL_TEXTURE1, (float)block / 1.0F, (float)sky / 1.0F); GL15.glMultiTexCoord2f(GL15.GL_TEXTURE1, (float)block / 1.0F, (float)sky / 1.0F);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F); GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
this.render(tile, (double)pos.getX() - entityX, (double)pos.getY() - entityY, (double)pos.getZ() - entityZ, partial); this.render(tile, (double)pos.getX() - entityX, (double)pos.getY() - entityY, (double)pos.getZ() - entityZ, partial);

View file

@ -1080,11 +1080,6 @@ public class Block {
return provider.getModel(name).add().all(); return provider.getModel(name).add().all();
} }
@Clientside
public float getShinyness() {
return 1.0f;
}
@Clientside @Clientside
public GuiPosition getItemPosition() { public GuiPosition getItemPosition() {
return GuiPosition.NORMAL; return GuiPosition.NORMAL;

View file

@ -46,9 +46,4 @@ public class BlockGlass extends Block {
world.destroyBlock(pos, true); world.destroyBlock(pos, true);
return false; return false;
} }
@Clientside
public float getShinyness() {
return 16.0f;
}
} }

View file

@ -51,9 +51,4 @@ public class BlockMetalBlock extends Block {
if(this.metal.radioactivity > 0.0f) if(this.metal.radioactivity > 0.0f)
map.put(Attribute.RADIATION, this.metal.radioactivity * 4.0f * 9.0f); map.put(Attribute.RADIATION, this.metal.radioactivity * 4.0f * 9.0f);
} }
@Clientside
public float getShinyness() {
return 32.0f;
}
} }

View file

@ -205,11 +205,6 @@ public class BlockPane extends Block
return this.material == Material.SOLID ? "iron_bars" : "glass_pane"; return this.material == Material.SOLID ? "iron_bars" : "glass_pane";
} }
@Clientside
public float getShinyness() {
return this.material == Material.SOLID ? 4.0f : 16.0f;
}
public Model getModel(ModelProvider provider, String name, State state) { public Model getModel(ModelProvider provider, String name, State state) {
boolean n = state.getValue(NORTH); boolean n = state.getValue(NORTH);
boolean s = state.getValue(SOUTH); boolean s = state.getValue(SOUTH);

View file

@ -333,9 +333,4 @@ public abstract class BlockLiquid extends Block
protected boolean hasRegisteredItem() { protected boolean hasRegisteredItem() {
return false; return false;
} }
@Clientside
public float getShinyness() {
return 3.0f;
}
} }

View file

@ -16,11 +16,6 @@ public class BlockCyber extends Block {
this.setDisplay("CYBER"); this.setDisplay("CYBER");
} }
@Clientside
public float getShinyness() {
return 0.0f;
}
@Clientside @Clientside
public boolean isNonBlock() { public boolean isNonBlock() {
return true; return true;

View file

@ -57,13 +57,11 @@ public abstract class Dimension extends Section {
// client // client
private boolean denseFog = false; private boolean denseFog = false;
private boolean subtractBlock = false;
private float cloudHeight = 192.0f; private float cloudHeight = 192.0f;
private int skyColor = 0x000000; private int skyColor = 0x000000;
private int fogColor = 0x000000; private int fogColor = 0x000000;
private int cloudColor = 0x000000; private int cloudColor = 0x000000;
private int lightColor = 0xffffffff; private int lightColor = 0xffffffff;
private int blockColor = 0xffffffff;
private float starBrightness = 0.0f; private float starBrightness = 0.0f;
private float deepstarBrightness = 0.0f; private float deepstarBrightness = 0.0f;
private CloudType cloudTexture = CloudType.NORMAL; private CloudType cloudTexture = CloudType.NORMAL;
@ -208,16 +206,6 @@ public abstract class Dimension extends Section {
return this; return this;
} }
public final Dimension setBlockColor(int value) {
this.blockColor = value;
return this;
}
public final Dimension enableBlockLightSubtraction() {
this.subtractBlock = true;
return this;
}
public final Dimension setDefaultWeather(Weather value) { public final Dimension setDefaultWeather(Weather value) {
this.defaultWeather = this.weather = value; this.defaultWeather = this.weather = value;
return this; return this;
@ -352,14 +340,6 @@ public abstract class Dimension extends Section {
return this.lightColor; return this.lightColor;
} }
public final int getBlockColor() {
return this.blockColor;
}
public final boolean isBlockLightSubtracted() {
return this.subtractBlock;
}
public final String getCloudTexture() { public final String getCloudTexture() {
return "textures/world/" + this.cloudTexture.getTexture() + ".png"; return "textures/world/" + this.cloudTexture.getTexture() + ".png";
} }
@ -533,8 +513,6 @@ public abstract class Dimension extends Section {
this.fogColor = tag.getInt("FogColor"); this.fogColor = tag.getInt("FogColor");
this.cloudColor = tag.getInt("CloudColor"); this.cloudColor = tag.getInt("CloudColor");
this.lightColor = tag.getInt("LightColor"); this.lightColor = tag.getInt("LightColor");
this.blockColor = tag.getInt("BlockColor");
this.subtractBlock = tag.getBool("SubtractBlock");
this.gravity = tag.getFloat("Gravity"); this.gravity = tag.getFloat("Gravity");
this.size = tag.getInt("Size"); this.size = tag.getInt("Size");
this.temperature = tag.getFloat("Temperature"); this.temperature = tag.getFloat("Temperature");
@ -582,8 +560,6 @@ public abstract class Dimension extends Section {
tag.setInt("FogColor", this.fogColor); tag.setInt("FogColor", this.fogColor);
tag.setInt("CloudColor", this.cloudColor); tag.setInt("CloudColor", this.cloudColor);
tag.setInt("LightColor", this.lightColor); tag.setInt("LightColor", this.lightColor);
tag.setInt("BlockColor", this.blockColor);
tag.setBool("SubtractBlock", this.subtractBlock);
tag.setFloat("Gravity", this.gravity); tag.setFloat("Gravity", this.gravity);
tag.setInt("Size", this.size); tag.setInt("Size", this.size);
tag.setFloat("Temperature", this.temperature); tag.setFloat("Temperature", this.temperature);

View file

@ -149,7 +149,6 @@ public abstract class BlockRegistry {
register("sandstone", sandstone); register("sandstone", sandstone);
Block smooth_sandstone; Block smooth_sandstone;
register("smooth_sandstone", (smooth_sandstone = new BlockSandStone("smooth")).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Glatter Sandstein")); register("smooth_sandstone", (smooth_sandstone = new BlockSandStone("smooth")).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Glatter Sandstein"));
register("carved_sandstone", (new BlockSandStone("carved")).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Gemeißelter Sandstein"));
Block obsidian = register("obsidian", (new BlockObsidian()).setHardness(50.0F).setResistance(2000.0F).setSound(SoundType.STONE) Block obsidian = register("obsidian", (new BlockObsidian()).setHardness(50.0F).setResistance(2000.0F).setSound(SoundType.STONE)
.setDisplay("Obsidian").setMiningTool(Equipment.PICKAXE, 3)); .setDisplay("Obsidian").setMiningTool(Equipment.PICKAXE, 3));
Block clay = register("clay", (new BlockClay()).setHardness(0.6F).setSound(SoundType.GRAVEL).setDisplay("Ton").setMiningTool(Equipment.SHOVEL)); Block clay = register("clay", (new BlockClay()).setHardness(0.6F).setSound(SoundType.GRAVEL).setDisplay("Ton").setMiningTool(Equipment.SHOVEL));

View file

@ -130,7 +130,6 @@ public abstract class Blocks {
public static final BlockMetalBlock calcium_block = get("calcium_block"); public static final BlockMetalBlock calcium_block = get("calcium_block");
public static final BlockMetalOre calcium_ore = get("calcium_ore"); public static final BlockMetalOre calcium_ore = get("calcium_ore");
public static final BlockCarrot carrots = get("carrots"); public static final BlockCarrot carrots = get("carrots");
public static final BlockSandStone carved_sandstone = get("carved_sandstone");
public static final Block carved_stonebrick = get("carved_stonebrick"); public static final Block carved_stonebrick = get("carved_stonebrick");
public static final BlockCauldron cauldron = get("cauldron"); public static final BlockCauldron cauldron = get("cauldron");
public static final Block cell_rock = get("cell_rock"); public static final Block cell_rock = get("cell_rock");

View file

@ -211,7 +211,6 @@ public abstract class Items {
public static final ItemCamera camera = get("camera"); public static final ItemCamera camera = get("camera");
public static final ItemSeedFood carrot = get("carrot"); public static final ItemSeedFood carrot = get("carrot");
public static final ItemWhip whip = get("whip"); public static final ItemWhip whip = get("whip");
public static final Item carved_sandstone = get("carved_sandstone");
public static final Item carved_stonebrick = get("carved_stonebrick"); public static final Item carved_stonebrick = get("carved_stonebrick");
public static final Item cauldron = get("cauldron"); public static final Item cauldron = get("cauldron");
public static final Item cell_rock = get("cell_rock"); public static final Item cell_rock = get("cell_rock");

View file

@ -403,8 +403,8 @@ public abstract class Chunk {
Material mat = block.getMaterial(); Material mat = block.getMaterial();
if((!mat.blocksMovement() && !mat.isLiquid()) if((!mat.blocksMovement() && !mat.isLiquid())
// || (mat == Material.LEAVES && ((mat = this.getBlock(loc.up()).getMaterial()) == Material.POWDER) || (mat == Material.LEAVES && ((mat = this.getBlock(loc.up()).getMaterial()) == Material.POWDER)
|| mat == Material.LEAVES) { || mat == Material.LEAVES)) {
loc = loc.down(); loc = loc.down();
} }
else { else {

View file

@ -740,7 +740,7 @@ public abstract class UniverseRegistry extends DimensionRegistry {
.setStarColorSin(25.0f, 0.1f, 0.25f, 0xff00ff, 1, 4).setDeepStarColorSin(25.0f, 0.1f, 0.5f, 0xff00ff, 1, 4), warp); .setStarColorSin(25.0f, 0.1f, 0.25f, 0xff00ff, 1, 4).setDeepStarColorSin(25.0f, 0.1f, 0.5f, 0xff00ff, 1, 4), warp);
registerDomain("Tian'Xin", () -> { registerDomain("Tian'Xin", () -> {
registerArea("Ni'enrath", new Area(0x7f00ff, 532109, 276.15f, 1, Blocks.tian.getState(), Blocks.spring_water.getState(), 63).setLightColor(0x07000f).setBlockColor(0xcf6fff), registerArea("Ni'enrath", new Area(0x7f00ff, 532109, 276.15f, 1, Blocks.tian.getState(), Blocks.spring_water.getState(), 63).setLightColor(0x07000f),
new GeneratorData().setGenerator(new GeneratorPerlin(0.1F, 1.0F)) new GeneratorData().setGenerator(new GeneratorPerlin(0.1F, 1.0F))
.setReplacer(new ReplacerAltSimple(Blocks.tian_soil.getState(), Blocks.tian.getState())) .setReplacer(new ReplacerAltSimple(Blocks.tian_soil.getState(), Blocks.tian.getState()))
.setPopulator(new PopulatorTian()).addCaveGen(new MapGenBigCaves()).enableSnow() .setPopulator(new PopulatorTian()).addCaveGen(new MapGenBigCaves()).enableSnow()
@ -755,7 +755,7 @@ public abstract class UniverseRegistry extends DimensionRegistry {
registerDomain("Digital", () -> { registerDomain("Digital", () -> {
GeneratorSettings settings = new GeneratorSettings(); GeneratorSettings settings = new GeneratorSettings();
settings.stretchY = 48.0f; settings.stretchY = 48.0f;
registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15, Blocks.cyber.getState(), Blocks.spring_water.getState(), 63).setLightColor(0x00003f).setBlockColor(0x00ff00).enableBlockLightSubtraction(), registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15, Blocks.cyber.getState(), Blocks.spring_water.getState(), 63).setLightColor(0x00003f),
new GeneratorData().setGenerator(new GeneratorPerlin(false, settings, 0.1f, 3.5f))); new GeneratorData().setGenerator(new GeneratorPerlin(false, settings, 0.1f, 3.5f)));
}); });
registerDomain("hell", "Hölle", () -> { registerDomain("hell", "Hölle", () -> {