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,12 +161,10 @@ 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)) {
|
||||||
//TODO: See if the item is a splash potion? Those should be usable.
|
|
||||||
LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(BloodMagic.MODID + ".upgrade.quenched", chestStack);
|
LivingArmourUpgrade upgrade = ItemLivingArmour.getUpgrade(BloodMagic.MODID + ".upgrade.quenched", chestStack);
|
||||||
|
|
||||||
if (upgrade instanceof LivingArmourUpgradeQuenched)
|
if (upgrade instanceof LivingArmourUpgradeQuenched) {
|
||||||
{
|
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,6 +172,7 @@ public class LivingArmourHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Applies: Grim Reaper
|
// Applies: Grim Reaper
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
|
|
Loading…
Reference in a new issue