@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
...
if (entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) entity;
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 400, 1));
player.addPotionEffect(new PotionEffect(Potion.poison.id, 200, 0));
}
...
return stack;
}
ДаПкм определенным предметом?
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
...
if (entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) entity;
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 400, 1));
player.addPotionEffect(new PotionEffect(Potion.poison.id, 200, 0));
}
...
return stack;
}
Обращайся.Спасибо
А что так можно было? ЛулИ можно алмазик с лукасом
Ну тип лучший ответ .-. Или нет?А что так можно было? Лул
Тут чо то не так. есть значится параметр player типа EntityPlayer, и, внезапно, есть некое entity, которое почему то проверяется на EntityPlayer.Java:@Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { ... if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; player.addPotionEffect(new PotionEffect(Potion.confusion.id, 400, 1)); player.addPotionEffect(new PotionEffect(Potion.poison.id, 200, 0)); } ... return stack; }
Типо он без тебя разберется, поставить или нет.Ну тип лучший ответ .-. Или нет?