- Changed the growth behavior of the crystals

- Fixed Potion getting for various methods
- Started work on crystal automation ritual
- Finished first iteration of the iterator of AreaDescriptor
This commit is contained in:
WayofTime 2016-03-24 14:11:05 -04:00
parent 78ed6a18e4
commit f0730791f7
20 changed files with 298 additions and 109 deletions

View file

@ -5,6 +5,7 @@ import WayofTime.bloodmagic.api.livingArmour.ILivingArmour;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.livingArmour.LivingArmour;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -39,10 +40,10 @@ public class LivingArmourUpgradeDigging extends LivingArmourUpgrade
{
changeMap.put(livingArmour, false);
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("digSpeed"), digHasteTime[this.level], digHasteLevel[this.level], false, false));
player.addPotionEffect(new PotionEffect(MobEffects.digSpeed, digHasteTime[this.level], digHasteLevel[this.level], false, false));
if (digSpeedTime[this.level] > 0)
{
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("moveSpeed"), digSpeedTime[this.level], digSpeedLevel[this.level], false, false));
player.addPotionEffect(new PotionEffect(MobEffects.moveSpeed, digSpeedTime[this.level], digSpeedLevel[this.level], false, false));
}
}
}

View file

@ -6,6 +6,7 @@ import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.util.ChatUtil;
import WayofTime.bloodmagic.util.helper.TextHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -27,12 +28,12 @@ public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade
@Override
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour)
{
if (player.isPotionActive(Potion.getPotionFromResourceLocation("poison")) && poisonCooldown <= 0)
if (player.isPotionActive(MobEffects.poison) && poisonCooldown <= 0)
{
PotionEffect eff = player.getActivePotionEffect(Potion.getPotionFromResourceLocation("poison"));
PotionEffect eff = player.getActivePotionEffect(MobEffects.poison);
if (eff.getAmplifier() <= poisonMaxCure[this.level])
{
player.removePotionEffect(Potion.getPotionFromResourceLocation("poison"));
player.removePotionEffect(MobEffects.poison);
poisonCooldown = poisonCooldownTime[this.level];
ChatUtil.sendNoSpam(player, TextHelper.localize(chatBase + "poisonRemove"));

View file

@ -5,6 +5,7 @@ import WayofTime.bloodmagic.api.livingArmour.ILivingArmour;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -50,7 +51,7 @@ public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade
if (fireResistTime[this.level] != 0 && counter % fireResistCooldown[this.level] == 0)
{
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("fireResistance"), fireResistTime[this.level], 0, false, false));
player.addPotionEffect(new PotionEffect(MobEffects.fireResistance, fireResistTime[this.level], 0, false, false));
}
}
}

View file

@ -3,11 +3,14 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.livingArmour.ILivingArmour;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -41,12 +44,12 @@ public class LivingArmourUpgradeSpeed extends LivingArmourUpgrade
{
if (sprintSpeedTime[this.level] > 0)
{
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("moveSpeed"), sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false));
player.addPotionEffect(new PotionEffect(MobEffects.moveSpeed, sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false));
}
if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(Potion.getPotionFromResourceLocation("regeneration")))
if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(MobEffects.regeneration))
{
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("regeneration"), sprintRegenTime[this.level], 0, false, false));
player.addPotionEffect(new PotionEffect(MobEffects.regeneration, sprintRegenTime[this.level], 0, false, false));
}
}
}