mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
<400 errors
This commit is contained in:
1 parent
af008b9395
commit
c73eef6be8
90 files changed
+880
-749
No files matched your search
@@ -31,6 +31,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
@@ -103,7 +104,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock)
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
@@ -175,11 +176,11 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, BlockPos pos)
|
||||
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World world, BlockPos pos)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
return SecurityUtils.canAccess(player, tile) ? super.getPlayerRelativeBlockHardness(player, world, pos) : 0.0F;
|
||||
return SecurityUtils.canAccess(player, tile) ? super.getPlayerRelativeBlockHardness(state, player, world, pos) : 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -245,7 +246,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
{
|
||||
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest)
|
||||
{
|
||||
@@ -254,7 +255,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
|
||||
EntityItem entityItem = new EntityItem(world, pos.getX() + motionX, pos.getY() + motionY, pos.getZ() + motionZ, getPickBlock(null, world, pos, player));
|
||||
EntityItem entityItem = new EntityItem(world, pos.getX() + motionX, pos.getY() + motionY, pos.getZ() + motionZ, getPickBlock(state, null, world, pos, player));
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
|
||||
@@ -268,19 +269,19 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||
{
|
||||
return 3;
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(RayTraceResult target, World world, BlockPos pos, EntityPlayer player)
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player)
|
||||
{
|
||||
TileEntityEnergyCube tileEntity = (TileEntityEnergyCube)world.getTileEntity(pos);
|
||||
ItemStack itemStack = new ItemStack(MekanismBlocks.EnergyCube);
|
||||
@@ -313,9 +314,9 @@ public class BlockEnergyCube extends BlockContainer
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public ItemStack dismantleBlock(World world, BlockPos pos, boolean returnBlock)
|
||||
public ItemStack dismantleBlock(IBlockState state, World world, BlockPos pos, boolean returnBlock)
|
||||
{
|
||||
ItemStack itemStack = getPickBlock(null, world, pos, null);
|
||||
ItemStack itemStack = getPickBlock(state, null, world, pos, null);
|
||||
|
||||
world.setBlockToAir(pos);
|
||||
|
||||
@@ -335,20 +336,20 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride()
|
||||
public boolean hasComparatorInputOverride(IBlockState state)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, BlockPos pos)
|
||||
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos)
|
||||
{
|
||||
TileEntityEnergyCube tileEntity = (TileEntityEnergyCube)world.getTileEntity(pos);
|
||||
return tileEntity.getRedstoneLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||
public boolean isSideSolid(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user