2014-12-15 00:11:48 +00:00
|
|
|
package com.cricketcraft.chisel.block;
|
2014-04-21 19:13:15 +01:00
|
|
|
|
2014-12-14 20:05:39 +00:00
|
|
|
import java.util.Random;
|
|
|
|
|
|
2015-01-15 13:50:37 -05:00
|
|
|
import net.minecraft.block.material.Material;
|
2014-04-21 19:13:15 +01:00
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
|
import net.minecraft.init.Items;
|
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
|
import net.minecraft.util.IIcon;
|
|
|
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
|
import net.minecraft.world.World;
|
2014-12-14 20:05:39 +00:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2014-04-21 19:13:15 +01:00
|
|
|
|
2015-01-15 13:50:37 -05:00
|
|
|
public class BlockCarvableBookshelf extends BlockCarvable {
|
2015-01-07 19:50:18 -05:00
|
|
|
|
2015-01-15 13:50:37 -05:00
|
|
|
public BlockCarvableBookshelf() {
|
|
|
|
|
super(Material.wood);
|
|
|
|
|
setHarvestLevel("axe", 0);
|
2015-01-07 19:50:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
|
public IIcon getIcon(int side, int metadata) {
|
|
|
|
|
if (side < 2)
|
|
|
|
|
return Blocks.planks.getBlockTextureFromSide(side);
|
|
|
|
|
return super.getIcon(side, metadata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
|
|
|
|
if (side < 2)
|
|
|
|
|
return Blocks.planks.getBlockTextureFromSide(side);
|
|
|
|
|
return super.getIcon(world, x, y, z, side);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2015-03-08 12:17:55 -04:00
|
|
|
public int quantityDropped(Random random) {
|
2015-01-07 19:50:18 -05:00
|
|
|
return 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2015-03-08 12:17:55 -04:00
|
|
|
public Item getItemDropped(int ammount, Random random, int meta) {
|
2015-01-07 19:50:18 -05:00
|
|
|
return Items.book;
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-06 00:00:22 -04:00
|
|
|
@Override
|
2015-08-01 14:16:03 -04:00
|
|
|
public int damageDropped(int damage) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int getDamageValue(World world, int x, int y, int z) {
|
|
|
|
|
return world.getBlockMetadata(x, y, z);
|
|
|
|
|
}
|
2015-03-08 12:17:55 -04:00
|
|
|
|
2015-01-07 19:50:18 -05:00
|
|
|
@Override
|
|
|
|
|
public float getEnchantPowerBonus(World world, int x, int y, int z) {
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
2014-04-21 19:13:15 +01:00
|
|
|
}
|