Splash potions now throwable! (#1401)
This commit is contained in:
parent
98e474b287
commit
92e3333701
|
@ -24,6 +24,7 @@ import net.minecraft.init.Items;
|
||||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.item.ItemArrow;
|
import net.minecraft.item.ItemArrow;
|
||||||
|
import net.minecraft.item.ItemSplashPotion;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -160,13 +161,12 @@ public class LivingArmourHandler
|
||||||
if (event.getItemStack().getItemUseAction() == EnumAction.DRINK)
|
if (event.getItemStack().getItemUseAction() == EnumAction.DRINK)
|
||||||
{
|
{
|
||||||
ItemStack drinkStack = event.getItemStack();
|
ItemStack drinkStack = event.getItemStack();
|
||||||
|
if(!(drinkStack.getItem() instanceof ItemSplashPotion)) {
|
||||||
|
LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(BloodMagic.MODID + ".upgrade.quenched", chestStack);
|
||||||
|
|
||||||
//TODO: See if the item is a splash potion? Those should be usable.
|
if (upgrade instanceof LivingArmourUpgradeQuenched) {
|
||||||
LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(BloodMagic.MODID + ".upgrade.quenched", chestStack);
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
if (upgrade instanceof LivingArmourUpgradeQuenched)
|
|
||||||
{
|
|
||||||
event.setCanceled(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue