Fix BufferBuilder locals that were incorrectly named

This commit is contained in:
Brady 2018-08-06 02:48:42 -05:00
parent e8149f166f
commit e41a04a0d3
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -175,16 +175,16 @@ public class PathingBehavior extends Behavior {
public static void drawLine(EntityPlayer player, double bp1x, double bp1y, double bp1z, double bp2x, double bp2y, double bp2z, float partialTicks) {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder worldrenderer = tessellator.getBuffer();
BufferBuilder buffer = tessellator.getBuffer();
double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double) partialTicks;
double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double) partialTicks;
double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double) partialTicks;
worldrenderer.begin(3, DefaultVertexFormats.POSITION);
worldrenderer.pos(bp1x + 0.5D - d0, bp1y + 0.5D - d1, bp1z + 0.5D - d2).endVertex();
worldrenderer.pos(bp2x + 0.5D - d0, bp2y + 0.5D - d1, bp2z + 0.5D - d2).endVertex();
worldrenderer.pos(bp2x + 0.5D - d0, bp2y + 0.53D - d1, bp2z + 0.5D - d2).endVertex();
worldrenderer.pos(bp1x + 0.5D - d0, bp1y + 0.53D - d1, bp1z + 0.5D - d2).endVertex();
worldrenderer.pos(bp1x + 0.5D - d0, bp1y + 0.5D - d1, bp1z + 0.5D - d2).endVertex();
buffer.begin(3, DefaultVertexFormats.POSITION);
buffer.pos(bp1x + 0.5D - d0, bp1y + 0.5D - d1, bp1z + 0.5D - d2).endVertex();
buffer.pos(bp2x + 0.5D - d0, bp2y + 0.5D - d1, bp2z + 0.5D - d2).endVertex();
buffer.pos(bp2x + 0.5D - d0, bp2y + 0.53D - d1, bp2z + 0.5D - d2).endVertex();
buffer.pos(bp1x + 0.5D - d0, bp1y + 0.53D - d1, bp1z + 0.5D - d2).endVertex();
buffer.pos(bp1x + 0.5D - d0, bp1y + 0.5D - d1, bp1z + 0.5D - d2).endVertex();
tessellator.draw();
}
@ -208,30 +208,30 @@ public class PathingBehavior extends Behavior {
double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double) partialTicks;
AxisAlignedBB toDraw = block.getSelectedBoundingBox(state, Minecraft.getMinecraft().world, blockpos).expand(0.0020000000949949026D, 0.0020000000949949026D, 0.0020000000949949026D).offset(-d0, -d1, -d2);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder worldrenderer = tessellator.getBuffer();
worldrenderer.begin(3, DefaultVertexFormats.POSITION);
worldrenderer.pos(toDraw.minX, toDraw.minY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.minY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.minY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.minY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.minY, toDraw.minZ).endVertex();
BufferBuilder buffer = tessellator.getBuffer();
buffer.begin(3, DefaultVertexFormats.POSITION);
buffer.pos(toDraw.minX, toDraw.minY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.minY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.minY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.minX, toDraw.minY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.minX, toDraw.minY, toDraw.minZ).endVertex();
tessellator.draw();
worldrenderer.begin(3, DefaultVertexFormats.POSITION);
worldrenderer.pos(toDraw.minX, toDraw.maxY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.maxY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.maxY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.maxY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.maxY, toDraw.minZ).endVertex();
buffer.begin(3, DefaultVertexFormats.POSITION);
buffer.pos(toDraw.minX, toDraw.maxY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.maxY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.maxY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.minX, toDraw.maxY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.minX, toDraw.maxY, toDraw.minZ).endVertex();
tessellator.draw();
worldrenderer.begin(1, DefaultVertexFormats.POSITION);
worldrenderer.pos(toDraw.minX, toDraw.minY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.maxY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.minY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.maxY, toDraw.minZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.minY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.maxX, toDraw.maxY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.minY, toDraw.maxZ).endVertex();
worldrenderer.pos(toDraw.minX, toDraw.maxY, toDraw.maxZ).endVertex();
buffer.begin(1, DefaultVertexFormats.POSITION);
buffer.pos(toDraw.minX, toDraw.minY, toDraw.minZ).endVertex();
buffer.pos(toDraw.minX, toDraw.maxY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.minY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.maxY, toDraw.minZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.minY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.maxX, toDraw.maxY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.minX, toDraw.minY, toDraw.maxZ).endVertex();
buffer.pos(toDraw.minX, toDraw.maxY, toDraw.maxZ).endVertex();
tessellator.draw();
GlStateManager.depthMask(true);
GlStateManager.enableTexture2D();