2014-11-01 20:08:45 -04:00
|
|
|
package info.jbcs.minecraft.chisel.block;
|
|
|
|
|
|
2014-12-11 20:09:54 -05:00
|
|
|
import info.jbcs.minecraft.chisel.Chisel;
|
2014-12-11 07:42:55 -08:00
|
|
|
import info.jbcs.minecraft.chisel.api.ICarvable;
|
|
|
|
|
import info.jbcs.minecraft.chisel.carving.CarvableHelper;
|
|
|
|
|
import info.jbcs.minecraft.chisel.carving.CarvableVariation;
|
|
|
|
|
import info.jbcs.minecraft.chisel.client.GeneralChiselClient;
|
|
|
|
|
import info.jbcs.minecraft.chisel.utils.General;
|
|
|
|
|
import net.minecraft.block.Block;
|
2014-11-01 20:08:45 -04:00
|
|
|
import net.minecraft.block.material.Material;
|
2014-12-11 07:42:55 -08:00
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
|
|
|
import net.minecraft.util.IIcon;
|
|
|
|
|
import net.minecraft.world.World;
|
2014-11-01 20:08:45 -04:00
|
|
|
|
2014-12-11 20:09:54 -05:00
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
|
|
public class BlockVoidstone extends Block implements ICarvable{
|
|
|
|
|
public CarvableHelper carverHelper;
|
|
|
|
|
public static IIcon iconParticle;
|
|
|
|
|
|
2014-12-11 07:42:55 -08:00
|
|
|
public BlockVoidstone() {
|
|
|
|
|
super(Material.rock);
|
2014-12-11 20:09:54 -05:00
|
|
|
carverHelper = new CarvableHelper();
|
2014-12-11 07:42:55 -08:00
|
|
|
setHardness(5.0F);
|
|
|
|
|
setResistance(10.0F);
|
2014-12-11 20:09:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void registerBlockIcons(IIconRegister icon){
|
|
|
|
|
iconParticle = icon.registerIcon(Chisel.MOD_ID + ":voidstone/particles/star");
|
2014-12-11 07:42:55 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void randomDisplayTick(World world, int x, int y, int z, Random random)
|
|
|
|
|
{
|
|
|
|
|
if(General.rand.nextInt(4) == 0 && world.isRemote)
|
|
|
|
|
GeneralChiselClient.spawnVoidstoneFX(world, this, x, y, z);
|
|
|
|
|
}
|
2014-12-11 20:09:54 -05:00
|
|
|
|
2014-12-11 07:42:55 -08:00
|
|
|
@Override
|
|
|
|
|
public CarvableVariation getVariation(int metadata) {
|
2014-12-11 20:09:54 -05:00
|
|
|
return carverHelper.getVariation(metadata);
|
2014-11-01 20:08:45 -04:00
|
|
|
}
|
|
|
|
|
}
|