From 55f64675b42ac8d3c557cc850f78664bee006f6f Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sat, 28 Jan 2023 19:32:44 -0800 Subject: [ci skip] spotlessApply with the new settings --- .../gtPlusPlus/core/client/CustomTextureSet.java | 1 + .../gtPlusPlus/core/client/model/ModelBatKing.java | 19 +- .../core/client/model/ModelDecayChest.java | 6 +- .../gtPlusPlus/core/client/model/ModelEggBox.java | 12 +- .../core/client/model/ModelGiantChicken.java | 26 +- .../core/client/model/ModelSickBlaze.java | 26 +- .../core/client/model/ModelStaballoyConstruct.java | 29 +- .../core/client/model/tabula/ModelTabulaBase.java | 8 +- .../client/renderer/CustomItemBlockRenderer.java | 12 +- .../client/renderer/CustomOreBlockRenderer.java | 1146 +++++++++----------- .../core/client/renderer/RenderBatKing.java | 112 +- .../core/client/renderer/RenderDecayChest.java | 35 +- .../core/client/renderer/RenderGiantChicken.java | 5 +- .../renderer/RenderMiningExplosivesPrimed.java | 38 +- .../core/client/renderer/RenderPlasmaBolt.java | 62 +- .../core/client/renderer/RenderPotionthrow.java | 14 +- .../core/client/renderer/RenderSickBlaze.java | 50 +- .../client/renderer/RenderStaballoyConstruct.java | 122 +-- .../core/client/renderer/RenderToxinball.java | 25 +- .../renderer/particle/EntityDropParticleFX.java | 42 +- .../client/renderer/tabula/RenderTabulaBase.java | 15 +- 21 files changed, 772 insertions(+), 1033 deletions(-) (limited to 'src/main/java/gtPlusPlus/core/client') diff --git a/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java b/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java index 687dc65fb1..15574f66ed 100644 --- a/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java +++ b/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java @@ -5,6 +5,7 @@ import gregtech.api.enums.TextureSet; public class CustomTextureSet extends TextureSet { public static enum TextureSets { + REFINED(), GEM_A(), ENRICHED(), diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java b/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java index 590345e8e6..5baa5a8f49 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java @@ -1,16 +1,19 @@ package gtPlusPlus.core.client.model; -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.util.MathHelper; + import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.entity.monster.EntityBatKing; + @SideOnly(Side.CLIENT) public class ModelBatKing extends ModelBase { + private ModelRenderer batHead; /** The body box of the bat model. */ private ModelRenderer batBody; @@ -68,14 +71,8 @@ public class ModelBatKing extends ModelBase { /** * 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_) { + 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; diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java b/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java index 98c474a160..ef0943684c 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java @@ -1,12 +1,14 @@ 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; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @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. */ diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java b/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java index a12b48c7d2..028e06f7d6 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java @@ -1,16 +1,16 @@ package gtPlusPlus.core.client.model; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + 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 + * ModelEggBox - Alkalus Created using Tabula 4.1.1 */ public class ModelEggBox extends ModelTabulaBase { @@ -58,7 +58,9 @@ public class ModelEggBox extends ModelTabulaBase { public static RenderTabulaBase getRenderer() { if (mRendererInstance == null) { mRendererInstance = new RenderTabulaBase( - new ModelEggBox(), "textures/blocks/TileEntities/EggBox_full.png", TileEntityEggBox.class); + new ModelEggBox(), + "textures/blocks/TileEntities/EggBox_full.png", + TileEntityEggBox.class); } return mRendererInstance; } diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java b/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java index 586dfec2db..6f4a0e980b 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java @@ -1,13 +1,15 @@ 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; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class ModelGiantChicken extends ModelChicken { @@ -42,14 +44,8 @@ public class ModelGiantChicken extends ModelChicken { /** * 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_) { + 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) { @@ -96,14 +92,8 @@ public class ModelGiantChicken extends ModelChicken { * 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_) { + 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; diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java b/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java index 7cfb7ec2ea..961f365f69 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java @@ -1,14 +1,16 @@ 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; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class ModelSickBlaze extends ModelBlaze { + /** The sticks that fly around the Blaze. */ private ModelRenderer[] blazeSticks = new ModelRenderer[24]; @@ -33,14 +35,8 @@ public class ModelSickBlaze extends ModelBlaze { * 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_) { + 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_); @@ -55,14 +51,8 @@ public class ModelSickBlaze extends ModelBlaze { * "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_) { + 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; diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java b/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java index 879e06516a..d93bca90c6 100644 --- a/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java +++ b/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java @@ -1,13 +1,14 @@ 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; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class ModelStaballoyConstruct extends ModelIronGolem { @@ -49,14 +50,8 @@ public class ModelStaballoyConstruct extends ModelIronGolem { * 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_) { + 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_); @@ -72,14 +67,8 @@ public class ModelStaballoyConstruct extends ModelIronGolem { * "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_) { + 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_; @@ -107,8 +96,8 @@ public class ModelStaballoyConstruct extends ModelIronGolem { 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.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_; } } diff --git a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java b/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java index 2ec6e4f06d..3c13c83391 100644 --- a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java +++ b/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java @@ -1,13 +1,13 @@ package gtPlusPlus.core.client.model.tabula; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; + /** - * ModelEggBox - Alkalus - * Created using Tabula 4.1.1 + * ModelEggBox - Alkalus Created using Tabula 4.1.1 */ public abstract class ModelTabulaBase extends ModelBase { diff --git a/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java b/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java index b24bc48dbd..88244473e4 100644 --- a/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java +++ b/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java @@ -7,11 +7,11 @@ 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. + * Easy way of rendering an item which should look like a block. Borrowed. * * @author King Lemming * @@ -42,14 +42,14 @@ public class CustomItemBlockRenderer implements IItemRenderer { renderItemAsBlock((RenderBlocks) data[0], item, offset, offset, offset); } - public static void renderItemAsBlock( - RenderBlocks renderer, ItemStack item, double translateX, double translateY, double translateZ) { + 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) { + public static void renderTextureAsBlock(RenderBlocks renderer, IIcon texture, double translateX, double translateY, + double translateZ) { Tessellator tessellator = Tessellator.instance; Block block = Blocks.stone; diff --git a/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java b/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java index 793e7093cb..df616a1c14 100644 --- a/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java +++ b/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java @@ -1,10 +1,5 @@ package gtPlusPlus.core.client.renderer; -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; @@ -12,8 +7,15 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; + 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; + public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { public static CustomOreBlockRenderer INSTANCE; @@ -26,24 +28,29 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { Logger.INFO("Registered Custom Ore Block Renderer."); } - public boolean renderStandardBlock( - IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { + 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 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) { + 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); @@ -54,10 +61,28 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { if (Minecraft.isAmbientOcclusionEnabled() && aBlock.getLightValue() == 0) { if (RenderBlocks.getInstance().partialRenderBounds) { return INSTANCE.renderStandardBlockWithAmbientOcclusionPartial( - aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); + aWorld, + aRenderer, + aTextures, + aBlock, + aX, + aY, + aZ, + RED, + GREEN, + BLUE); } else { return INSTANCE.renderStandardBlockWithAmbientOcclusion( - aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); + aWorld, + aRenderer, + aTextures, + aBlock, + aX, + aY, + aZ, + RED, + GREEN, + BLUE); } } else { renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); @@ -70,51 +95,44 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { return true; } - public static void renderFaceYNeg( - IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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)); + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); } if (aIcon != null) { for (int i = 0; i < aIcon.length; i++) { @@ -126,21 +144,14 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { aRenderer.flipTexture = false; } - public static void renderPositiveYFacing( - IBlockAccess aWorld, - RenderBlocks aRenderer, - Block aBlock, - int aX, - int aY, - int aZ, - ITexture[] aIcon, - boolean aFullBlock) { + 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)); + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); } if (aIcon != null) { for (int i = 0; i < aIcon.length; i++) { @@ -152,21 +163,14 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { aRenderer.flipTexture = false; } - public static void renderNegativeZFacing( - IBlockAccess aWorld, - RenderBlocks aRenderer, - Block aBlock, - int aX, - int aY, - int aZ, - ITexture[] aIcon, - boolean aFullBlock) { + 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)); + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); } aRenderer.flipTexture = (!aFullBlock); if (aIcon != null) { @@ -179,21 +183,14 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { aRenderer.flipTexture = false; } - public static void renderPositiveZFacing( - IBlockAccess aWorld, - RenderBlocks aRenderer, - Block aBlock, - int aX, - int aY, - int aZ, - ITexture[] aIcon, - boolean aFullBlock) { + 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)); + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); } if (aIcon != null) { for (int i = 0; i < aIcon.length; i++) { @@ -205,21 +202,14 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { aRenderer.flipTexture = false; } - public static void renderNegativeXFacing( - IBlockAccess aWorld, - RenderBlocks aRenderer, - Block aBlock, - int aX, - int aY, - int aZ, - ITexture[] aIcon, - boolean aFullBlock) { + 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)); + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); } if (aIcon != null) { for (int i = 0; i < aIcon.length; i++) { @@ -231,21 +221,14 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { aRenderer.flipTexture = false; } - public static void renderPositiveXFacing( - IBlockAccess aWorld, - RenderBlocks aRenderer, - Block aBlock, - int aX, - int aY, - int aZ, - ITexture[] aIcon, - boolean aFullBlock) { + 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)); + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); } aRenderer.flipTexture = (!aFullBlock); if (aIcon != null) { @@ -292,8 +275,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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) { + 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); } @@ -306,13 +289,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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_) { + 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_; @@ -321,8 +299,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D @@ -342,8 +319,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.renderMinZ = block.getBlockBoundsMinZ(); this.renderMaxZ = block.getBlockBoundsMaxZ(); this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 - && (this.renderMinX > 0.0D - || this.renderMaxX < 1.0D + && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D @@ -493,6 +469,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { public float colorBlueTopRight; /** If set to >=0, all block faces will be rendered using this texture index */ public IIcon overrideBlockTexture; + /** * Clear override block texture */ @@ -522,9 +499,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { public IIcon getIconSafe(IIcon iicon) { if (iicon == null) { - iicon = ((TextureMap) - Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)) - .getAtlasSprite("missingno"); + iicon = ((TextureMap) Minecraft.getMinecraft().getTextureManager() + .getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); } return (IIcon) iicon; @@ -532,17 +508,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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) { + 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; @@ -577,14 +544,10 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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(); + 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(); @@ -594,8 +557,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; } else { - this.aoLightValueScratchXYZNNN = - blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); } @@ -603,8 +566,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; } else { - this.aoLightValueScratchXYZNNP = - blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); } @@ -612,8 +575,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; } else { - this.aoLightValueScratchXYZPNN = - blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); } @@ -621,8 +584,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; } else { - this.aoLightValueScratchXYZPNP = - blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); } @@ -632,8 +595,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { i1 = l; - if (this.renderMinY <= 0.0D - || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) { + if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) { i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); } @@ -656,19 +618,16 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { .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; + 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 = 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; @@ -697,14 +656,10 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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(); + 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(); @@ -714,8 +669,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; } else { - this.aoLightValueScratchXYZNPN = - blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); } @@ -723,8 +678,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; } else { - this.aoLightValueScratchXYZPPN = - blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); } @@ -732,8 +687,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; } else { - this.aoLightValueScratchXYZNPP = - blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); } @@ -741,8 +696,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; } else { - this.aoLightValueScratchXYZPPP = - blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); } @@ -752,8 +707,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { i1 = l; - if (this.renderMaxY >= 1.0D - || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) { + if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) { i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); } @@ -775,8 +729,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { 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.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; this.colorRedTopLeft *= f3; this.colorGreenTopLeft *= f3; @@ -802,14 +755,10 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { --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.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); @@ -823,8 +772,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; } else { - this.aoLightValueScratchXYZNNN = - blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); } @@ -832,8 +781,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; } else { - this.aoLightValueScratchXYZNPN = - blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); } @@ -841,8 +790,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; } else { - this.aoLightValueScratchXYZPNN = - blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); } @@ -850,8 +799,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; } else { - this.aoLightValueScratchXYZPPN = - blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); } @@ -861,8 +810,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { i1 = l; - if (this.renderMinZ <= 0.0D - || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) { + if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) { i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); } @@ -885,19 +833,16 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { .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; + 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 = 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; @@ -916,8 +861,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass - && iicon.getIconName().equals("grass_side") + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) { this.colorRedTopLeft *= R; this.colorRedBottomLeft *= R; @@ -943,14 +887,10 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { ++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.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); @@ -964,8 +904,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; } else { - this.aoLightValueScratchXYZNNP = - blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); } @@ -973,8 +913,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; } else { - this.aoLightValueScratchXYZNPP = - blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); } @@ -982,8 +922,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; } else { - this.aoLightValueScratchXYZPNP = - blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); } @@ -991,8 +931,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; } else { - this.aoLightValueScratchXYZPPP = - blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) + .getAmbientOcclusionLightValue(); this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); } @@ -1002,8 +942,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { i1 = l; - if (this.renderMaxZ >= 1.0D - || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) { + if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) { i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); } @@ -1026,19 +965,16 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { .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; + 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 = 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; @@ -1057,8 +993,7 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass - && iicon.getIconName().equals("grass_side") + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) { this.colorRedTopLeft *= R; this.colorRedBottomLeft *= R; @@ -1084,14 +1019,10 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { --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.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, xPo