From e9abae1e5c2ac720bba0c839a9b8ff092988a654 Mon Sep 17 00:00:00 2001 From: Amnet Date: Sat, 20 Apr 2013 05:21:46 +0200 Subject: [PATCH] Fixed the bounding boxes for high grass and rendering of the leaves. --- .../biomesoplenty/blocks/BlockBOPAppleLeaves.java | 12 ++++++++++++ .../blocks/BlockBOPColorizedLeaves.java | 11 +++++++++++ .../biomesoplenty/blocks/BlockBOPFoliage.java | 2 +- .../biomesoplenty/blocks/BlockBOPLeaves.java | 12 ++++++++++++ .../biomesoplenty/worldgen/WorldGenDeadTree.java | 4 ++-- .../biomesoplenty/worldgen/WorldGenDeadTree3.java | 4 ++-- 6 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java index f9aa1f2fa..17de21b6e 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java @@ -18,6 +18,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; @@ -133,4 +134,15 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable ret.add(new ItemStack(this, 1, 0)); return ret; } + + @SideOnly(Side.CLIENT) + public void setGraphicsLevel(boolean par1) + { + this.graphicsLevel = par1; + } + + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return true; + } } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java index 5669ce8e3..f73cce77c 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java @@ -144,4 +144,15 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab { return meta & 7; } + + @SideOnly(Side.CLIENT) + public void setGraphicsLevel(boolean par1) + { + this.graphicsLevel = par1; + } + + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return true; + } } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java index 80db29fe2..7a0a03a44 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java @@ -32,7 +32,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable private static final int GRASSTOP = 6; private static final int ALGAE = 0; - private static final int GRASSBOTTOM = 1; + private static final int GRASSBOTTOM = 3; public BlockBOPFoliage(int blockID) { diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java index 6a8cf5916..9ba6b1d76 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java @@ -11,6 +11,7 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; @@ -117,4 +118,15 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable { return meta & 7; } + + @SideOnly(Side.CLIENT) + public void setGraphicsLevel(boolean par1) + { + this.graphicsLevel = par1; + } + + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return true; + } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree.java b/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree.java index 0a678cf0b..1dbf83ed9 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree.java @@ -289,11 +289,11 @@ public class WorldGenDeadTree extends WorldGenerator { if (var18 == var20) { - var17 = 4; + var17 = 6; } else if (var19 == var20) { - var17 = 8; + var17 = 10; } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree3.java b/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree3.java index e6ebe4704..f0884dfcf 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree3.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenDeadTree3.java @@ -289,11 +289,11 @@ public class WorldGenDeadTree3 extends WorldGenerator { if (var18 == var20) { - var17 = 4; + var17 = 6; } else if (var19 == var20) { - var17 = 8; + var17 = 10; } }