Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mod.drakania.items;
- import net.minecraft.entity.item.EntityTNTPrimed;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.projectile.EntitySnowball;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.world.World;
- import net.minecraftforge.event.world.ExplosionEvent;
- public class ItemTnt extends Item
- {
- @Override
- public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
- {
- {
- if (!p_77659_3_.capabilities.isCreativeMode)
- {
- --p_77659_1_.stackSize;
- }
- p_77659_2_.playSoundAtEntity(p_77659_3_, "game.tnt.primed", 1F, 1F / (itemRand.nextFloat() * 0.4F + 0.8F));
- if (!p_77659_2_.isRemote)
- {
- p_77659_2_.spawnEntityInWorld(new EntityTNTPrimed(p_77659_2_, getMaxDamage(), getMaxDamage(), getMaxDamage(), p_77659_3_));
- }
- return p_77659_1_;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement