Java Code Examples for net.minecraft.init.Items.SPECTRAL_ARROW

The following are Jave code examples for showing how to use SPECTRAL_ARROW of the net.minecraft.init.Items class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Backmemed   File: EntitySkeleton.java   View Source Code Vote up 6 votes
protected EntityArrow func_190726_a(float p_190726_1_)
{
    ItemStack itemstack = this.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND);

    if (itemstack.getItem() == Items.SPECTRAL_ARROW)
    {
        EntitySpectralArrow entityspectralarrow = new EntitySpectralArrow(this.world, this);
        entityspectralarrow.func_190547_a(this, p_190726_1_);
        return entityspectralarrow;
    }
    else
    {
        EntityArrow entityarrow = super.func_190726_a(p_190726_1_);

        if (itemstack.getItem() == Items.TIPPED_ARROW && entityarrow instanceof EntityTippedArrow)
        {
            ((EntityTippedArrow)entityarrow).setPotionEffect(itemstack);
        }

        return entityarrow;
    }
}
 
Example 2
Project: Backmemed   File: EntitySpectralArrow.java   View Source Code Vote up 4 votes
protected ItemStack getArrowStack()
{
    return new ItemStack(Items.SPECTRAL_ARROW);
}
 
Example 3
Project: CustomWorldGen   File: EntitySpectralArrow.java   View Source Code Vote up 4 votes
protected ItemStack getArrowStack()
{
    return new ItemStack(Items.SPECTRAL_ARROW);
}