diff --git a/src/minecraft/biomesoplenty/ClientProxy.java b/src/minecraft/biomesoplenty/ClientProxy.java index 4f832802b..15a82151e 100644 --- a/src/minecraft/biomesoplenty/ClientProxy.java +++ b/src/minecraft/biomesoplenty/ClientProxy.java @@ -1,5 +1,7 @@ package biomesoplenty; +import biomesoplenty.blocks.renderers.FoliageRenderer; +import biomesoplenty.blocks.renderers.PlantsRenderer; import biomesoplenty.configuration.BOPItems; import biomesoplenty.items.projectiles.EntityMudball; @@ -24,6 +26,9 @@ public class ClientProxy extends CommonProxy { MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST2_PNG); RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(BOPItems.mudBall)); + + RenderingRegistry.registerBlockHandler(new FoliageRenderer()); + RenderingRegistry.registerBlockHandler(new PlantsRenderer()); } @Override diff --git a/src/minecraft/biomesoplenty/api/Blocks.java b/src/minecraft/biomesoplenty/api/Blocks.java index 8dc446367..53b161f8b 100644 --- a/src/minecraft/biomesoplenty/api/Blocks.java +++ b/src/minecraft/biomesoplenty/api/Blocks.java @@ -53,6 +53,13 @@ public class Blocks public static Optional leavesColorized = Optional.absent(); public static Optional foliage = Optional.absent(); public static Optional plants = Optional.absent(); + public static Optional flatPlants = Optional.absent(); public static Optional saplings = Optional.absent(); public static Optional colorizedSaplings = Optional.absent(); + public static Optional willow = Optional.absent(); + public static Optional treeMoss = Optional.absent(); + public static Optional moss = Optional.absent(); + public static Optional petals = Optional.absent(); + + public static Optional decorativeBlocks = Optional.absent(); } diff --git a/src/minecraft/biomesoplenty/blocks/BlockAlgae.java b/src/minecraft/biomesoplenty/blocks/BlockAlgae.java index 9e334f86b..0c234e201 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockAlgae.java +++ b/src/minecraft/biomesoplenty/blocks/BlockAlgae.java @@ -12,6 +12,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; +@Deprecated public class BlockAlgae extends BlockFlower { public BlockAlgae(int par1) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java index 9f2c90b3c..b61eb3f39 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -30,6 +31,9 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab super(blockID, Material.leaves, false); setBurnProperties(this.blockID, 30, 60); this.setTickRandomly(true); + setHardness(0.2F); + setLightOpacity(1); + setStepSound(Block.soundGrassFootstep); this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); } @@ -111,7 +115,7 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab @Override public int damageDropped(int meta) { - return meta & textures[0].length; + return meta & 15; } @Override diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java index dbdf10282..b8e06ee52 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java @@ -3,6 +3,7 @@ package biomesoplenty.blocks; import java.util.List; import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.blocks.renderers.FoliageRenderer; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; @@ -20,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPFlower extends BlockFlower { - private static final String[] plants = new String[] {"swampflower", "deadbloom", "glowflower", "hydrangea", "orangeflower", "pinkflower", "purpleflower", "violet", "whiteflower", "toadstool", "cactus"}; + private static final String[] plants = new String[] {"tinyflower", "swampflower", "deadbloom", "glowflower", "hydrangea", "orangeflower", "pinkflower", "purpleflower", "violet", "whiteflower", "toadstool", "cactus"}; @SideOnly(Side.CLIENT) private Icon[] textures; @@ -58,21 +59,42 @@ public class BlockBOPFlower extends BlockFlower return textures[meta]; } + public int getRenderType () + { + return FoliageRenderer.render; + } + @Override public int getLightValue(IBlockAccess world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); - if (meta == 2) + if (meta == 3) return 9; else return 0; } + public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4) + { + int meta = world.getBlockMetadata(par2, par3, par4); + + switch (meta) + { + case 0: + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.015625F, 1.0F); + break; + + default: + this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F); + break; + } + } + @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { int meta = world.getBlockMetadata(x, y, z); - if (meta == 10) + if (meta == 11) entity.attackEntityFrom(DamageSource.cactus, 1); } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java index 3e3a5ae50..62675e977 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Random; import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.blocks.renderers.FoliageRenderer; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; @@ -24,10 +25,14 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPFoliage extends BlockFlower implements IShearable { - private static final String[] foliageTypes = new String[] {"shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop"}; + @SideOnly(Side.CLIENT) private Icon[] textures; + private static final int GRASSTOP = 6; + private static final int ALGAE = 0; + private static final int GRASSBOTTOM = 1; public BlockBOPFoliage(int blockID) { @@ -56,7 +61,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable { if (meta >= textures.length) meta = 0; - + return textures[meta]; } @@ -64,7 +69,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable @SideOnly(Side.CLIENT) public void getSubBlocks(int blockID, CreativeTabs par2CreativeTabs, List list) { - for (int i = 0; i < textures.length-1; ++i) + for (int i = 0; i < GRASSTOP; ++i) list.add(new ItemStack(blockID, 1, i)); } @@ -76,7 +81,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable protected boolean canThisPlantGrowOnThisBlockID(int blockID, int metadata) { - if (metadata == 5) + if (metadata == GRASSTOP) return blockID == this.blockID; else return blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.tilledField.blockID; @@ -111,6 +116,11 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable return ColorizerFoliage.getFoliageColorBasic(); } + public int getRenderType () + { + return FoliageRenderer.render; + } + @Override @SideOnly(Side.CLIENT) public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) @@ -122,8 +132,8 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable public int getDamageValue(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); - if (meta == 5) - meta = 2; + if (meta == GRASSTOP) + meta = GRASSBOTTOM; return meta; } @@ -133,6 +143,30 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable return -1; } + public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4) + { + int meta = world.getBlockMetadata(par2, par3, par4); + + switch (meta) + { + case GRASSTOP: + this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F); + break; + + case GRASSBOTTOM: + this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1.9F, 0.9F); + break; + + case ALGAE: + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.015625F, 1.0F); + break; + + default: + this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F); + break; + } + } + @Override public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) { @@ -148,8 +182,6 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable @Override public boolean isShearable(ItemStack item, World world, int x, int y, int z) { - if (world.getBlockMetadata(x, y, z) == 5) - return false; return true; } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java index 1b3781b41..953798fd3 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java @@ -12,6 +12,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -32,6 +33,9 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable super(blockID, Material.leaves, false); setBurnProperties(this.blockID, 30, 60); this.setTickRandomly(true); + setHardness(0.2F); + setLightOpacity(1); + setStepSound(Block.soundGrassFootstep); this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); } @@ -74,7 +78,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable @Override public int damageDropped(int meta) { - return meta & textures[0].length; + return meta & 15; } @Override diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java index c47cb4e73..d1afba096 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java @@ -24,7 +24,7 @@ public class BlockBOPLog extends Block private static final String[] woodTypes = new String[] {"acacia", "cherry", "dark", "fir", "holy", "magic", "mangrove", "palm", "redwood", "willow", "dead"}; @SideOnly(Side.CLIENT) private Icon[] textures; - private Icon logHeart; + private Icon[] logHearts; private final LogCategory category; @@ -44,11 +44,13 @@ public class BlockBOPLog extends Block public void registerIcons(IconRegister iconRegister) { textures = new Icon[woodTypes.length]; - - logHeart = iconRegister.registerIcon("BiomesOPlenty:logTopBottum"); - + logHearts = new Icon[woodTypes.length]; + for (int i = 0; i < woodTypes.length; ++i) + { textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+woodTypes[i]+"log"); + logHearts[i] = iconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + } } @Override @@ -57,7 +59,7 @@ public class BlockBOPLog extends Block { int pos = meta & 12; if (pos == 0 && (side == 1 || side == 0) || pos == 4 && (side == 5 || side == 4) || pos == 8 && (side == 2 || side == 3)) - return logHeart; + return logHearts[(getTypeFromMeta(meta) + this.category.ordinal() * 4)]; return textures[(getTypeFromMeta(meta) + this.category.ordinal() * 4)]; } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java new file mode 100644 index 000000000..e287bcf35 --- /dev/null +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java @@ -0,0 +1,99 @@ +package biomesoplenty.blocks; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.api.Blocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLeavesBase; +import net.minecraft.block.material.Material; +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.World; +import net.minecraftforge.common.IShearable; + +public class BlockBOPPetals extends BlockLeavesBase implements IShearable +{ + private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"}; + @SideOnly(Side.CLIENT) + private Icon[] textures; + + public BlockBOPPetals(int blockID) + { + super(blockID, Material.leaves, false); + setBurnProperties(this.blockID, 30, 60); + this.setTickRandomly(true); + setHardness(0.2F); + setLightOpacity(1); + setStepSound(Block.soundGrassFootstep); + this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[petals.length]; + + for (int i = 0; i < petals.length; ++i) + textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + petals[i]); + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + { + if (meta < 0 || meta >= textures.length) + meta = 0; + + return textures[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { + for (int i = 0; i < textures.length; ++i) + list.add(new ItemStack(blockID, 1, i)); + } + + @Override + public int idDropped(int par1, Random par2Random, int par3) + { + if (par1 == 0) + return Block.plantRed.blockID; + else + return Block.plantYellow.blockID; + } + + @Override + public int damageDropped(int meta) + { + return meta & 15; + } + + @Override + public int quantityDropped(Random random) + { + return random.nextInt(20) == 0 ? 1 : 0; + } + + @Override + public boolean isShearable(ItemStack item, World world, int x, int y, int z) + { + return true; + } + + @Override + public ArrayList onSheared(ItemStack item, World world, int x, int y, int z, int fortune) + { + ArrayList ret = new ArrayList(); + ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 15)); + return ret; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java index e6fc27663..460ffd5bc 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java @@ -4,13 +4,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import biomesoplenty.mod_BiomesOPlenty; -import biomesoplenty.configuration.BOPBlocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - - import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; @@ -21,12 +14,18 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.util.Icon; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; +import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.blocks.renderers.PlantsRenderer; +import biomesoplenty.configuration.BOPBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPPlant extends BlockFlower implements IShearable { - private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn"}; + private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail"}; @SideOnly(Side.CLIENT) private Icon[] textures; @@ -62,6 +61,28 @@ public class BlockBOPPlant extends BlockFlower implements IShearable return textures[meta]; } + public int getRenderType () + { + return PlantsRenderer.render; + } + + public void setBlockBoundsBasedOnState(IBlockAccess world, int par2, int par3, int par4) + { + int meta = world.getBlockMetadata(par2, par3, par4); + + switch (meta) + { + case 6: + case 7: + this.setBlockBounds(0.125F, 0.0F, 0.125F, 0.875F, 1.00F, 0.875F); + break; + + default: + this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F); + break; + } + } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java b/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java new file mode 100644 index 000000000..70d866422 --- /dev/null +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java @@ -0,0 +1,6 @@ +package biomesoplenty.blocks; + +public class BlockBOPVines +{ + +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockBarley.java b/src/minecraft/biomesoplenty/blocks/BlockBarley.java index 760f9b32c..4e21ed36b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBarley.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBarley.java @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +@Deprecated public class BlockBarley extends Block { protected BlockBarley(int par1, Material par3Material) diff --git a/src/minecraft/biomesoplenty/blocks/BlockCattail.java b/src/minecraft/biomesoplenty/blocks/BlockCattail.java index e23cea55a..8a4781c5b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockCattail.java +++ b/src/minecraft/biomesoplenty/blocks/BlockCattail.java @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +@Deprecated public class BlockCattail extends Block { public BlockCattail(int par1) diff --git a/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerRed.java b/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerRed.java index 56e9e858d..c3d0b72e4 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerRed.java +++ b/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerRed.java @@ -11,6 +11,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.world.World; +@Deprecated public class BlockGiantFlowerRed extends BlockLeavesBase { /** diff --git a/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerYellow.java b/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerYellow.java index 8e000caa2..88aa3e0e5 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerYellow.java +++ b/src/minecraft/biomesoplenty/blocks/BlockGiantFlowerYellow.java @@ -11,6 +11,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.world.World; +@Deprecated public class BlockGiantFlowerYellow extends BlockLeavesBase { /** diff --git a/src/minecraft/biomesoplenty/blocks/BlockTinyFlower.java b/src/minecraft/biomesoplenty/blocks/BlockTinyFlower.java index c545a7f2d..475d30735 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockTinyFlower.java +++ b/src/minecraft/biomesoplenty/blocks/BlockTinyFlower.java @@ -11,6 +11,7 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +@Deprecated public class BlockTinyFlower extends Block { protected BlockTinyFlower(int par1, Material par3Material) diff --git a/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java b/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java new file mode 100644 index 000000000..6fe9b2158 --- /dev/null +++ b/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java @@ -0,0 +1,44 @@ +package biomesoplenty.blocks.renderers; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; + +public class FoliageRenderer implements ISimpleBlockRenderingHandler +{ + public static int render = RenderingRegistry.getNextAvailableRenderId(); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) + { + // Doesn't render in inventory + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) + { + if (modelId == render) + { + int meta = world.getBlockMetadata(x, y, z); + if (meta == 0) + return renderer.renderBlockLilyPad(block, x, y, z); + else + return renderer.renderCrossedSquares(block, x, y, z); + } + return true; + } + + @Override + public boolean shouldRender3DInInventory() + { + return false; + } + + @Override + public int getRenderId() + { + return render; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java b/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java new file mode 100644 index 000000000..d8f0f0c12 --- /dev/null +++ b/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java @@ -0,0 +1,44 @@ +package biomesoplenty.blocks.renderers; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; + +public class PlantsRenderer implements ISimpleBlockRenderingHandler +{ + public static int render = RenderingRegistry.getNextAvailableRenderId(); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) + { + // Doesn't render in inventory + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) + { + if (modelId == render) + { + int meta = world.getBlockMetadata(x, y, z); + if (meta > 5) + return renderer.renderBlockCrops(block, x, y, z); + else + return renderer.renderCrossedSquares(block, x, y, z); + } + return true; + } + + @Override + public boolean shouldRender3DInInventory() + { + return false; + } + + @Override + public int getRenderId() + { + return render; + } +} diff --git a/src/minecraft/biomesoplenty/configuration/BOPBlocks.java b/src/minecraft/biomesoplenty/configuration/BOPBlocks.java index 5bc1365a0..d82d9a3f3 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPBlocks.java +++ b/src/minecraft/biomesoplenty/configuration/BOPBlocks.java @@ -11,6 +11,7 @@ import biomesoplenty.items.ItemBOPFlower; import biomesoplenty.items.ItemBOPFoliage; import biomesoplenty.items.ItemBOPLeaves; import biomesoplenty.items.ItemBOPLog; +import biomesoplenty.items.ItemBOPPetals; import biomesoplenty.items.ItemBOPPlank; import biomesoplenty.items.ItemBOPPlant; import biomesoplenty.items.ItemBOPSlab; @@ -31,178 +32,178 @@ import cpw.mods.fml.common.registry.LanguageRegistry; public class BOPBlocks { // Block declaration - public static Block mud; - public static Block driedDirt; - public static Block redRock; - public static Block ash; - public static Block deadGrass; - public static Block desertGrass; - public static Block whiteFlower; - public static Block blueFlower; - public static Block purpleFlower; - public static Block orangeFlower; - public static Block tinyFlower; - public static Block glowFlower; - public static Block cattail; - public static Block willow; - public static Block autumnLeaves; - public static Block thorn; - public static Block toadstool; - public static BlockHighGrassBottom highGrassBottom; - public static BlockHighGrassTop highGrassTop; - public static Block ashStone; - public static Block hardIce; - public static Block redLeaves; - public static Block orangeLeaves; - public static Block pinkLeaves; - public static Block blueLeaves; - public static Block whiteLeaves; - public static Block deadLeaves; - public static BlockShortGrass shortGrass; + public static Block mud; // Worldgen + public static Block driedDirt; // Worldgen + public static Block redRock; // Worldgen + public static Block ash; // Worldgen + public static Block deadGrass; // DONE + public static Block desertGrass; // DONE + public static Block whiteFlower; // DONE + public static Block blueFlower; // DONE + public static Block purpleFlower; // DONE + public static Block orangeFlower; // DONE + public static Block tinyFlower; // DONE + public static Block glowFlower; // DONE + public static Block cattail; // DONE + public static Block willow; // Leave + public static Block autumnLeaves; // DONE + public static Block thorn; // DONE + public static Block toadstool; // DONE + public static BlockHighGrassBottom highGrassBottom; // DONE + public static BlockHighGrassTop highGrassTop; // DONE + public static Block ashStone; // Worldgen + public static Block hardIce; // DONE + public static Block redLeaves; // DONE + public static Block orangeLeaves; // DONE + public static Block pinkLeaves; // DONE + public static Block blueLeaves; // DONE + public static Block whiteLeaves; // DONE + public static Block deadLeaves; // DONE + public static BlockShortGrass shortGrass; // DONE public static Block appleLeaves; - public static BlockSprout sprout; - public static BlockBush bush; + public static BlockSprout sprout; // DONE + public static BlockBush bush; // DONE public static Block bamboo; - public static Block bambooLeaves; + public static Block bambooLeaves; // DONE public static Block mudBrickBlock; - public static BlockHalfSlab mudBrickDoubleSlab; - public static BlockHalfSlab mudBrickSingleSlab; + public static BlockHalfSlab mudBrickDoubleSlab; // DONE + public static BlockHalfSlab mudBrickSingleSlab; // DONE public static Block mudBrickStairs; - public static Block originGrass; - public static Block originLeaves; - public static Block pinkFlower; - public static Block treeMoss; - public static Block deadWood; + public static Block originGrass; // Worldgen + public static Block originLeaves; // DONE + public static Block pinkFlower; // DONE + public static Block treeMoss; // Leave + public static Block deadWood; // DONE public static Block appleLeavesFruitless; - public static Block barley; + public static Block barley; // DONE public static Block giantFlowerStem; - public static Block giantFlowerRed; - public static Block giantFlowerYellow; - public static Block tinyCactus; - public static Block firSapling; - public static Block redwoodSapling; - public static Block palmSapling; - public static Block redSapling; - public static Block orangeSapling; - public static Block yellowSapling; - public static Block brownSapling; - public static Block willowSapling; - public static Block appleSapling; - public static Block originSapling; - public static Block pinkSapling; - public static Block whiteSapling; - public static Block darkSapling; - public static Block magicSapling; - public static Block deathbloom; + public static Block giantFlowerRed; // DONE + public static Block giantFlowerYellow; // DONE + public static Block tinyCactus; // DONE + public static Block firSapling; // DONE + public static Block redwoodSapling; // DONE + public static Block palmSapling; // DONE + public static Block redSapling; // DONE + public static Block orangeSapling; // DONE + public static Block yellowSapling; // DONE + public static Block brownSapling; // DONE + public static Block willowSapling; // DONE + public static Block appleSapling; + public static Block originSapling; // DONE + public static Block pinkSapling; // DONE + public static Block whiteSapling; // DONE + public static Block darkSapling; // DONE + public static Block magicSapling; // DONE + public static Block deathbloom; // DONE public static Block redRockCobble; - public static BlockHalfSlab redRockCobbleDoubleSlab; - public static BlockHalfSlab redRockCobbleSingleSlab; + public static BlockHalfSlab redRockCobbleDoubleSlab; // DONE + public static BlockHalfSlab redRockCobbleSingleSlab; // DONE public static Block redRockCobbleStairs; public static Block redRockBrick; - public static BlockHalfSlab redRockBrickDoubleSlab; - public static BlockHalfSlab redRockBrickSingleSlab; + public static BlockHalfSlab redRockBrickDoubleSlab; // DONE + public static BlockHalfSlab redRockBrickSingleSlab; // DONE public static Block redRockBrickStairs; - public static Block hydrangea; - public static Block violet; - public static BlockMediumGrass mediumGrass; - public static Block duneGrass; - public static Block desertSprouts; - public static Block mangroveSapling; - public static Block hardSand; - public static Block acaciaSapling; - public static Block hardDirt; - public static Block holyGrass; - public static Block holyStone; - public static Block holyTallGrass; - public static Block promisedPortal; - public static Block holySapling; + public static Block hydrangea; // DONE + public static Block violet; // DONE + public static BlockMediumGrass mediumGrass; // DONE + public static Block duneGrass; // DONE + public static Block desertSprouts; // DONE + public static Block mangroveSapling; // DONE + public static Block hardSand; // Worldgen + public static Block acaciaSapling; // DONE + public static Block hardDirt; // Worldgen + public static Block holyGrass; // Worldgen + public static Block holyStone; // Worldgen + public static Block holyTallGrass; // DONE + public static Block promisedPortal; // Leave + public static Block holySapling; // DONE public static Block amethystOre; public static Block amethystBlock; public static Block bambooThatching; - public static Block moss; - public static Block algae; + public static Block moss; // Leave + public static Block algae; // DONE public static Block smolderingGrass; - public static Block cragRock; + public static Block cragRock; // Worldgen public static Block quicksand; - public static Block bambooSapling; + public static Block bambooSapling; // DONE //Redwood - public static Block redwoodPlank; - public static Block redwoodWood; - public static Block redwoodLeaves; - public static BlockHalfSlab redwoodDoubleSlab; - public static BlockHalfSlab redwoodSingleSlab; - public static Block redwoodStairs; + public static Block redwoodPlank; // DONE + public static Block redwoodWood; // DONE + public static Block redwoodLeaves; // DONE + public static BlockHalfSlab redwoodDoubleSlab; // DONE + public static BlockHalfSlab redwoodSingleSlab; // DONE + public static Block redwoodStairs; // DONE //Willow - public static Block willowPlank; - public static Block willowWood; - public static Block willowLeaves; - public static BlockHalfSlab willowDoubleSlab; - public static BlockHalfSlab willowSingleSlab; - public static Block willowStairs; + public static Block willowPlank; // DONE + public static Block willowWood; // DONE + public static Block willowLeaves; // DONE + public static BlockHalfSlab willowDoubleSlab; // DONE + public static BlockHalfSlab willowSingleSlab; // DONE + public static Block willowStairs; // DONE //Fir - public static Block firPlank; - public static Block firWood; - public static Block firLeaves; - public static BlockHalfSlab firDoubleSlab; - public static BlockHalfSlab firSingleSlab; - public static Block firStairs; + public static Block firPlank; // DONE + public static Block firWood; // DONE + public static Block firLeaves; // DONE + public static BlockHalfSlab firDoubleSlab; // DONE + public static BlockHalfSlab firSingleSlab; // DONE + public static Block firStairs; // DONE //Acacia - public static Block acaciaPlank; - public static Block acaciaWood; - public static Block acaciaLeaves; - public static BlockHalfSlab acaciaDoubleSlab; - public static BlockHalfSlab acaciaSingleSlab; - public static Block acaciaStairs; + public static Block acaciaPlank; // DONE + public static Block acaciaWood; // DONE + public static Block acaciaLeaves; // DONE + public static BlockHalfSlab acaciaDoubleSlab; // DONE + public static BlockHalfSlab acaciaSingleSlab; // DONE + public static Block acaciaStairs; // DONE //Cherry - public static Block cherryPlank; - public static Block cherryWood; - public static BlockHalfSlab cherryDoubleSlab; - public static BlockHalfSlab cherrySingleSlab; - public static Block cherryStairs; + public static Block cherryPlank; // DONE + public static Block cherryWood; // DONE + public static BlockHalfSlab cherryDoubleSlab; // DONE + public static BlockHalfSlab cherrySingleSlab; // DONE + public static Block cherryStairs; // DONE //Dark - public static Block darkPlank; - public static Block darkWood; - public static Block darkLeaves; - public static BlockHalfSlab darkDoubleSlab; - public static BlockHalfSlab darkSingleSlab; - public static Block darkStairs; + public static Block darkPlank; // DONE + public static Block darkWood; // DONE + public static Block darkLeaves; // DONE + public static BlockHalfSlab darkDoubleSlab; // DONE + public static BlockHalfSlab darkSingleSlab; // DONE + public static Block darkStairs; // DONE //Magic - public static Block magicPlank; - public static Block magicWood; - public static BlockHalfSlab magicDoubleSlab; - public static BlockHalfSlab magicSingleSlab; - public static Block magicStairs; + public static Block magicPlank; // DONE + public static Block magicWood; // DONE + public static BlockHalfSlab magicDoubleSlab; // DONE + public static BlockHalfSlab magicSingleSlab; // DONE + public static Block magicStairs; // DONE //Palm - public static Block palmPlank; - public static Block palmWood; - public static Block palmLeaves; - public static BlockHalfSlab palmDoubleSlab; - public static BlockHalfSlab palmSingleSlab; - public static Block palmStairs; + public static Block palmPlank; // DONE + public static Block palmWood; // DONE + public static Block palmLeaves; // DONE + public static BlockHalfSlab palmDoubleSlab; // DONE + public static BlockHalfSlab palmSingleSlab; // DONE + public static Block palmStairs; // DONE //Mangrove - public static Block mangrovePlank; - public static Block mangroveWood; - public static Block mangroveLeaves; - public static BlockHalfSlab mangroveDoubleSlab; - public static BlockHalfSlab mangroveSingleSlab; - public static Block mangroveStairs; + public static Block mangrovePlank; // DONE + public static Block mangroveWood; // DONE + public static Block mangroveLeaves; // DONE + public static BlockHalfSlab mangroveDoubleSlab; // DONE + public static BlockHalfSlab mangroveSingleSlab; // DONE + public static Block mangroveStairs; // DONE //Holy - public static Block holyPlank; - public static Block holyWood; - public static Block holyLeaves; - public static BlockHalfSlab holyDoubleSlab; - public static BlockHalfSlab holySingleSlab; - public static Block holyStairs; + public static Block holyPlank; // DONE + public static Block holyWood; // DONE + public static Block holyLeaves; // DONE + public static BlockHalfSlab holyDoubleSlab; // DONE + public static BlockHalfSlab holySingleSlab; // DONE + public static Block holyStairs; // DONE public static void init() { @@ -488,20 +489,21 @@ public class BOPBlocks { Blocks.flowers = Optional.of((new BlockBOPFlower(2002)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("flowers")); GameRegistry.registerBlock(Blocks.flowers.get(), ItemBOPFlower.class, "flowers"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,0), "Swampflower"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,1), "Deathbloom"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,2), "Glowflower"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,3), "Hydrangea"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,4), "Daisy"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,5), "Tulip"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,6), "Wildflower"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,7), "Violet"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,8), "Anemone"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,9), "Toadstool"); - LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,10), "Tiny Cactus"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,0), "Clover"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,1), "Swampflower"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,2), "Deathbloom"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,3), "Glowflower"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,4), "Hydrangea"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,5), "Daisy"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,6), "Tulip"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,7), "Wildflower"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,8), "Violet"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,9), "Anemone"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,10), "Toadstool"); + LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,11), "Tiny Cactus"); // Leaves - WORKING! - Blocks.leaves = Optional.of((new BlockBOPLeaves(2000)).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("leaves")); + Blocks.leaves = Optional.of((new BlockBOPLeaves(2000)).setUnlocalizedName("leaves")); GameRegistry.registerBlock(Blocks.leaves.get(), ItemBOPLeaves.class, "leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves.get(),1,0), "Autumn Leaves"); @@ -517,7 +519,7 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.leaves.get(),1,10), "Maple Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves.get(),1,11), "Cherry Leaves"); - Blocks.leavesColorized = Optional.of((new BlockBOPColorizedLeaves(2001)).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("leavesColorized")); + Blocks.leavesColorized = Optional.of((new BlockBOPColorizedLeaves(2001)).setUnlocalizedName("leavesColorized")); GameRegistry.registerBlock(Blocks.leavesColorized.get(), ItemBOPColorizedLeaves.class, "leavesColorized"); LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,0), "Acacia Leaves"); @@ -552,11 +554,12 @@ public class BOPBlocks { Blocks.foliage = Optional.of((new BlockBOPFoliage(1988)).setUnlocalizedName("foliage")); GameRegistry.registerBlock(Blocks.foliage.get(), ItemBOPFoliage.class, "foliage"); - LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,0), "Short Grass"); - LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,1), "Medium Grass"); - LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,2), "High Grass"); - LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,3), "Bush"); - LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,4), "Sprout"); + LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,1), "Short Grass"); + LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,2), "Medium Grass"); + LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,3), "High Grass"); + LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,4), "Bush"); + LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,5), "Sprout"); + LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,0), "Algae"); // Plants - Semi working Blocks.plants = Optional.of((new BlockBOPPlant(1987)).setUnlocalizedName("plants")); @@ -568,6 +571,8 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,3), "Dune Grass"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,4), "Holy Tall Grass"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,5), "Thorns"); + LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,6), "Barley"); + LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,7), "Cattail"); // Saplings - WORKING! Blocks.saplings = Optional.of((new BlockBOPSapling(1986)).setUnlocalizedName("saplings")); @@ -594,7 +599,14 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,2), "Palm Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,3), "Redwood Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,4), "Willow Sapling"); + + Blocks.petals = Optional.of((new BlockBOPPetals(2084)).setUnlocalizedName("petals")); + GameRegistry.registerBlock(Blocks.petals.get(), ItemBOPPetals.class, "petals"); + + LanguageRegistry.addName(new ItemStack(Blocks.petals.get(),1,0), "Giant Red Flower"); + LanguageRegistry.addName(new ItemStack(Blocks.petals.get(),1,1), "Giant Yellow Flower"); */ + // Add block registration GameRegistry.registerBlock(mud, "mud"); GameRegistry.registerBlock(driedDirt, "driedDirt"); diff --git a/src/minecraft/biomesoplenty/items/ItemBOPFlower.java b/src/minecraft/biomesoplenty/items/ItemBOPFlower.java index 4cada6e5d..d46061c72 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPFlower.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPFlower.java @@ -7,7 +7,7 @@ import net.minecraft.util.Icon; public class ItemBOPFlower extends ItemBlock { - private static final String[] plants = new String[] {"swampflower", "deadbloom", "glowflower", "hydrangea", "orangeflower", "pinkflower", "purpleflower", "violet", "whiteflower", "toadstool", "cactus"}; + private static final String[] plants = new String[] {"tinyflower", "swampflower", "deadbloom", "glowflower", "hydrangea", "orangeflower", "pinkflower", "purpleflower", "violet", "whiteflower", "toadstool", "cactus"}; public ItemBOPFlower(int par1) { diff --git a/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java b/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java index 1313aa12c..ca27b1a4e 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java @@ -12,7 +12,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ItemBOPFoliage extends ItemBlock { - private static final String[] foliageTypes = new String[] {"shortgrass", "mediumgrass", "highgrass", "bush", "sprout", "highgrasstop"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrass", "bush", "sprout", "highgrasstop"}; @SideOnly(Side.CLIENT) private Icon[] textures; @@ -47,15 +47,15 @@ public class ItemBOPFoliage extends ItemBlock @Override public Icon getIconFromDamage(int meta) { - if (meta == 5) - meta = 2; + if (meta == 6) + meta = 3; return textures[meta]; } public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (itemStack.getItemDamage() != 2) + if (itemStack.getItemDamage() != 3) { return super.onItemUse(itemStack, player, world, x, y, z, side, hitX, hitY, hitZ); } @@ -67,8 +67,8 @@ public class ItemBOPFoliage extends ItemBlock return false; else if (world.getBlockMaterial(x, y, z).isReplaceable() && world.getBlockMaterial(x, y + 1, z).isReplaceable()) { - world.setBlock(x, y, z, itemStack.itemID, 2, 2); - world.setBlock(x, y + 1, z, itemStack.itemID, 5, 2); + world.setBlock(x, y, z, itemStack.itemID, 3, 2); + world.setBlock(x, y + 1, z, itemStack.itemID, 6, 2); world.notifyBlocksOfNeighborChange(x, y, z, itemStack.itemID); world.notifyBlocksOfNeighborChange(x, y + 1, z, itemStack.itemID); Block block = Block.blocksList[itemStack.itemID]; diff --git a/src/minecraft/biomesoplenty/items/ItemBOPPetals.java b/src/minecraft/biomesoplenty/items/ItemBOPPetals.java new file mode 100644 index 000000000..bd172f3b2 --- /dev/null +++ b/src/minecraft/biomesoplenty/items/ItemBOPPetals.java @@ -0,0 +1,28 @@ +package biomesoplenty.items; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +public class ItemBOPPetals extends ItemBlock +{ + private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"}; + + public ItemBOPPetals(int par1) + { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + @Override + public int getMetadata(int meta) + { + return meta & 15; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + return (new StringBuilder()).append(petals[itemStack.getItemDamage()]).toString(); + } +} \ No newline at end of file diff --git a/src/minecraft/biomesoplenty/items/ItemBOPPlant.java b/src/minecraft/biomesoplenty/items/ItemBOPPlant.java index 3a869405a..b0324bf26 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPPlant.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPPlant.java @@ -7,7 +7,7 @@ import net.minecraft.util.Icon; public class ItemBOPPlant extends ItemBlock { - private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn"}; + private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail"}; public ItemBOPPlant(int par1) { diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/itemalgae.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/itemalgae.png new file mode 100644 index 000000000..99792326d Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/itemalgae.png differ