use of net.minecraft.util.math.Vec3d in project ImmersiveEngineering by BluSunrize.
the class TileEntityWatermill method getRotationVec.
public Vec3d getRotationVec() {
if (rotationVec == null) {
rotationVec = new Vec3d(0, 0, 0);
Vec3d dirHoz = getHorizontalVec();
Vec3d dirVer = getVerticalVec();
rotationVec = Utils.addVectors(rotationVec, dirHoz);
rotationVec = Utils.addVectors(rotationVec, dirVer);
// worldObj.addBlockEvent(xCoord, yCoord, zCoord, getBlockType(), (int)((float)rotationVec.xCoord*10000f), (int)((float)rotationVec.zCoord*10000f));
}
return rotationVec;
}
use of net.minecraft.util.math.Vec3d in project NetherEx by LogicTechCorp.
the class ExplosionSpore method doExplosionA.
@Override
public void doExplosionA() {
if (!world.isRemote) {
Set<BlockPos> set = Sets.newHashSet();
for (int j = 0; j < 16; ++j) {
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
if (j == 0 || j == 15 || k == 0 || k == 15 || l == 0 || l == 15) {
double d0 = (double) ((float) j / 15.0F * 2.0F - 1.0F);
double d1 = (double) ((float) k / 15.0F * 2.0F - 1.0F);
double d2 = (double) ((float) l / 15.0F * 2.0F - 1.0F);
double d3 = Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
d0 = d0 / d3;
d1 = d1 / d3;
d2 = d2 / d3;
float f = explosionSize * (0.7F + world.rand.nextFloat() * 0.6F);
double d4 = explosionX;
double d6 = explosionY;
double d8 = explosionZ;
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
BlockPos blockpos = new BlockPos(d4, d6, d8);
IBlockState iblockstate = world.getBlockState(blockpos);
if (iblockstate.getMaterial() != Material.AIR) {
float f2 = exploder != null ? exploder.getExplosionResistance(this, world, blockpos, iblockstate) : iblockstate.getBlock().getExplosionResistance(world, blockpos, (Entity) null, this);
f -= (f2 + 0.3F) * 0.3F;
}
if (f > 0.0F && (exploder == null || exploder.verifyExplosion(this, world, blockpos, iblockstate, f))) {
set.add(blockpos);
}
d4 += d0 * 0.30000001192092896D;
d6 += d1 * 0.30000001192092896D;
d8 += d2 * 0.30000001192092896D;
}
}
}
}
}
affectedBlockPositions.addAll(set);
float f3 = explosionSize * 2.0F;
int k1 = MathHelper.floor(explosionX - (double) f3 - 1.0D);
int l1 = MathHelper.floor(explosionX + (double) f3 + 1.0D);
int i2 = MathHelper.floor(explosionY - (double) f3 - 1.0D);
int i1 = MathHelper.floor(explosionY + (double) f3 + 1.0D);
int j2 = MathHelper.floor(explosionZ - (double) f3 - 1.0D);
int j1 = MathHelper.floor(explosionZ + (double) f3 + 1.0D);
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(exploder, new AxisAlignedBB((double) k1, (double) i2, (double) j2, (double) l1, (double) i1, (double) j1));
ForgeEventFactory.onExplosionDetonate(world, this, list, f3);
Vec3d vec3d = new Vec3d(explosionX, explosionY, explosionZ);
for (Entity entity : list) {
if (!entity.isImmuneToExplosions()) {
double d12 = entity.getDistance(explosionX, explosionY, explosionZ) / (double) f3;
if (d12 <= 1.0D) {
double d5 = entity.posX - explosionX;
double d7 = entity.posY + (double) entity.getEyeHeight() - explosionY;
double d9 = entity.posZ - explosionZ;
double d13 = (double) MathHelper.sqrt(d5 * d5 + d7 * d7 + d9 * d9);
if (d13 != 0.0D) {
d5 = d5 / d13;
d7 = d7 / d13;
d9 = d9 / d13;
double d14 = (double) world.getBlockDensity(vec3d, entity.getEntityBoundingBox());
double d10 = (1.0D - d12) * d14;
if (!(entity instanceof EntitySporeCreeper) && !(entity instanceof EntitySpore)) {
entity.attackEntityFrom(DamageSource.causeExplosionDamage(this), (float) ((int) ((d10 * d10 + d10) / 2.0D * 7.0D * (double) f3 + 1.0D)));
}
if (entity instanceof EntityLivingBase) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(NetherExEffects.SPORE, 2400, 0));
}
double d11 = d10;
if (entity instanceof EntityLivingBase) {
d11 = EnchantmentProtection.getBlastDamageReduction((EntityLivingBase) entity, d10);
}
entity.motionX += d5 * d11;
entity.motionY += d7 * d11;
entity.motionZ += d9 * d11;
if (entity instanceof EntityPlayer) {
EntityPlayer entityplayer = (EntityPlayer) entity;
if (!entityplayer.isSpectator() && (!entityplayer.isCreative() || !entityplayer.capabilities.isFlying)) {
playerKnockbackMap.put(entityplayer, new Vec3d(d5 * d10, d7 * d10, d9 * d10));
}
}
}
}
}
}
}
}
use of net.minecraft.util.math.Vec3d in project NetherEx by LogicTechCorp.
the class WorldGenUtil method transformedVec3d.
private static Vec3d transformedVec3d(Vec3d vec, Mirror mirror, Rotation rotation) {
double xCoord = vec.xCoord;
double yCoord = vec.yCoord;
double zCoord = vec.zCoord;
boolean flag = true;
switch(mirror) {
case LEFT_RIGHT:
zCoord = 1.0D - zCoord;
break;
case FRONT_BACK:
xCoord = 1.0D - xCoord;
break;
default:
flag = false;
}
switch(rotation) {
case COUNTERCLOCKWISE_90:
return new Vec3d(zCoord, yCoord, 1.0D - xCoord);
case CLOCKWISE_90:
return new Vec3d(1.0D - zCoord, yCoord, xCoord);
case CLOCKWISE_180:
return new Vec3d(1.0D - xCoord, yCoord, 1.0D - zCoord);
default:
return flag ? new Vec3d(xCoord, yCoord, zCoord) : vec;
}
}
use of net.minecraft.util.math.Vec3d in project RFToolsDimensions by McJty.
the class SkyRenderer method renderClouds.
@SideOnly(Side.CLIENT)
public static void renderClouds(GenericWorldProvider provider, DimensionInformation information, float partialTicks) {
GlStateManager.disableCull();
Minecraft mc = Minecraft.getMinecraft();
TextureManager renderEngine = mc.getTextureManager();
float f1 = (float) (mc.getRenderViewEntity().lastTickPosY + (mc.getRenderViewEntity().posY - mc.getRenderViewEntity().lastTickPosY) * partialTicks);
Tessellator tessellator = Tessellator.getInstance();
float f2 = 12.0F;
float f3 = 4.0F;
RenderGlobal renderGlobal = mc.renderGlobal;
double d0 = (CloudRenderAccessHelper.getCloudTickCounter(renderGlobal) + partialTicks);
double entityX = mc.getRenderViewEntity().prevPosX + (mc.getRenderViewEntity().posX - mc.getRenderViewEntity().prevPosX) * partialTicks;
double entityZ = mc.getRenderViewEntity().prevPosZ + (mc.getRenderViewEntity().posZ - mc.getRenderViewEntity().prevPosZ) * partialTicks;
double d1 = (entityX + d0 * 0.029999999329447746D) / f2;
double d2 = entityZ / f2 + 0.33000001311302185D;
float y = provider.getCloudHeight() - f1 + 0.33F;
int i = MathTools.floor(d1 / 2048.0D);
int j = MathTools.floor(d2 / 2048.0D);
d1 -= (i * 2048);
d2 -= (j * 2048);
renderEngine.bindTexture(locationCloudsPng);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
Vec3d vec3 = provider.getWorld().getCloudColour(partialTicks);
float red = (float) vec3.xCoord;
float green = (float) vec3.yCoord;
float blue = (float) vec3.zCoord;
float f8;
float f9;
float f10;
if (mc.gameSettings.anaglyph) {
f8 = (red * 30.0F + green * 59.0F + blue * 11.0F) / 100.0F;
f9 = (red * 30.0F + green * 70.0F) / 100.0F;
f10 = (red * 30.0F + blue * 70.0F) / 100.0F;
red = f8;
green = f9;
blue = f10;
}
f10 = 0.00390625F;
f8 = MathTools.floor(d1) * f10;
f9 = MathTools.floor(d2) * f10;
float f11 = (float) (d1 - MathTools.floor(d1));
float f12 = (float) (d2 - MathTools.floor(d2));
byte b0 = 8;
byte b1 = 4;
float f13 = 9.765625E-4F;
GlStateManager.scale(f2, 1.0F, f2);
float cr = information.getSkyDescriptor().getCloudColorFactorR();
float cg = information.getSkyDescriptor().getCloudColorFactorG();
float cb = information.getSkyDescriptor().getCloudColorFactorB();
boolean randomColors = information.isPatreonBitSet(Patreons.PATREON_KENNEY);
VertexBuffer renderer = tessellator.getBuffer();
for (int k = 0; k < 2; ++k) {
if (k == 0) {
GlStateManager.colorMask(false, false, false, false);
} else if (mc.gameSettings.anaglyph) {
if (EntityRenderer.anaglyphField == 0) {
GlStateManager.colorMask(false, true, true, true);
} else {
GlStateManager.colorMask(true, false, false, true);
}
} else {
GlStateManager.colorMask(true, true, true, true);
}
for (int l = -b1 + 1; l <= b1; ++l) {
for (int i1 = -b1 + 1; i1 <= b1; ++i1) {
renderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
float u = (l * b0);
float v = (i1 * b0);
float x = u - f11;
float z = v - f12;
if (randomColors) {
// cr = (float) ((u % 10.0f) / 10.0f);
// cg = (float) (((u + v) % 10.0f) / 10.0f);
// cb = (float) ((v % 10.0f) / 10.0f);
cr = x % 1.0f;
cg = (x + z) % 1.0f;
cb = z % 1.0f;
}
if (y > -f3 - 1.0F) {
renderer.pos((x + 0.0F), (y + 0.0F), (z + b0)).tex(((u + 0.0F) * f10 + f8), ((v + b0) * f10 + f9)).color(red * 0.7F * cr, green * 0.7F * cg, blue * 0.7F * cb, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
renderer.pos((x + b0), (y + 0.0F), (z + b0)).tex(((u + b0) * f10 + f8), ((v + b0) * f10 + f9)).color(red * 0.7F * cr, green * 0.7F * cg, blue * 0.7F * cb, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
renderer.pos((x + b0), (y + 0.0F), (z + 0.0F)).tex(((u + b0) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * 0.7F * cr, green * 0.7F * cg, blue * 0.7F * cb, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
renderer.pos((x + 0.0F), (y + 0.0F), (z + 0.0F)).tex(((u + 0.0F) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * 0.7F * cr, green * 0.7F * cg, blue * 0.7F * cb, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
}
if (y <= f3 + 1.0F) {
renderer.pos((x + 0.0F), (y + f3 - f13), (z + b0)).tex(((u + 0.0F) * f10 + f8), ((v + b0) * f10 + f9)).color(red * cr, green * cg, blue * cb, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
renderer.pos((x + b0), (y + f3 - f13), (z + b0)).tex(((u + b0) * f10 + f8), ((v + b0) * f10 + f9)).color(red * cr, green * cg, blue * cb, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
renderer.pos((x + b0), (y + f3 - f13), (z + 0.0F)).tex(((u + b0) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * cr, green * cg, blue * cb, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
renderer.pos((x + 0.0F), (y + f3 - f13), (z + 0.0F)).tex(((u + 0.0F) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * cr, green * cg, blue * cb, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
}
int j1;
if (l > -1) {
for (j1 = 0; j1 < b0; ++j1) {
renderer.pos((x + j1 + 0.0F), (y + 0.0F), (z + b0)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + b0) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
renderer.pos((x + j1 + 0.0F), (y + f3), (z + b0)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + b0) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
renderer.pos((x + j1 + 0.0F), (y + f3), (z + 0.0F)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
renderer.pos((x + j1 + 0.0F), (y + 0.0F), (z + 0.0F)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
}
}
if (l <= 1) {
for (j1 = 0; j1 < b0; ++j1) {
renderer.pos((x + j1 + 1.0F - f13), (y + 0.0F), (z + b0)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + b0) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
renderer.pos((x + j1 + 1.0F - f13), (y + f3), (z + b0)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + b0) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
renderer.pos((x + j1 + 1.0F - f13), (y + f3), (z + 0.0F)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
renderer.pos((x + j1 + 1.0F - f13), (y + 0.0F), (z + 0.0F)).tex(((u + j1 + 0.5F) * f10 + f8), ((v + 0.0F) * f10 + f9)).color(red * 0.9F * cr, green * 0.9F * cg, blue * 0.9F * cb, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
}
}
if (i1 > -1) {
for (j1 = 0; j1 < b0; ++j1) {
renderer.pos((x + 0.0F), (y + f3), (z + j1 + 0.0F)).tex(((u + 0.0F) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
renderer.pos((x + b0), (y + f3), (z + j1 + 0.0F)).tex(((u + b0) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
renderer.pos((x + b0), (y + 0.0F), (z + j1 + 0.0F)).tex(((u + b0) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
renderer.pos((x + 0.0F), (y + 0.0F), (z + j1 + 0.0F)).tex(((u + 0.0F) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
}
}
if (i1 <= 1) {
for (j1 = 0; j1 < b0; ++j1) {
renderer.pos((x + 0.0F), (y + f3), (z + j1 + 1.0F - f13)).tex(((u + 0.0F) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
renderer.pos((x + b0), (y + f3), (z + j1 + 1.0F - f13)).tex(((u + b0) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
renderer.pos((x + b0), (y + 0.0F), (z + j1 + 1.0F - f13)).tex(((u + b0) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
renderer.pos((x + 0.0F), (y + 0.0F), (z + j1 + 1.0F - f13)).tex(((u + 0.0F) * f10 + f8), ((v + j1 + 0.5F) * f10 + f9)).color(red * 0.8F * cr, green * 0.8F * cg, blue * 0.8F * cb, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
}
}
tessellator.draw();
}
}
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.enableCull();
}
use of net.minecraft.util.math.Vec3d in project RFToolsDimensions by McJty.
the class SkyRenderer method renderSky.
/**
* Renders the sky with the partial tick time. Args: partialTickTime
*/
@SideOnly(Side.CLIENT)
private static void renderSky(float partialTickTime, DimensionInformation information) {
initialize();
EntityPlayerSP player = MinecraftTools.getPlayer(Minecraft.getMinecraft());
WorldClient world = MinecraftTools.getWorld(Minecraft.getMinecraft());
TextureManager renderEngine = Minecraft.getMinecraft().getTextureManager();
GlStateManager.disableTexture2D();
Vec3d vec3 = world.getSkyColor(player, partialTickTime);
float skyRed = (float) vec3.xCoord;
float skyGreen = (float) vec3.yCoord;
float skyBlue = (float) vec3.zCoord;
boolean anaglyph = Minecraft.getMinecraft().gameSettings.anaglyph;
if (anaglyph) {
float f4 = (skyRed * 30.0F + skyGreen * 59.0F + skyBlue * 11.0F) / 100.0F;
float f5 = (skyRed * 30.0F + skyGreen * 70.0F) / 100.0F;
float f6 = (skyRed * 30.0F + skyBlue * 70.0F) / 100.0F;
skyRed = f4;
skyGreen = f5;
skyBlue = f6;
}
GlStateManager.color(skyRed, skyGreen, skyBlue);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer renderer = tessellator.getBuffer();
GlStateManager.depthMask(false);
GlStateManager.enableFog();
GlStateManager.color(skyRed, skyGreen, skyBlue);
// @todo support VBO?
// if (OpenGlHelper.useVbo()) {
// skyVBO.bindBuffer();
// GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
// GL11.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
// this.skyVBO.drawArrays(7);
// this.skyVBO.unbindBuffer();
// GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
//
// } else {
GlStateManager.callList(glSkyList);
// }
GlStateManager.disableFog();
GlStateManager.disableAlpha();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
RenderHelper.disableStandardItemLighting();
float[] sunsetColors = world.provider.calcSunriseSunsetColors(world.getCelestialAngle(partialTickTime), partialTickTime);
if (sunsetColors != null) {
GlStateManager.disableTexture2D();
GlStateManager.shadeModel(7425);
GlStateManager.pushMatrix();
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(MathHelper.sin(world.getCelestialAngleRadians(partialTickTime)) < 0.0F ? 180.0F : 0.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
float f6 = sunsetColors[0];
float f7 = sunsetColors[1];
float f8 = sunsetColors[2];
if (anaglyph) {
float f9 = (f6 * 30.0F + f7 * 59.0F + f8 * 11.0F) / 100.0F;
float f10 = (f6 * 30.0F + f7 * 70.0F) / 100.0F;
float f11 = (f6 * 30.0F + f8 * 70.0F) / 100.0F;
f6 = f9;
f7 = f10;
f8 = f11;
}
renderer.begin(GL11.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION_COLOR);
renderer.pos(0.0D, 100.0D, 0.0D).color(f6, f7, f8, sunsetColors[3]).endVertex();
for (int j = 0; j <= 16; ++j) {
float f11 = j * (float) Math.PI * 2.0F / 16.0f;
float f12 = MathHelper.sin(f11);
float f13 = MathHelper.cos(f11);
renderer.pos((f12 * 120.0F), (f13 * 120.0F), (-f13 * 40.0F * sunsetColors[3])).color(sunsetColors[0], sunsetColors[1], sunsetColors[2], 0.0F).endVertex();
}
tessellator.draw();
GlStateManager.popMatrix();
GlStateManager.shadeModel(GL11.GL_FLAT);
}
renderCelestialBodies(partialTickTime, information, world, renderEngine, tessellator);
GlStateManager.color(0.0F, 0.0F, 0.0F);
double d0 = player.getPosition().getY() - world.getHorizon();
if (d0 < 0.0D) {
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 12.0F, 0.0F);
// @todo
// if (this.vboEnabled)
// {
// this.sky2VBO.bindBuffer();
// GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
// GL11.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
// this.sky2VBO.drawArrays(7);
// this.sky2VBO.unbindBuffer();
// GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
// }
// else
// {
GlStateManager.callList(glSkyList2);
// GlStateManager.callList(this.glSkyList2);
// }
GlStateManager.popMatrix();
float f8 = 1.0F;
float f9 = -((float) (d0 + 65.0D));
float f10 = -f8;
renderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
renderer.pos((-f8), f9, f8).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f9, f8).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f10, f8).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f10, f8).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f10, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f10, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f9, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f9, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f10, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f10, f8).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f9, f8).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f9, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f9, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f9, f8).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f10, f8).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f10, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f10, (-f8)).color(0, 0, 0, 255).endVertex();
renderer.pos((-f8), f10, f8).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f10, f8).color(0, 0, 0, 255).endVertex();
renderer.pos(f8, f10, (-f8)).color(0, 0, 0, 255).endVertex();
tessellator.draw();
}
if (world.provider.isSkyColored()) {
GlStateManager.color(skyRed * 0.2F + 0.04F, skyGreen * 0.2F + 0.04F, skyBlue * 0.6F + 0.1F);
} else {
GlStateManager.color(skyRed, skyGreen, skyBlue);
}
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, -((float) (d0 - 16.0D)), 0.0F);
GlStateManager.callList(glSkyList2);
GlStateManager.popMatrix();
GlStateManager.enableTexture2D();
GlStateManager.depthMask(true);
}
Aggregations