mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
30 lines
797 B
Java
30 lines
797 B
Java
package com.hbm.items;
|
|
|
|
import com.hbm.entity.EntityNukeExplosionAdvanced;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemFood;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
public class ItemWaffle extends ItemFood {
|
|
|
|
public ItemWaffle(int heal, boolean canWolfEat) {
|
|
super(heal, canWolfEat);
|
|
}
|
|
|
|
@Override
|
|
public void onFoodEaten(ItemStack stack, World world, EntityPlayer player)
|
|
{
|
|
EntityNukeExplosionAdvanced explosion = new EntityNukeExplosionAdvanced(world);
|
|
explosion.speed = 25;
|
|
explosion.coefficient = 5.0F;
|
|
explosion.destructionRange = 25;
|
|
explosion.posX = player.posX;
|
|
explosion.posY = player.posY;
|
|
explosion.posZ = player.posZ;
|
|
world.spawnEntityInWorld(explosion);
|
|
}
|
|
|
|
}
|