Added the Living Armour Upgrade, Nocturnal Prowess, which gives night vision in dark areas and increases damage while the area is dark

This commit is contained in:
WayofTime 2016-09-03 11:17:36 -04:00
parent 0a2074c110
commit 0bc3824814
10 changed files with 255 additions and 7 deletions

View file

@ -12,6 +12,7 @@ import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Enchantments;
import net.minecraft.init.MobEffects;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -166,11 +167,19 @@ public class GenericHandler
{
sendPlayerDemonWillAura((EntityPlayer) entity);
}
}
EntityLivingBase entity = event.getEntityLiving();
if (entity.isPotionActive(MobEffects.NIGHT_VISION))
{
int duration = entity.getActivePotionEffect(MobEffects.NIGHT_VISION).getDuration();
if (duration == Constants.Misc.NIGHT_VISION_CONSTANT_END)
{
entity.removePotionEffect(MobEffects.NIGHT_VISION);
}
}
if (entity.isPotionActive(ModPotions.fireFuse))
{
entity.worldObj.spawnParticle(EnumParticleTypes.FLAME, entity.posX + entity.worldObj.rand.nextDouble() * 0.3, entity.posY + entity.worldObj.rand.nextDouble() * 0.3, entity.posZ + entity.worldObj.rand.nextDouble() * 0.3, 0, 0.06d, 0);