From 311ab89f93558233a40079f7cb16605b141b5346 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 12 Dec 2021 19:38:06 +0100 Subject: Move sources and resources --- .../gtPlusPlus/core/client/CustomTextureSet.java | 28 - .../gtPlusPlus/core/client/model/ModelBatKing.java | 120 -- .../core/client/model/ModelDecayChest.java | 46 - .../gtPlusPlus/core/client/model/ModelEggBox.java | 65 - .../core/client/model/ModelGiantChicken.java | 112 -- .../core/client/model/ModelSickBlaze.java | 93 - .../core/client/model/ModelStaballoyConstruct.java | 120 -- .../core/client/model/tabula/ModelTabulaBase.java | 38 - .../client/renderer/CustomItemBlockRenderer.java | 85 - .../client/renderer/CustomOreBlockRenderer.java | 2083 -------------------- .../core/client/renderer/RenderBatKing.java | 152 -- .../core/client/renderer/RenderDecayChest.java | 82 - .../core/client/renderer/RenderGiantChicken.java | 15 - .../renderer/RenderMiningExplosivesPrimed.java | 107 - .../core/client/renderer/RenderPlasmaBolt.java | 168 -- .../core/client/renderer/RenderPotionthrow.java | 104 - .../core/client/renderer/RenderSickBlaze.java | 99 - .../client/renderer/RenderStaballoyConstruct.java | 149 -- .../core/client/renderer/RenderToxinball.java | 93 - .../renderer/particle/EntityDropParticleFX.java | 96 - .../client/renderer/tabula/RenderTabulaBase.java | 46 - 21 files changed, 3901 deletions(-) delete mode 100644 src/Java/gtPlusPlus/core/client/CustomTextureSet.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelBatKing.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelEggBox.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderDecayChest.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderPlasmaBolt.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderToxinball.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/particle/EntityDropParticleFX.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java (limited to 'src/Java/gtPlusPlus/core/client') diff --git a/src/Java/gtPlusPlus/core/client/CustomTextureSet.java b/src/Java/gtPlusPlus/core/client/CustomTextureSet.java deleted file mode 100644 index 400503b2fa..0000000000 --- a/src/Java/gtPlusPlus/core/client/CustomTextureSet.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.client; - -import gregtech.api.enums.TextureSet; - -public class CustomTextureSet extends TextureSet { - - public static enum TextureSets { - - REFINED(), - GEM_A(), - ENRICHED(), - NUCLEAR; - - private final CustomTextureSet A; - - private TextureSets (){ - A = new CustomTextureSet(this.name().toUpperCase()); - } - public CustomTextureSet get() { - return A; - } - } - - public CustomTextureSet(String aSetName) { - super(aSetName); - } - -} diff --git a/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java b/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java deleted file mode 100644 index ac64dee26a..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.core.client.model; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.entity.monster.EntityBatKing; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.util.MathHelper; - -@SideOnly(Side.CLIENT) -public class ModelBatKing extends ModelBase -{ - private ModelRenderer batHead; - /** The body box of the bat model. */ - private ModelRenderer batBody; - /** The inner right wing box of the bat model. */ - private ModelRenderer batRightWing; - /** The inner left wing box of the bat model. */ - private ModelRenderer batLeftWing; - /** The outer right wing box of the bat model. */ - private ModelRenderer batOuterRightWing; - /** The outer left wing box of the bat model. */ - private ModelRenderer batOuterLeftWing; - - public ModelBatKing() - { - this.textureWidth = 64; - this.textureHeight = 64; - - this.batHead = new ModelRenderer(this, 0, 0); - this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6); - ModelRenderer modelrenderer = new ModelRenderer(this, 24, 0); - modelrenderer.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1); - this.batHead.addChild(modelrenderer); - ModelRenderer modelrenderer1 = new ModelRenderer(this, 24, 0); - modelrenderer1.mirror = true; - modelrenderer1.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1); - this.batHead.addChild(modelrenderer1); - this.batBody = new ModelRenderer(this, 0, 16); - this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6); - this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1); - this.batRightWing = new ModelRenderer(this, 42, 0); - this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1); - this.batOuterRightWing = new ModelRenderer(this, 24, 16); - this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F); - this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1); - this.batLeftWing = new ModelRenderer(this, 42, 0); - this.batLeftWing.mirror = true; - this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1); - this.batOuterLeftWing = new ModelRenderer(this, 24, 16); - this.batOuterLeftWing.mirror = true; - this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F); - this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1); - this.batBody.addChild(this.batRightWing); - this.batBody.addChild(this.batLeftWing); - this.batRightWing.addChild(this.batOuterRightWing); - this.batLeftWing.addChild(this.batOuterLeftWing); - } - - /** - * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and - * it seems a good match for a bats size - */ - public int getBatSize() - { - return 72; - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - EntityBatKing entitybat = (EntityBatKing)p_78088_1_; - float f6; - - if (entitybat.getIsBatHanging()) - { - f6 = (180F / (float)Math.PI); - this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI); - this.batHead.rotateAngleY = (float)Math.PI - p_78088_5_ / (180F / (float)Math.PI); - this.batHead.rotateAngleZ = (float)Math.PI; - this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F); - this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F); - this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F); - this.batBody.rotateAngleX = (float)Math.PI; - this.batRightWing.rotateAngleX = -0.15707964F; - this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F); - this.batOuterRightWing.rotateAngleY = -1.7278761F; - this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX; - this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; - this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY; - } - else - { - f6 = (180F / (float)Math.PI); - this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI); - this.batHead.rotateAngleY = p_78088_5_ / (180F / (float)Math.PI); - this.batHead.rotateAngleZ = 0.0F; - this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(p_78088_4_ * 0.1F) * 0.15F; - this.batBody.rotateAngleY = 0.0F; - this.batRightWing.rotateAngleY = MathHelper.cos(p_78088_4_ * 1.3F) * (float)Math.PI * 0.25F; - this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; - this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F; - this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F; - } - - - GL11.glScalef(4, 4, 4); - this.batHead.render(p_78088_7_); - this.batBody.render(p_78088_7_); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java b/src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java deleted file mode 100644 index c116dcf115..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java +++ /dev/null @@ -1,46 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -@SideOnly(Side.CLIENT) -public class ModelDecayChest extends ModelBase -{ - /** The chest lid in the chest's model. */ - public ModelRenderer chestLid = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); - /** The model of the bottom of the chest. */ - public ModelRenderer chestBelow; - /** The chest's knob in the chest model. */ - public ModelRenderer chestKnob; - - public ModelDecayChest() - { - this.chestLid.addBox(0.0F, -5.0F, -14.0F, 14, 5, 14, 0.0F); - this.chestLid.rotationPointX = 1.0F; - this.chestLid.rotationPointY = 7.0F; - this.chestLid.rotationPointZ = 15.0F; - this.chestKnob = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); - this.chestKnob.addBox(-1.0F, -2.0F, -15.0F, 2, 4, 1, 0.0F); - this.chestKnob.rotationPointX = 8.0F; - this.chestKnob.rotationPointY = 7.0F; - this.chestKnob.rotationPointZ = 15.0F; - this.chestBelow = (new ModelRenderer(this, 0, 19)).setTextureSize(64, 64); - this.chestBelow.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); - this.chestBelow.rotationPointX = 1.0F; - this.chestBelow.rotationPointY = 6.0F; - this.chestBelow.rotationPointZ = 1.0F; - } - - /** - * This method renders out all parts of the chest model. - */ - public void renderAll() - { - this.chestKnob.rotateAngleX = this.chestLid.rotateAngleX; - this.chestLid.render(0.0625F); - this.chestKnob.render(0.0625F); - this.chestBelow.render(0.0625F); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelEggBox.java b/src/Java/gtPlusPlus/core/client/model/ModelEggBox.java deleted file mode 100644 index 0aef4eb7b0..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelEggBox.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.core.client.model; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; -import gtPlusPlus.core.client.renderer.tabula.RenderTabulaBase; -import gtPlusPlus.core.tileentities.general.TileEntityEggBox; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * ModelEggBox - Alkalus - * Created using Tabula 4.1.1 - */ -public class ModelEggBox extends ModelTabulaBase { - - private final AutoMap> mParts = new AutoMap>(); - - private static RenderTabulaBase mRendererInstance; - - public ModelRenderer bottom; - //EggBox_full.png - - public ModelEggBox() { - super(64, 64); - this.textureWidth = 64; - this.textureHeight = 64; - - this.bottom = new ModelRenderer(this, 0, 19); - this.bottom.setRotationPoint(1.0F, 6.0F, 1.0F); - this.bottom.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); - mParts.add(new Pair(bottom, 0f)); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - //Logger.INFO("Rendering EggBox"); - this.bottom.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } - - @Override - protected AutoMap> getModelParts() { - AutoMap> aParts = new AutoMap>(); - aParts.add(new Pair(bottom, 0.0625F)); - return aParts; - //return mParts; - } - - public static RenderTabulaBase getRenderer() { - if (mRendererInstance == null) { - mRendererInstance = new RenderTabulaBase(new ModelEggBox(), "textures/blocks/TileEntities/EggBox_full.png", TileEntityEggBox.class); - } - return mRendererInstance; - } -} diff --git a/src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java b/src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java deleted file mode 100644 index f7fb92f550..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java +++ /dev/null @@ -1,112 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.model.ModelChicken; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class ModelGiantChicken extends ModelChicken{ - - public ModelGiantChicken() - { - byte b0 = 16; - this.head = new ModelRenderer(this, 0, 0); - this.head.addBox(-2.0F, -6.0F, -2.0F, 4, 6, 3, 0.0F); - this.head.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); - this.bill = new ModelRenderer(this, 14, 0); - this.bill.addBox(-2.0F, -4.0F, -4.0F, 4, 2, 2, 0.0F); - this.bill.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); - this.chin = new ModelRenderer(this, 14, 4); - this.chin.addBox(-1.0F, -2.0F, -3.0F, 2, 2, 2, 0.0F); - this.chin.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); - this.body = new ModelRenderer(this, 0, 9); - this.body.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F); - this.body.setRotationPoint(0.0F, (float)b0, 0.0F); - this.rightLeg = new ModelRenderer(this, 26, 0); - this.rightLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); - this.rightLeg.setRotationPoint(-2.0F, (float)(3 + b0), 1.0F); - this.leftLeg = new ModelRenderer(this, 26, 0); - this.leftLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); - this.leftLeg.setRotationPoint(1.0F, (float)(3 + b0), 1.0F); - this.rightWing = new ModelRenderer(this, 24, 13); - this.rightWing.addBox(0.0F, 0.0F, -3.0F, 1, 4, 6); - this.rightWing.setRotationPoint(-4.0F, (float)(-3 + b0), 0.0F); - this.leftWing = new ModelRenderer(this, 24, 13); - this.leftWing.addBox(-1.0F, 0.0F, -3.0F, 1, 4, 6); - this.leftWing.setRotationPoint(4.0F, (float)(-3 + b0), 0.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - - if (this.isChild) - { - float f6 = 1.0F; - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0F, 0F); - this.head.render(p_78088_7_); - this.bill.render(p_78088_7_); - this.chin.render(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, 0F, 0.0F); - this.body.render(p_78088_7_); - this.rightLeg.render(p_78088_7_); - this.leftLeg.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - GL11.glPopMatrix(); - //super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); - } - else - { - float f6 = 2.0F; - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, -0.85F, 0F); - this.head.render(p_78088_7_); - this.bill.render(p_78088_7_); - this.chin.render(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, -0.75F, 0.0F); - this.body.render(p_78088_7_); - this.rightLeg.render(p_78088_7_); - this.leftLeg.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - GL11.glPopMatrix(); - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) - { - this.head.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - this.head.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.bill.rotateAngleX = this.head.rotateAngleX; - this.bill.rotateAngleY = this.head.rotateAngleY; - this.chin.rotateAngleX = this.head.rotateAngleX; - this.chin.rotateAngleY = this.head.rotateAngleY; - this.body.rotateAngleX = ((float)Math.PI / 2F); - this.rightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 1.4F * p_78087_2_; - this.leftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float)Math.PI) * 1.4F * p_78087_2_; - this.rightWing.rotateAngleZ = p_78087_3_; - this.leftWing.rotateAngleZ = -p_78087_3_; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java b/src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java deleted file mode 100644 index 455df761cb..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java +++ /dev/null @@ -1,93 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.model.ModelBlaze; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -@SideOnly(Side.CLIENT) -public class ModelSickBlaze extends ModelBlaze -{ - /** The sticks that fly around the Blaze. */ - private ModelRenderer[] blazeSticks = new ModelRenderer[24]; - private ModelRenderer blazeHead; - - public ModelSickBlaze() - { - for (int i = 0; i < this.blazeSticks.length; ++i) - { - this.blazeSticks[i] = new ModelRenderer(this, 0, 16); - this.blazeSticks[i].addBox(0.0F, 0.0F, 0.0F, 2, 8, 2); - } - - this.blazeHead = new ModelRenderer(this, 0, 0); - this.blazeHead.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8); - } - - @Override - public int func_78104_a() - { - return 8; - } - - /** - * Sets the models various rotation angles then renders the model. - */ - @Override - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - this.blazeHead.render(p_78088_7_); - - for (int i = 0; i < this.blazeSticks.length; ++i) - { - this.blazeSticks[i].render(p_78088_7_); - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - @Override - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) - { - float f6 = p_78087_3_ * (float)Math.PI * -0.1F; - int i; - - for (i = 0; i < 4; ++i) - { - this.blazeSticks[i].rotationPointY = -2.0F + MathHelper.cos((i * 2 + p_78087_3_) * 0.25F); - this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 9.0F; - this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 9.0F; - ++f6; - } - - f6 = ((float)Math.PI / 4F) + p_78087_3_ * (float)Math.PI * 0.03F; - - for (i = 4; i < 8; ++i) - { - this.blazeSticks[i].rotationPointY = 2.0F + MathHelper.cos((i * 2 + p_78087_3_) * 0.25F); - this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 7.0F; - this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 7.0F; - ++f6; - } - - f6 = 0.47123894F + p_78087_3_ * (float)Math.PI * -0.05F; - - for (i = 8; i < 12; ++i) - { - this.blazeSticks[i].rotationPointY = 11.0F + MathHelper.cos((i * 1.5F + p_78087_3_) * 0.5F); - this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 5.0F; - this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 5.0F; - ++f6; - } - - this.blazeHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.blazeHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java b/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java deleted file mode 100644 index aa23635b4d..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.model.ModelIronGolem; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityIronGolem; - -@SideOnly(Side.CLIENT) -public class ModelStaballoyConstruct extends ModelIronGolem -{ - - public ModelStaballoyConstruct() - { - this(0.0F); - } - - public ModelStaballoyConstruct(float p_i1161_1_) - { - this(p_i1161_1_, -7.0F); - } - - public ModelStaballoyConstruct(float p_i1162_1_, float p_i1162_2_) - { - short short1 = 128; - short short2 = 128; - this.ironGolemHead = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemHead.setRotationPoint(0.0F, 0.0F + p_i1162_2_, -2.0F); - this.ironGolemHead.setTextureOffset(0, 0).addBox(-4.0F, -12.0F, -5.5F, 8, 10, 8, p_i1162_1_); - this.ironGolemHead.setTextureOffset(24, 0).addBox(-1.0F, -5.0F, -7.5F, 2, 4, 2, p_i1162_1_); - this.ironGolemBody = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemBody.setRotationPoint(0.0F, 0.0F + p_i1162_2_, 0.0F); - this.ironGolemBody.setTextureOffset(0, 40).addBox(-9.0F, -2.0F, -6.0F, 18, 12, 11, p_i1162_1_); - this.ironGolemBody.setTextureOffset(0, 70).addBox(-4.5F, 10.0F, -3.0F, 9, 5, 6, p_i1162_1_ + 0.5F); - this.ironGolemRightArm = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemRightArm.setRotationPoint(0.0F, -7.0F, 0.0F); - this.ironGolemRightArm.setTextureOffset(60, 21).addBox(-13.0F, -2.5F, -3.0F, 4, 30, 6, p_i1162_1_); - this.ironGolemLeftArm = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemLeftArm.setRotationPoint(0.0F, -7.0F, 0.0F); - this.ironGolemLeftArm.setTextureOffset(60, 58).addBox(9.0F, -2.5F, -3.0F, 4, 30, 6, p_i1162_1_); - this.ironGolemLeftLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2); - this.ironGolemLeftLeg.setRotationPoint(-4.0F, 18.0F + p_i1162_2_, 0.0F); - this.ironGolemLeftLeg.setTextureOffset(37, 0).addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, p_i1162_1_); - this.ironGolemRightLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2); - this.ironGolemRightLeg.mirror = true; - this.ironGolemRightLeg.setTextureOffset(60, 0).setRotationPoint(5.0F, 18.0F + p_i1162_2_, 0.0F); - this.ironGolemRightLeg.addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, p_i1162_1_); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - @Override - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - this.ironGolemHead.render(p_78088_7_); - this.ironGolemBody.render(p_78088_7_); - this.ironGolemLeftLeg.render(p_78088_7_); - this.ironGolemRightLeg.render(p_78088_7_); - this.ironGolemRightArm.render(p_78088_7_); - this.ironGolemLeftArm.render(p_78088_7_); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - @Override - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) - { - this.ironGolemHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.ironGolemHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - this.ironGolemLeftLeg.rotateAngleX = -1.5F * this.func_78172_a(p_78087_1_, 13.0F) * p_78087_2_; - this.ironGolemRightLeg.rotateAngleX = 1.5F * this.func_78172_a(p_78087_1_, 13.0F) * p_78087_2_; - this.ironGolemLeftLeg.rotateAngleY = 0.0F; - this.ironGolemRightLeg.rotateAngleY = 0.0F; - } - - /** - * Used for easily adding entity-dependent animations. The second and third float params here are the same second - * and third as in the setRotationAngles method. - */ - @Override - public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) - { - EntityIronGolem entityirongolem = (EntityIronGolem)p_78086_1_; - int i = entityirongolem.getAttackTimer(); - - if (i > 0) - { - this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F); - this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F); - } - else - { - int j = entityirongolem.getHoldRoseTick(); - - if (j > 0) - { - this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a(j, 70.0F); - this.ironGolemLeftArm.rotateAngleX = 0.0F; - } - else - { - this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_; - this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_; - } - } - } - - private float func_78172_a(float p_78172_1_, float p_78172_2_) - { - return (Math.abs(p_78172_1_ % p_78172_2_ - p_78172_2_ * 0.5F) - p_78172_2_ * 0.25F) / (p_78172_2_ * 0.25F); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java b/src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java deleted file mode 100644 index 3a0cbb636b..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java +++ /dev/null @@ -1,38 +0,0 @@ -package gtPlusPlus.core.client.model.tabula; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -/** - * ModelEggBox - Alkalus - * Created using Tabula 4.1.1 - */ -public abstract class ModelTabulaBase extends ModelBase { - - - public ModelTabulaBase(int aTexWidth, int aTexHeight) { - this.textureWidth = aTexWidth; - this.textureHeight = aTexHeight; - } - - protected abstract AutoMap> getModelParts(); - - public void renderAll() { - for (Pair part : getModelParts()) { - //Logger.INFO("Rendering EggBox"); - part.getKey().render(part.getValue()); - } - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java b/src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java deleted file mode 100644 index f40357495a..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java +++ /dev/null @@ -1,85 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.client.IItemRenderer; - -import org.lwjgl.opengl.GL11; - - -/** - * Easy way of rendering an item which should look like a block. - * Borrowed. - * - * @author King Lemming - * - */ -public class CustomItemBlockRenderer implements IItemRenderer { - - public static CustomItemBlockRenderer instance = new CustomItemBlockRenderer(); - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) { - return true; - } - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { - return true; - } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) { - - double offset = -0.5; - if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) { - offset = 0; - } else if (type == ItemRenderType.ENTITY) { - GL11.glScalef(0.5F, 0.5F, 0.5F); - } - renderItemAsBlock((RenderBlocks) data[0], item, offset, offset, offset); - } - - public static void renderItemAsBlock(RenderBlocks renderer, ItemStack item, double translateX, double translateY, double translateZ) { - - renderTextureAsBlock(renderer, item.getIconIndex(), translateX, translateY, translateZ); - } - - public static void renderTextureAsBlock(RenderBlocks renderer, IIcon texture, double translateX, double translateY, double translateZ) { - - Tessellator tessellator = Tessellator.instance; - Block block = Blocks.stone; - - if (texture == null) { - return; - } - renderer.setRenderBoundsFromBlock(block); - GL11.glTranslated(translateX, translateY, translateZ); - tessellator.startDrawingQuads(); - - tessellator.setNormal(0.0F, -1.0F, 0.0F); - renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(0.0F, 0.0F, -1.0F); - renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(-1.0F, 0.0F, 0.0F); - renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.draw(); - } - -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java b/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java deleted file mode 100644 index a0b34d3b0b..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java +++ /dev/null @@ -1,2083 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import gregtech.api.interfaces.ITexture; -import gtPlusPlus.api.interfaces.ITexturedBlock; -import gtPlusPlus.api.objects.Logger; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { - - public static CustomOreBlockRenderer INSTANCE; - public final int mRenderID; - - public CustomOreBlockRenderer() { - INSTANCE = this; - this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); - RenderingRegistry.registerBlockHandler(this); - Logger.INFO("Registered Custom Ore Block Renderer."); - } - - public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { - Block tTileEntity = aBlock; - if ((tTileEntity instanceof ITexturedBlock)) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedBlock) tTileEntity).getTexture((byte) 0), ((ITexturedBlock) tTileEntity).getTexture((byte) 1), ((ITexturedBlock) tTileEntity).getTexture((byte) 2), ((ITexturedBlock) tTileEntity).getTexture((byte) 3), ((ITexturedBlock) tTileEntity).getTexture((byte) 4), ((ITexturedBlock) tTileEntity).getTexture((byte) 5)}); - } - return false; - } - - public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - int l = aBlock.colorMultiplier(aWorld, aX, aY, aZ); - float RED = (float)(l >> 16 & 255) / 255.0F; - float GREEN = (float)(l >> 8 & 255) / 255.0F; - float BLUE = (float)(l & 255) / 255.0F; - - if (Minecraft.isAmbientOcclusionEnabled() && aBlock.getLightValue() == 0){ - if (RenderBlocks.getInstance().partialRenderBounds){ - return INSTANCE.renderStandardBlockWithAmbientOcclusionPartial(aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); - } - else { - return INSTANCE.renderStandardBlockWithAmbientOcclusion(aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); - } - } - else { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); - } - return true; - } - - public static void renderFaceYNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[0], true); - } - public static void renderFaceYPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[1], true); - } - public static void renderFaceZNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[2], true); - } - public static void renderFaceZPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[3], true); - } - public static void renderFaceXNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[4], true); - } - public static void renderFaceXPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[5], true); - } - - public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderYNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderYPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); - } - aRenderer.flipTexture = (!aFullBlock); - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderZNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderZPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderXNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); - } - aRenderer.flipTexture = (!aFullBlock); - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderXPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 0), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 1), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 2), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 3), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 4), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 5), true); - Tessellator.instance.draw(); - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - - public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { - blockAccess = aWorld; - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); - } - - public boolean shouldRender3DInInventory(int aModel) { - return true; - } - - public int getRenderId() { - return this.mRenderID; - } - - public void setRenderBounds(double p_147782_1_, double p_147782_3_, double p_147782_5_, double p_147782_7_, double p_147782_9_, double p_147782_11_) - { - if (!this.lockBlockBounds) - { - this.renderMinX = p_147782_1_; - this.renderMaxX = p_147782_7_; - this.renderMinY = p_147782_3_; - this.renderMaxY = p_147782_9_; - this.renderMinZ = p_147782_5_; - this.renderMaxZ = p_147782_11_; - this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D || this.renderMaxZ < 1.0D); - } - } - - /** - * Like setRenderBounds, but automatically pulling the bounds from the given Block. - */ - public void setRenderBoundsFromBlock(Block block) - { - if (!this.lockBlockBounds) - { - this.renderMinX = block.getBlockBoundsMinX(); - this.renderMaxX = block.getBlockBoundsMaxX(); - this.renderMinY = block.getBlockBoundsMinY(); - this.renderMaxY = block.getBlockBoundsMaxY(); - this.renderMinZ = block.getBlockBoundsMinZ(); - this.renderMaxZ = block.getBlockBoundsMaxZ(); - this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D || this.renderMaxZ < 1.0D); - } - } - - /** - * Vanilla Variables - */ - - /** The minimum X value for rendering (default 0.0). */ - public double renderMinX; - /** The maximum X value for rendering (default 1.0). */ - public double renderMaxX; - /** The minimum Y value for rendering (default 0.0). */ - public double renderMinY; - /** The maximum Y value for rendering (default 1.0). */ - public double renderMaxY; - /** The minimum Z value for rendering (default 0.0). */ - public double renderMinZ; - /** The maximum Z value for rendering (default 1.0). */ - public double renderMaxZ; - public boolean lockBlockBounds; - public boolean partialRenderBounds; - public final Minecraft minecraftRB = RenderBlocks.getInstance().minecraftRB; - public int uvRotateEast; - public int uvRotateWest; - public int uvRotateSouth; - public int uvRotateNorth; - public int uvRotateTop; - public int uvRotateBottom; - /** Whether ambient occlusion is enabled or not */ - public boolean enableAO; - /** Used as a scratch variable for ambient occlusion on the north/bottom/east corner. */ - public float aoLightValueScratchXYZNNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the north face. */ - public float aoLightValueScratchXYNN; - /** Used as a scratch variable for ambient occlusion on the north/bottom/west corner. */ - public float aoLightValueScratchXYZNNP; - /** Used as a scratch variable for ambient occlusion between the bottom face and the east face. */ - public float aoLightValueScratchYZNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the west face. */ - public float aoLightValueScratchYZNP; - /** Used as a scratch variable for ambient occlusion on the south/bottom/east corner. */ - public float aoLightValueScratchXYZPNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the south face. */ - public float aoLightValueScratchXYPN; - /** Used as a scratch variable for ambient occlusion on the south/bottom/west corner. */ - public float aoLightValueScratchXYZPNP; - /** Used as a scratch variable for ambient occlusion on the north/top/east corner. */ - public float aoLightValueScratchXYZNPN; - /** Used as a scratch variable for ambient occlusion between the top face and the north face. */ - public float aoLightValueScratchXYNP; - /** Used as a scratch variable for ambient occlusion on the north/top/west corner. */ - public float aoLightValueScratchXYZNPP; - /** Used as a scratch variable for ambient occlusion between the top face and the east face. */ - public float aoLightValueScratchYZPN; - /** Used as a scratch variable for ambient occlusion on the south/top/east corner. */ - public float aoLightValueScratchXYZPPN; - /** Used as a scratch variable for ambient occlusion between the top face and the south face. */ - public float aoLightValueScratchXYPP; - /** Used as a scratch variable for ambient occlusion between the top face and the west face. */ - public float aoLightValueScratchYZPP; - /** Used as a scratch variable for ambient occlusion on the south/top/west corner. */ - public float aoLightValueScratchXYZPPP; - /** Used as a scratch variable for ambient occlusion between the north face and the east face. */ - public float aoLightValueScratchXZNN; - /** Used as a scratch variable for ambient occlusion between the south face and the east face. */ - public float aoLightValueScratchXZPN; - /** Used as a scratch variable for ambient occlusion between the north face and the west face. */ - public float aoLightValueScratchXZNP; - /** Used as a scratch variable for ambient occlusion between the south face and the west face. */ - public float aoLightValueScratchXZPP; - /** Ambient occlusion brightness XYZNNN */ - public int aoBrightnessXYZNNN; - /** Ambient occlusion brightness XYNN */ - public int aoBrightnessXYNN; - /** Ambient occlusion brightness XYZNNP */ - public int aoBrightnessXYZNNP; - /** Ambient occlusion brightness YZNN */ - public int aoBrightnessYZNN; - /** Ambient occlusion brightness YZNP */ - public int aoBrightnessYZNP; - /** Ambient occlusion brightness XYZPNN */ - public int aoBrightnessXYZPNN; - /** Ambient occlusion brightness XYPN */ - public int aoBrightnessXYPN; - /** Ambient occlusion brightness XYZPNP */ - public int aoBrightnessXYZPNP; - /** Ambient occlusion brightness XYZNPN */ - public int aoBrightnessXYZNPN; - /** Ambient occlusion brightness XYNP */ - public int aoBrightnessXYNP; - /** Ambient occlusion brightness XYZNPP */ - public int aoBrightnessXYZNPP; - /** Ambient occlusion brightness YZPN */ - public int aoBrightnessYZPN; - /** Ambient occlusion brightness XYZPPN */ - public int aoBrightnessXYZPPN; - /** Ambient occlusion brightness XYPP */ - public int aoBrightnessXYPP; - /** Ambient occlusion brightness YZPP */ - public int aoBrightnessYZPP; - /** Ambient occlusion brightness XYZPPP */ - public int aoBrightnessXYZPPP; - /** Ambient occlusion brightness XZNN */ - public int aoBrightnessXZNN; - /** Ambient occlusion brightness XZPN */ - public int aoBrightnessXZPN; - /** Ambient occlusion brightness XZNP */ - public int aoBrightnessXZNP; - /** Ambient occlusion brightness XZPP */ - public int aoBrightnessXZPP; - /** Brightness top left */ - public int brightnessTopLeft; - /** Brightness bottom left */ - public int brightnessBottomLeft; - /** Brightness bottom right */ - public int brightnessBottomRight; - /** Brightness top right */ - public int brightnessTopRight; - /** Red color value for the top left corner */ - public float colorRedTopLeft; - /** Red color value for the bottom left corner */ - public float colorRedBottomLeft; - /** Red color value for the bottom right corner */ - public float colorRedBottomRight; - /** Red color value for the top right corner */ - public float colorRedTopRight; - /** Green color value for the top left corner */ - public float colorGreenTopLeft; - /** Green color value for the bottom left corner */ - public float colorGreenBottomLeft; - /** Green color value for the bottom right corner */ - public float colorGreenBottomRight; - /** Green color value for the top right corner */ - public float colorGreenTopRight; - /** Blue color value for the top left corner */ - public float colorBlueTopLeft; - /** Blue color value for the bottom left corner */ - public float colorBlueBottomLeft; - /** Blue color value for the bottom right corner */ - public float colorBlueBottomRight; - /** Blue color value for the top right corner */ - public float colorBlueTopRight; - /** If set to >=0, all block faces will be rendered using this texture index */ - public IIcon overrideBlockTexture; - /** - * Clear override block texture - */ - public void clearOverrideBlockTexture() - { - this.overrideBlockTexture = null; - } - - public boolean hasOverrideBlockTexture() - { - return this.overrideBlockTexture != null; - } - - public IIcon getBlockIcon(Block block, IBlockAccess access, int x, int y, int z, int side) - { - return this.getIconSafe(block.getIcon(access, x, y, z, side)); - } - - public IIcon getBlockIconFromSideAndMetadata(Block block, int side, int meta) - { - return this.getIconSafe(block.getIcon(side, meta)); - } - - public IIcon getBlockIconFromSide(Block block, int side) - { - return this.getIconSafe(block.getBlockTextureFromSide(side)); - } - - public IIcon getBlockIcon(Block block) - { - return this.getIconSafe(block.getBlockTextureFromSide(1)); - } - - public IIcon getIconSafe(IIcon iicon) - { - if (iicon == null) - { - iicon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); - } - - return (IIcon)iicon; - } - - IBlockAccess blockAccess = RenderBlocks.getInstance().blockAccess; - - public boolean renderStandardBlockWithAmbientOcclusion(IBlockAccess aWorld, RenderBlocks aRenderer, ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) - { - this.enableAO = true; - boolean flag = false; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - boolean flag1 = true; - int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(983055); - - if (this.getBlockIcon(block).getIconName().equals("grass_top")) - { - flag1 = false; - } - else if (this.hasOverrideBlockTexture()) - { - flag1 = false; - } - - boolean flag2; - boolean flag3; - boolean flag4; - boolean flag5; - int i1; - float f7; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) - { - if (this.renderMinY <= 0.0D) - { - --yPos; - } - - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMinY <= 0.0D) - { - ++yPos; - } - - i1 = l; - - if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) / 4.0F; - f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) / 4.0F; - f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) / 4.0F; - f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.5F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) - { - if (this.renderMaxY >= 1.0D) - { - ++yPos; - } - - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMaxY >= 1.0D) - { - --yPos; - } - - i1 = l; - - if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) / 4.0F; - f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) / 4.0F; - f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - IIcon iicon; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) - { - if (this.renderMinZ <= 0.0D) - { - --zPos; - } - - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMinZ <= 0.0D) - { - ++zPos; - } - - i1 = l; - - if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) / 4.0F; - f5 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) / 4.0F; - f6 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) - { - if (this.renderMaxZ >= 1.0D) - { - ++zPos; - } - - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMaxZ >= 1.0D) - { - --zPos; - } - - i1 = l; - - if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) / 4.0F; - f6 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) / 4.0F; - f5 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) / 4.0F; - f4 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) - { - if (this.renderMinX <= 0.0D) - { - --xPos; - } - - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMinX <= 0.0D) - { - ++xPos; - } - - i1 = l; - - if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) / 4.0F; - f3 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) / 4.0F; - f4 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) / 4.0F; - f5 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) - { - if (this.renderMaxX >= 1.0D) - { - ++xPos; - } - - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMaxX >= 1.0D) - { - --xPos; - } - - i1 = l; - - if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) / 4.0F; - f4 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) / 4.0F; - f5 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) / 4.0F; - f6 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - this.enableAO = false; - return flag; - } - - /** - * Renders non-full-cube block with ambient occusion. Args: block, x, y, z, red, green, blue (lighting) - */ - public boolean renderStandardBlockWithAmbientOcclusionPartial(IBlockAccess aWorld, RenderBlocks aRenderer, ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) - { - this.enableAO = true; - boolean flag = false; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - boolean flag1 = true; - int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(983055); - - if (this.getBlockIcon(block).getIconName().equals("grass_top")) - { - flag1 = false; - } - else if (this.hasOverrideBlockTexture()) - { - flag1 = false; - } - - boolean flag2; - boolean flag3; - boolean flag4; - boolean flag5; - int i1; - float f7; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) - { - if (this.renderMinY <= 0.0D) - { - --yPos; - } - - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMinY <= 0.0D) - { - ++yPos; - } - - i1 = l; - - if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) / 4.0F; - f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) / 4.0F; - f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) / 4.0F; - f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.5F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) - { - if (this.renderMaxY >= 1.0D) - { - ++yPos; - } - - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMaxY >= 1.0D) - { - --yPos; - } - - i1 = l; - - if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) / 4.0F; - f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) / 4.0F; - f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - float f8; - float f9; - float f10; - float f11; - int j1; - int k1; - int l1; - int i2; - IIcon iicon; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) - { - if (this.renderMinZ <= 0.0D) - { - --zPos; - } - - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMinZ <= 0.0D) - { - ++zPos; - } - - i1 = l; - - if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - f9 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) / 4.0F; - f10 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) / 4.0F; - f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) / 4.0F; - f3 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMinX) + (double)f9 * this.renderMaxY * this.renderMinX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMinX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - f4 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMaxY * this.renderMaxX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - f5 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMinY * this.renderMaxX + (double)f10 * (1.0D - this.renderMinY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - f6 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMinX) + (double)f9 * this.renderMinY * this.renderMinX + (double)f10 * (1.0D - this.renderMinY) * this.renderMinX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMaxY * (1.0D - this.renderMinX), this.renderMaxY * this.renderMinX, (1.0D - this.renderMaxY) * this.renderMinX, (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMaxY * (1.0D - this.renderMaxX), this.renderMaxY * this.renderMaxX, (1.0D - this.renderMaxY) * this.renderMaxX, (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMinY * (1.0D - this.renderMaxX), this.renderMinY * this.renderMaxX, (1.0D - this.renderMinY) * this.renderMaxX, (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMinY * (1.0D - this.renderMinX), this.renderMinY * this.renderMinX, (1.0D - this.renderMinY) * this.renderMinX, (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) - { - if (this.renderMaxZ >= 1.0D) - { - ++zPos; - } - - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMaxZ >= 1.0D) - { - --zPos; - } - - i1 = l; - - if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) / 4.0F; - f9 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) / 4.0F; - f10 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) / 4.0F; - f11 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) / 4.0F; - f3 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMinX) + (double)f9 * this.renderMaxY * this.renderMinX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMinX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - f4 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMinX) + (double)f9 * this.renderMinY * this.renderMinX + (double)f10 * (1.0D - this.renderMinY) * this.renderMinX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - f5 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMinY * this.renderMaxX + (double)f10 * (1.0D - this.renderMinY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - f6 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMaxY * this.renderMaxX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMaxY * (1.0D - this.renderMinX), (1.0D - this.renderMaxY) * (1.0D - this.renderMinX), (1.0D - this.renderMaxY) * this.renderMinX, this.renderMaxY * this.renderMinX); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMinY * (1.0D - this.renderMinX), (1.0D - this.renderMinY) * (1.0D - this.renderMinX), (1.0D - this.renderMinY) * this.renderMinX, this.renderMinY * this.renderMinX); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMinY * (1.0D - this.renderMaxX), (1.0D - this.renderMinY) * (1.0D - this.renderMaxX), (1.0D - this.renderMinY) * this.renderMaxX, this.renderMinY * this.renderMaxX); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMaxY * (1.0D - this.renderMaxX), (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX), (1.0D - this.renderMaxY) * this.renderMaxX, this.renderMaxY * this.renderMaxX); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) - { - if (this.renderMinX <= 0.0D) - { - --xPos; - } - - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMinX <= 0.0D) - { - ++xPos; - } - - i1 = l; - - if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) / 4.0F; - f9 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) / 4.0F; - f10 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) / 4.0F; - f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) / 4.0F; - f3 = (float)((double)f9 * this.renderMaxY * this.renderMaxZ + (double)f10 * this.renderMaxY * (1.0D - this.renderMaxZ) + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) + (double)f8 * (1.0D - this.renderMaxY) * this.renderMaxZ); - f4 = (float)((double)f9 * this.renderMaxY * this.renderMinZ + (double)f10 * this.renderMaxY * (1.0D - this.renderMinZ) + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) + (double)f8 * (1.0D - this.renderMaxY) * this.renderMinZ); - f5 = (float)((double)f9 * this.renderMinY * this.renderMinZ + (double)f10 * this.renderMinY * (1.0D - this.renderMinZ) + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) + (double)f8 * (1.0D - this.renderMinY) * this.renderMinZ); - f6 = (float)((double)f9 * this.renderMinY * this.renderMaxZ + (double)f10 * this.renderMinY * (1.0D - this.renderMaxZ) + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) + (double)f8 * (1.0D - this.renderMinY) * this.renderMaxZ); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMaxY * this.renderMaxZ, this.renderMaxY * (1.0D - this.renderMaxZ), (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), (1.0D - this.renderMaxY) * this.renderMaxZ); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMaxY * this.renderMinZ, this.renderMaxY * (1.0D - this.renderMinZ), (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), (1.0D - this.renderMaxY) * this.renderMinZ); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMinY * this.renderMinZ, this.renderMinY * (1.0D - this.renderMinZ), (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), (1.0D - this.renderMinY) * this.renderMinZ); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMinY * this.renderMaxZ, this.renderMinY * (1.0D - this.renderMaxZ), (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), (1.0D - this.renderMinY) * this.renderMaxZ); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) - { - if (this.renderMaxX >= 1.0D) - { - ++xPos; - } - - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMaxX >= 1.0D) - { - --xPos; - } - - i1 = l; - - if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) / 4.0F; - f9 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) / 4.0F; - f10 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) / 4.0F; - f11 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) / 4.0F; - f3 = (float)((double)f8 * (1.0D - this.renderMinY) * this.renderMaxZ + (double)f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) + (double)f10 * this.renderMinY * (1.0D - this.renderMaxZ) + (double)f11 * this.renderMinY * this.renderMaxZ); - f4 = (float)((double)f8 * (1.0D - this.renderMinY) * this.renderMinZ + (double)f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) + (double)f10 * this.renderMinY * (1.0D - this.renderMinZ) + (double)f11 * this.renderMinY * this.renderMinZ); - f5 = (float)((double)f8 * (1.0D - this.renderMaxY) * this.renderMinZ + (double)f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) + (double)f10 * this.renderMaxY * (1.0D - this.renderMinZ) + (double)f11 * this.renderMaxY * this.renderMinZ); - f6 = (float)((double)f8 * (1.0D - this.renderMaxY) * this.renderMaxZ + (double)f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) + (double)f10 * this.renderMaxY * (1.0D - this.renderMaxZ) + (double)f11 * this.renderMaxY * this.renderMaxZ); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMinY) * this.renderMaxZ, (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), this.renderMinY * (1.0D - this.renderMaxZ), this.renderMinY * this.renderMaxZ); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMinY) * this.renderMinZ, (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), this.renderMinY * (1.0D - this.renderMinZ), this.renderMinY * this.renderMinZ); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMaxY) * this.renderMinZ, (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), this.renderMaxY * (1.0D - this.renderMinZ), this.renderMaxY * this.renderMinZ); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMaxY) * this.renderMaxZ, (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), this.renderMaxY * (1.0D - this.renderMaxZ), this.renderMaxY * this.renderMaxZ); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - this.enableAO = false; - return flag; - } - -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java b/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java deleted file mode 100644 index 000badb80f..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.client.model.ModelBatKing; -import gtPlusPlus.core.entity.monster.EntityBatKing; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class RenderBatKing extends RenderLiving { - - private static final ResourceLocation batTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/batKing.png"); - - /** - * not actually sure this is size, is not used as of now, but the model would be - * recreated if the value changed and it seems a good match for a bats size - */ - private int renderedBatSize; - - public RenderBatKing() { - super(new ModelBatKing(), 0.7F); - this.renderedBatSize = (((ModelBatKing) this.mainModel).getBatSize()); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker function - * which does the actual work. In all probabilty, the class Render is generic - * (Render 1.0F) - { - f2 = 1.0F; - } - - f2 *= f2; - f2 *= f2; - final float f3 = 1.0F + (f2 * 0.3F); - GL11.glScalef(f3, f3, f3); - } - - f2 = (1.0F - (((entity.fuse - p_76986_9_) + 1.0F) / 100.0F)) * 0.8F; - this.bindEntityTexture(entity); - this.blockRenderer.renderBlockAsItem(ModBlocks.blockMiningExplosive, 0, entity.getBrightness(p_76986_9_)); - - if (((entity.fuse / 5) % 2) == 0) - { - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); - GL11.glColor4f(1.0F, 1.0F, 1.0F, f2); - this.blockRenderer.renderBlockAsItem(ModBlocks.blockMiningExplosive, 0, 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - } - - GL11.glPopMatrix(); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(final EntityPrimedMiningExplosive p_110775_1_){ - return TextureMap.locationBlocksTexture; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(final Entity p_110775_1_){ - Logger.WARNING("Rendering Mining Explosion. 4"); - return this.getEntityTexture((EntityPrimedMiningExplosive)p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render= 0; --i) { - adouble[i] = d3; - adouble1[i] = d4; - d3 += (double) (random.nextInt(11) - 5); - d4 += (double) (random.nextInt(11) - 5); - } - - for (int k1 = 0; k1 < 4; ++k1) { - Random random1 = new XSTR(p_76986_1_.boltVertex); - - for (int j = 0; j < 3; ++j) { - int k = 7; - int l = 0; - - if (j > 0) { - k = 7 - j; - } - - if (j > 0) { - l = k - 2; - } - - double d5 = adouble[k] - d3; - double d6 = adouble1[k] - d4; - - for (int i1 = k; i1 >= l; --i1) { - double d7 = d5; - double d8 = d6; - - if (j == 0) { - d5 += (double) (random1.nextInt(11) - 5); - d6 += (double) (random1.nextInt(11) - 5); - } - else { - d5 += (double) (random1.nextInt(31) - 15); - d6 += (double) (random1.nextInt(31) - 15); - } - - tessellator.startDrawing(5); - float f2 = 0.5F; - tessellator.setColorRGBA_F(0.9F * f2, 0.9F * f2, 1.0F * f2, 0.3F); - double d9 = 0.1D + (double) k1 * 0.2D; - - if (j == 0) { - d9 *= (double) i1 * 0.1D + 1.0D; - } - - double d10 = 0.1D + (double) k1 * 0.2D; - - if (j == 0) { - d10 *= (double) (i1 - 1) * 0.1D + 1.0D; - } - - for (int j1 = 0; j1 < 5; ++j1) { - double d11 = p_76986_2_ + 0.5D - d9; - double d12 = p_76986_6_ + 0.5D - d9; - - if (j1 == 1 || j1 == 2) { - d11 += d9 * 2.0D; - } - - if (j1 == 2 || j1 == 3) { - d12 += d9 * 2.0D; - } - - double d13 = p_76986_2_ + 0.5D - d10; - double d14 = p_76986_6_ + 0.5D - d10; - - if (j1 == 1 || j1 == 2) { - d13 += d10 * 2.0D; - } - - if (j1 == 2 || j1 == 3) { - d14 += d10 * 2.0D; - } - - tessellator.addVertex(d13 + d5, p_76986_4_ + (double) (i1 * 16), d14 + d6); - tessellator.addVertex(d11 + d7, p_76986_4_ + (double) ((i1 + 1) * 16), d12 + d8); - } - - tessellator.draw(); - } - } - } - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityTeslaTowerLightning p_110775_1_) { - return null; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - Logger.INFO("Render Plasma. 5"); - return this.getEntityTexture((EntityTeslaTowerLightning) p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker - * function which does the actual work. In all probabilty, the class Render - * is generic (Render> 16 & 255) / 255.0F; - float f3 = (i >> 8 & 255) / 255.0F; - float f4 = (i & 255) / 255.0F; - GL11.glColor3f(f2, f3, f4); - GL11.glPushMatrix(); - this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay")); - GL11.glPopMatrix(); - GL11.glColor3f(1.0F, 1.0F, 1.0F); - } - - this.func_77026_a(tessellator, iicon); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return TextureMap.locationItemsTexture; - } - - private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) - { - float f = p_77026_2_.getMinU(); - float f1 = p_77026_2_.getMaxU(); - float f2 = p_77026_2_.getMinV(); - float f3 = p_77026_2_.getMaxV(); - float f4 = 1.0F; - float f5 = 0.5F; - float f6 = 0.25F; - GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - p_77026_1_.startDrawingQuads(); - p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); - p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); - p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); - p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); - p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); - p_77026_1_.draw(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java b/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java deleted file mode 100644 index e1e8360840..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java +++ /dev/null @@ -1,99 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.client.model.ModelSickBlaze; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.lib.CORE; - -@SideOnly(Side.CLIENT) -public class RenderSickBlaze extends RenderLiving -{ - private static final ResourceLocation blazeTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/sickBlaze.png"); - private int field_77068_a; - - public RenderSickBlaze() - { - super(new ModelSickBlaze(), 0.5F); - this.field_77068_a = ((ModelSickBlaze)this.mainModel).func_78104_a(); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render= 0.01D) { - float f3 = 13.0F; - float f4 = p_77043_1_.limbSwing - p_77043_1_.limbSwingAmount * (1.0F - p_77043_4_) + 6.0F; - float f5 = (Math.abs(f4 % f3 - f3 * 0.5F) - f3 * 0.25F) / (f3 * 0.25F); - GL11.glRotatef(6.5F * f5, 0.0F, 0.0F, 1.0F); - } - } - - protected void renderEquippedItems(EntityStaballoyConstruct p_77029_1_, float p_77029_2_) { - super.renderEquippedItems(p_77029_1_, p_77029_2_); - - if (p_77029_1_.getHoldRoseTick() != 0) { - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glPushMatrix(); - GL11.glRotatef(5.0F + 180.0F * this.staballoyGolemModel.ironGolemRightArm.rotateAngleX / (float) Math.PI, 1.0F, - 0.0F, 0.0F); - GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F); - GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); - float f1 = 0.8F; - GL11.glScalef(f1, -f1, f1); - int i = p_77029_1_.getBrightnessForRender(p_77029_2_); - int j = i % 65536; - int k = i / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.bindTexture(TextureMap.locationBlocksTexture); - this.field_147909_c.renderBlockAsItem(Blocks.red_flower, 0, 1.0F); - GL11.glPopMatrix(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - } - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker - * function which does the actual work. In all probabilty, the class Render - * is generic (Render 0) { - this.motionX *= 0.02D; - this.motionY *= 0.02D; - this.motionZ *= 0.02D; - this.setParticleTextureIndex(113); - } else { - this.setParticleTextureIndex(112); - } - this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.9800000190734863D; - this.motionY *= 0.9800000190734863D; - this.motionZ *= 0.9800000190734863D; - - if (this.particleMaxAge-- <= 0) { - this.setDead(); - } - if (this.onGround) { - this.setParticleTextureIndex(114); - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - if (this.particleGravity > 0) { - Material material = this.worldObj.getBlock(MathHelper.floor(this.posX), MathHelper.floor(this.posY), MathHelper.floor(this.posZ)).getMaterial(); - - if (material.isLiquid() || material.isSolid()) { - double d0 = MathHelper.floor(this.posY) - + 1 - - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor(this.posX), MathHelper.floor(this.posY), - MathHelper.floor(this.posZ))); - if (this.posY < d0) { - this.setDead(); - } - } - } else { - Material material = this.worldObj.getBlock(MathHelper.ceil(this.posX), MathHelper.ceil(this.posY), MathHelper.ceil(this.posZ)).getMaterial(); - - if (material.isLiquid() || material.isSolid()) { - double d0 = MathHelper.ceil(this.posY) - + 1 - - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.ceil(this.posX), MathHelper.ceil(this.posY), - MathHelper.ceil(this.posZ))); - if (this.posY > d0) { - this.setDead(); - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java b/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java deleted file mode 100644 index b4f64f9b35..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java +++ /dev/null @@ -1,46 +0,0 @@ -package gtPlusPlus.core.client.renderer.tabula; - -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class RenderTabulaBase extends TileEntitySpecialRenderer { - - private final ModelTabulaBase mModel; - private final ResourceLocation mTexture; - private final Class mTileClass; - - public final int mRenderID; - public final RenderTabulaBase mInstance; - - public RenderTabulaBase(ModelTabulaBase aModel, String aTexturePath, Class aTileClass) { - mModel = aModel; - mTexture = new ResourceLocation(CORE.MODID, aTexturePath); - mTileClass = aTileClass; - this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); - mInstance = this; - } - - public void renderTileEntityAt(Object aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { - if (mTileClass.isInstance(aTile)) { - //Logger.INFO("Rendering EggBox"); - this.bindTexture(mTexture); - mModel.renderAll(); - } - } - - public void renderTileEntityAt(TileEntity aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { - if (mTileClass != null && aTile != null) { - if (mTileClass.isInstance(aTile)) { - this.renderTileEntityAt((Object) aTile, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_); - } - } - } -} \ No newline at end of file -- cgit