Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package items;
- import entities.EntityBullet;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.projectile.EntityArrow;
- import net.minecraft.entity.projectile.EntityTippedArrow;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.world.World;
- public class ItemBullet extends Item
- {
- public ItemBullet()
- {
- this.setCreativeTab(CreativeTabs.COMBAT);
- }
- public EntityArrow createArrow(World worldIn, ItemStack stack, EntityLivingBase shooter)
- {
- EntityTippedArrow entitytippedarrow = new EntityTippedArrow(worldIn, shooter);
- entitytippedarrow.setPotionEffect(stack);
- return entitytippedarrow;
- }
- public boolean isInfinite(ItemStack stack, ItemStack bow, net.minecraft.entity.player.EntityPlayer player)
- {
- int enchant = net.minecraft.enchantment.EnchantmentHelper.getEnchantmentLevel(net.minecraft.init.Enchantments.INFINITY, bow);
- return enchant <= 0 ? false : this.getClass() == ItemBullet.class;
- }
- public EntityBullet createBullet(World worldIn, ItemStack itemstack, EntityPlayer entityplayer) {
- // TODO Auto-generated method stub
- return null;
- }
- }
Add Comment
Please, Sign In to add comment