40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
|
package tdwp_ftw.biomesop.blocks;
|
||
|
|
||
|
import java.util.Random;
|
||
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||
|
|
||
|
import net.minecraft.block.Block;
|
||
|
import net.minecraft.block.material.Material;
|
||
|
import net.minecraft.creativetab.CreativeTabs;
|
||
|
import net.minecraft.world.World;
|
||
|
|
||
|
public class BlockDriedDirt extends Block
|
||
|
{
|
||
|
public BlockDriedDirt(int par1, int par2)
|
||
|
{
|
||
|
super(par1, par2, Material.rock);
|
||
|
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Returns the ID of the items to drop on destruction.
|
||
|
*/
|
||
|
public int idDropped(int par1, Random par2Random, int par3)
|
||
|
{
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* A randomly called display update to be able to add particles or other items for display
|
||
|
*/
|
||
|
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
|
||
|
{
|
||
|
super.randomDisplayTick(par1World, par2, par3, par4, par5Random);
|
||
|
|
||
|
if (par5Random.nextInt(20) == 0)
|
||
|
{
|
||
|
par1World.spawnParticle("townaura", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
|
||
|
}
|
||
|
}
|
||
|
}
|