This commit is contained in:
Raoul Van den Berge
2016-03-19 14:46:46 +01:00
parent 2d397bf814
commit ac1b607fa7
2 changed files with 26 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package storagecraft.block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.world.World; import net.minecraft.world.World;
import storagecraft.tile.TileCable; import storagecraft.tile.TileCable;
@@ -11,8 +12,7 @@ public class BlockCable extends BlockBase
{ {
super("cable"); super("cable");
float pixel = 1F / 16F; // float pixel = 1F / 16F;
// @TODO: setBlockBounds(4 * pixel, 4 * pixel, 4 * pixel, 1 - 4 * pixel, 1 - 4 * pixel, 1 - 4 * pixel); // @TODO: setBlockBounds(4 * pixel, 4 * pixel, 4 * pixel, 1 - 4 * pixel, 1 - 4 * pixel, 1 - 4 * pixel);
} }
@@ -28,6 +28,30 @@ public class BlockCable extends BlockBase
return new TileCable(); return new TileCable();
} }
@Override
public EnumBlockRenderType getRenderType(IBlockState state)
{
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{
return false;
}
@Override
public boolean isFullCube(IBlockState state)
{
return false;
}
@Override
public boolean isNormalCube(IBlockState state)
{
return false;
}
@Override @Override
public boolean isVisuallyOpaque() public boolean isVisuallyOpaque()
{ {

View File

@@ -33,7 +33,6 @@ public class TileCable extends TileBase
public boolean isEnabled() public boolean isEnabled()
{ {
// @TODO: Fix going through blocks
return !worldObj.isBlockPowered(pos); return !worldObj.isBlockPowered(pos);
} }