- 199
- 1
- 17
Всем привет! Ребят, решил я сделать мод на лекарства и столкнулся с такой проблемой, я пытаюсь вызвать некоторые эффекты при съедании и они не вызываются, вот код:
Код:
package excraft.bookkiller.items;
import excraft.bookkiller.ExCraftTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
public class Adrenaline extends ItemFood {
public Adrenaline() {
super(0, 0.0F, false);
this.setUnlocalizedName("adrenaline");
this.setTextureName("excraft:adrenaline");
this.setMaxStackSize(4);
this.setCreativeTab(ExCraftTabs.tabExCraft);
}
protected void onArmorTick(ItemStack stack, World world, EntityPlayer player) {
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 600));
player.addPotionEffect(new PotionEffect(Potion.jump.id, 400));
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200));
}
public ItemStack ItemStack (ItemStack itemStack, World p_77659_2_, EntityPlayer player) {
return itemStack;
}
}