Fixed non-armour and non-sigil items

This commit is contained in:
WayofTime 2015-07-30 08:44:01 -04:00
parent 8241c3cbd1
commit 9e2c0e6e74
72 changed files with 483 additions and 1411 deletions

View file

@ -3,11 +3,14 @@ package WayofTime.alchemicalWizardry.common.items;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
@ -77,17 +80,14 @@ public class ItemBlockCrystalBelljar extends ItemBlock
}
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState)
{
if (!world.setBlock(x, y, z, field_150939_a, metadata, 3))
{
return false;
}
if (!world.setBlockState(pos, newState, 3)) return false;
if (world.getBlock(x, y, z) == field_150939_a)
IBlockState state = world.getBlockState(pos);
if (state.getBlock() == this.block)
{
field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack);
field_150939_a.onPostBlockPlaced(world, x, y, z, metadata);
this.block.onBlockPlacedBy(world, pos, state, player, stack);
}
return true;