mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Fix item package
This commit is contained in:
1 parent
591fc1e4b4
commit
8af7ec270a
53 files changed
+309
-397
No files matched your search
@@ -23,6 +23,7 @@ import mekanism.common.tile.TileEntityEnergyCube;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -30,6 +31,8 @@ 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.world.World;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
@@ -59,7 +62,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag)
|
||||
{
|
||||
if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey))
|
||||
{
|
||||
@@ -86,13 +89,13 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
}
|
||||
|
||||
@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 state)
|
||||
{
|
||||
boolean place = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);
|
||||
boolean place = super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ, state);
|
||||
|
||||
if(place)
|
||||
{
|
||||
TileEntityEnergyCube tileEntity = (TileEntityEnergyCube)world.getTileEntity(x, y, z);
|
||||
TileEntityEnergyCube tileEntity = (TileEntityEnergyCube)world.getTileEntity(pos);
|
||||
tileEntity.tier = ((IEnergyCube)stack.getItem()).getEnergyCubeTier(stack);
|
||||
tileEntity.electricityStored = getEnergy(stack);
|
||||
|
||||
|
||||
Reference in new issue
Block a user