Finished all Blocks

This commit is contained in:
Arcaratus committed 2015-07-29 14:35:00 -04:00
1 parent e5abfd03e5
commit 419f532502
45 files changed
+478 -1293

No files matched your search

@@ -1,15 +1,10 @@
package WayofTime.alchemicalWizardry.common.block;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -18,7 +13,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import java.util.Random;
@@ -71,16 +65,16 @@ public class BlockFilledSocket extends BlockContainer
}
@Override
public void breakBlock(World world, BlockPos blockPos, Block par5, int par6)
public void breakBlock(World world, BlockPos blockPos, IBlockState blockState)
{
dropItems(world, x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
dropItems(world, blockPos);
super.breakBlock(world, blockPos, blockState);
}
private void dropItems(World world, int x, int y, int z)
private void dropItems(World world, BlockPos blockPos)
{
Random rand = new Random();
TileEntity tileEntity = world.getTileEntity(x, y, z);
TileEntity tileEntity = world.getTileEntity(blockPos);
if (!(tileEntity instanceof IInventory))
{
@@ -98,7 +92,7 @@ public class BlockFilledSocket extends BlockContainer
float rx = rand.nextFloat() * 0.8F + 0.1F;
float ry = rand.nextFloat() * 0.8F + 0.1F;
float rz = rand.nextFloat() * 0.8F + 0.1F;
EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
if (item.hasTagCompound())
{