A few small patches to fix obscure piston rendering bugs.

This commit is contained in:
Eloraam 2011-09-07 15:14:01 +00:00
parent 8b5440b351
commit 878cac2697
2 changed files with 17 additions and 4 deletions

View File

@ -78,6 +78,11 @@ public class ForgeHooksClient {
n=(Integer)textures.get(name); n=(Integer)textures.get(name);
} }
if(!inWorld) { if(!inWorld) {
if(Tessellator.instance.isDrawing) {
int mode=Tessellator.instance.drawMode;
Tessellator.instance.draw();
Tessellator.instance.startDrawing(mode);
}
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n); GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n);
return; return;
} }
@ -88,6 +93,11 @@ public class ForgeHooksClient {
if(inWorld) { if(inWorld) {
Tessellator.instance=defaultTessellator; Tessellator.instance=defaultTessellator;
} else { } else {
if(Tessellator.instance.isDrawing) {
int mode=Tessellator.instance.drawMode;
Tessellator.instance.draw();
Tessellator.instance.startDrawing(mode);
}
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
.getMinecraftInstance().renderEngine .getMinecraftInstance().renderEngine
.getTexture("/terrain.png")); .getTexture("/terrain.png"));

View File

@ -1677,7 +1677,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/SlotCraft
ItemStack itemstack1 = craftMatrix.getStackInSlot(i); ItemStack itemstack1 = craftMatrix.getStackInSlot(i);
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Tessellator.java ../src_work/minecraft/net/minecraft/src/Tessellator.java diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Tessellator.java ../src_work/minecraft/net/minecraft/src/Tessellator.java
--- ../src_base/minecraft/net/minecraft/src/Tessellator.java 2011-09-07 10:43:33.000000000 -0400 --- ../src_base/minecraft/net/minecraft/src/Tessellator.java 2011-09-07 10:43:33.000000000 -0400
+++ ../src_work/minecraft/net/minecraft/src/Tessellator.java 2011-09-07 10:57:28.000000000 -0400 +++ ../src_work/minecraft/net/minecraft/src/Tessellator.java 2011-09-07 11:12:23.000000000 -0400
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
import java.io.PrintStream; import java.io.PrintStream;
@ -1809,21 +1809,24 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Tessellat
private int rawBuffer[]; private int rawBuffer[];
private int vertexCount; private int vertexCount;
private double textureU; private double textureU;
@@ -350,16 +353,41 @@ @@ -349,17 +352,42 @@
private int rawBufferIndex;
private int addedVertices; private int addedVertices;
private boolean isColorDisabled; private boolean isColorDisabled;
private int drawMode; - private int drawMode;
- private double xOffset; - private double xOffset;
- private double yOffset; - private double yOffset;
- private double zOffset; - private double zOffset;
+ public int drawMode;
+ public double xOffset; + public double xOffset;
+ public double yOffset; + public double yOffset;
+ public double zOffset; + public double zOffset;
private int normal; private int normal;
- public static final Tessellator instance = new Tessellator(0x200000); - public static final Tessellator instance = new Tessellator(0x200000);
private boolean isDrawing; - private boolean isDrawing;
- private boolean useVBO; - private boolean useVBO;
- private IntBuffer vertexBuffers; - private IntBuffer vertexBuffers;
+ public boolean isDrawing;
private int vboIndex; private int vboIndex;
- private int vboCount; - private int vboCount;
- private int bufferSize; - private int bufferSize;