From ae3e2ccf0cee7a9209e07906f43a4423c5321f26 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 7 Sep 2013 10:33:53 +1000 Subject: [PATCH] Let's do things right Mr. Stride --- .../biomesoplenty/blocks/BlockBOPPlant.java | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java index d5d8cbb00..17d3cf731 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java @@ -4,8 +4,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -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; @@ -13,10 +11,7 @@ import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.util.Icon; @@ -27,6 +22,8 @@ import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; import biomesoplenty.api.Items; import biomesoplenty.blocks.renderers.RenderUtils; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPPlant extends BlockFlower implements IShearable { @@ -344,15 +341,27 @@ public class BlockBOPPlant extends BlockFlower implements IShearable super.harvestBlock(world, player, x, y, z, meta); } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) { if (meta == 13) { - for (int i = 0; i < 20; i++) - { - world.spawnParticle("smoke", x + 0.5, y + 0.5F, z + 0.5, 0.0D, 0.0D, 0.0D); - } + byte b0 = 4; + + for (int j1 = 0; j1 < b0; ++j1) + { + for (int k1 = 0; k1 < b0; ++k1) + { + for (int l1 = 0; l1 < b0; ++l1) + { + double d0 = (double)x + ((double)j1 + 0.5D) / (double)b0; + double d1 = (double)y + ((double)k1 + 0.5D) / (double)b0; + double d2 = (double)z + ((double)l1 + 0.5D) / (double)b0; + world.spawnParticle("smoke", d0, d1, d2, d0 - (double)x - 0.5D, d1 - (double)y - 0.5D, d2 - (double)z - 0.5D); + } + } + } } return false;