From 3892a1f24f9cc631920050b9f0339b3e40ce8624 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 5 Feb 2022 19:11:43 +0800 Subject: add blood rush box --- utils/renderUtils.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'utils') diff --git a/utils/renderUtils.js b/utils/renderUtils.js index 1d3e646..a91043a 100644 --- a/utils/renderUtils.js +++ b/utils/renderUtils.js @@ -165,7 +165,7 @@ module.exports = { GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); }, - drawBoxAtBlock:function (x, y, z, colorR, colorG, colorB){ + drawBoxAtBlock:function (x, y, z, colorR, colorG, colorB, w=1, h=1){ GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); @@ -178,25 +178,25 @@ module.exports = { Tessellator.begin(3).colorize(colorR, colorG, colorB); - Tessellator.pos(x+1,y+1,z+1); - Tessellator.pos(x+1,y+1,z); - Tessellator.pos(x,y+1,z); - Tessellator.pos(x,y+1,z+1); - Tessellator.pos(x+1,y+1,z+1); - Tessellator.pos(x+1,y,z+1); - Tessellator.pos(x+1,y,z); + Tessellator.pos(x+w,y+h,z+w); + Tessellator.pos(x+w,y+h,z); + Tessellator.pos(x,y+h,z); + Tessellator.pos(x,y+h,z+w); + Tessellator.pos(x+w,y+h,z+w); + Tessellator.pos(x+w,y,z+w); + Tessellator.pos(x+w,y,z); Tessellator.pos(x,y,z); - Tessellator.pos(x,y,z+1); + Tessellator.pos(x,y,z+w); Tessellator.pos(x,y,z); - Tessellator.pos(x,y+1,z); + Tessellator.pos(x,y+h,z); Tessellator.pos(x,y,z); - Tessellator.pos(x+1,y,z); - Tessellator.pos(x+1,y+1,z); - Tessellator.pos(x+1,y,z); - Tessellator.pos(x+1,y,z+1); - Tessellator.pos(x,y,z+1); - Tessellator.pos(x,y+1,z+1); - Tessellator.pos(x+1,y+1,z+1); + Tessellator.pos(x+w,y,z); + Tessellator.pos(x+w,y+h,z); + Tessellator.pos(x+w,y,z); + Tessellator.pos(x+w,y,z+w); + Tessellator.pos(x,y,z+w); + Tessellator.pos(x,y+h,z+w); + Tessellator.pos(x+w,y+h,z+w); Tessellator.draw(); -- cgit