diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java')
-rw-r--r-- | src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java | 108 |
1 files changed, 50 insertions, 58 deletions
diff --git a/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java index 09c7dbf22d..80a4c4f001 100644 --- a/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java +++ b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java @@ -3,74 +3,66 @@ package gtPlusPlus.australia.block; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockDirt; +import gtPlusPlus.api.interfaces.ITileTooltip; import net.minecraft.block.BlockSand; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockAustraliaTopSoil extends BlockSand implements ITileTooltip{ +public class BlockAustraliaTopSoil extends BlockSand implements ITileTooltip { - public BlockAustraliaTopSoil() { - this.setHardness(0.5F); - this.setBlockTextureName("minecraft" + ":" + "dirt"); - this.setCreativeTab(CreativeTabs.tabBlock); - this.setBlockName("blockAustralianTopSoil"); - LanguageRegistry.addName(this, "Desert Earth"); - } - - @Override - @SideOnly(Side.CLIENT) - public int getBlockColor() - { - double d0 = 0.5D; - double d1 = 1.0D; - return ColorizerGrass.getGrassColor(d0, d1); - } + public BlockAustraliaTopSoil() { + this.setHardness(0.5F); + this.setBlockTextureName("minecraft" + ":" + "dirt"); + this.setCreativeTab(CreativeTabs.tabBlock); + this.setBlockName("blockAustralianTopSoil"); + LanguageRegistry.addName(this, "Desert Earth"); + } - /** - * Returns the color this block should be rendered. Used by leaves. - */ - @Override - @SideOnly(Side.CLIENT) - public int getRenderColor(int p_149741_1_) - { - return this.getBlockColor(); - } + @Override + @SideOnly(Side.CLIENT) + public int getBlockColor() { + double d0 = 0.5D; + double d1 = 1.0D; + return ColorizerGrass.getGrassColor(d0, d1); + } - /** - * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called - * when first determining what to render. - */ - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) - { - int l = 0; - int i1 = 0; - int j1 = 0; + /** + * Returns the color this block should be rendered. Used by leaves. + */ + @Override + @SideOnly(Side.CLIENT) + public int getRenderColor(int p_149741_1_) { + return this.getBlockColor(); + } - for (int k1 = -1; k1 <= 1; ++k1) - { - for (int l1 = -1; l1 <= 1; ++l1) - { - int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); - l += (i2 & 16711680) >> 16; - i1 += (i2 & 65280) >> 8; - j1 += i2 & 255; - } - } + /** + * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called + * when first determining what to render. + */ + @Override + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) { + int l = 0; + int i1 = 0; + int j1 = 0; - return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; - } + for (int k1 = -1; k1 <= 1; ++k1) { + for (int l1 = -1; l1 <= 1; ++l1) { + int i2 = p_149720_1_ + .getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1) + .getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); + l += (i2 & 16711680) >> 16; + i1 += (i2 & 65280) >> 8; + j1 += i2 & 255; + } + } - @Override - public int getTooltipID() { - return 3; - } + return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; + } + @Override + public int getTooltipID() { + return 3; + } } |