2015-01-14 12:06:03 +01:00
|
|
|
package edx.quantum.items
|
|
|
|
|
|
|
|
import net.minecraft.entity.{Entity, EntityLivingBase}
|
|
|
|
import net.minecraft.item.{Item, ItemStack}
|
|
|
|
import net.minecraft.world.World
|
2015-01-26 13:36:46 +01:00
|
|
|
import resonantengine.lib.potion.PoisonRadiation
|
2015-01-26 12:40:32 +01:00
|
|
|
import resonantengine.lib.transform.vector.Vector3
|
2015-01-14 12:06:03 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Radioactive Items
|
|
|
|
*/
|
|
|
|
class ItemRadioactive extends Item
|
|
|
|
{
|
|
|
|
override def onUpdate(par1ItemStack: ItemStack, par2World: World, entity: Entity, par4: Int, par5: Boolean)
|
|
|
|
{
|
|
|
|
if (entity.isInstanceOf[EntityLivingBase])
|
|
|
|
{
|
|
|
|
PoisonRadiation.INSTANCE.poisonEntity(new Vector3(entity), entity.asInstanceOf[EntityLivingBase], 1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|