Run migration mappings
Everything is still broken, but at least we reduced the amount of errors by hundreds, if not thousands.
This commit is contained in:
parent
1caae69992
commit
4035d91151
484 changed files with 4924 additions and 4962 deletions
|
@ -2,8 +2,8 @@ package WayofTime.bloodmagic.livingArmour;
|
|||
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -14,13 +14,13 @@ import net.minecraft.world.World;
|
|||
public interface ILivingArmour {
|
||||
Multimap<String, AttributeModifier> getAttributeModifiers();
|
||||
|
||||
boolean canApplyUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade);
|
||||
boolean canApplyUpgrade(PlayerEntity user, LivingArmourUpgrade upgrade);
|
||||
|
||||
boolean upgradeArmour(EntityPlayer user, LivingArmourUpgrade upgrade);
|
||||
boolean upgradeArmour(PlayerEntity user, LivingArmourUpgrade upgrade);
|
||||
|
||||
boolean removeUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade);
|
||||
boolean removeUpgrade(PlayerEntity user, LivingArmourUpgrade upgrade);
|
||||
|
||||
void notifyPlayerOfUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade);
|
||||
void notifyPlayerOfUpgrade(PlayerEntity user, LivingArmourUpgrade upgrade);
|
||||
|
||||
/**
|
||||
* Ticks the upgrades and stat trackers, passing in the world and player as
|
||||
|
@ -29,11 +29,11 @@ public interface ILivingArmour {
|
|||
* @param world - The World
|
||||
* @param player - The player wearing the Armour
|
||||
*/
|
||||
void onTick(World world, EntityPlayer player);
|
||||
void onTick(World world, PlayerEntity player);
|
||||
|
||||
void readFromNBT(NBTTagCompound tag);
|
||||
void readFromNBT(CompoundNBT tag);
|
||||
|
||||
void writeToNBT(NBTTagCompound tag, boolean forceWrite);
|
||||
void writeToNBT(CompoundNBT tag, boolean forceWrite);
|
||||
|
||||
/**
|
||||
* Writes the LivingArmour to the NBTTag. This will only write the trackers
|
||||
|
@ -41,7 +41,7 @@ public interface ILivingArmour {
|
|||
*
|
||||
* @param tag - The NBT tag to write to
|
||||
*/
|
||||
void writeDirtyToNBT(NBTTagCompound tag);
|
||||
void writeDirtyToNBT(CompoundNBT tag);
|
||||
|
||||
void writeToNBT(NBTTagCompound tag);
|
||||
void writeToNBT(CompoundNBT tag);
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@ import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
|||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
@ -33,7 +33,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
return trackerMap.get(key);
|
||||
}
|
||||
|
||||
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getAdditionalDamageOnHit(double damage, PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
double total = 0;
|
||||
for (Entry<String, LivingArmourUpgrade> entry : upgradeMap.entrySet()) {
|
||||
total += entry.getValue().getAdditionalDamageOnHit(damage, wearer, hitEntity, weapon);
|
||||
|
@ -42,7 +42,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
return total;
|
||||
}
|
||||
|
||||
public double getKnockbackOnHit(EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getKnockbackOnHit(PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
double total = 0;
|
||||
for (Entry<String, LivingArmourUpgrade> entry : upgradeMap.entrySet()) {
|
||||
total += entry.getValue().getKnockbackOnHit(wearer, hitEntity, weapon);
|
||||
|
@ -74,7 +74,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean upgradeArmour(EntityPlayer user, LivingArmourUpgrade upgrade) {
|
||||
public boolean upgradeArmour(PlayerEntity user, LivingArmourUpgrade upgrade) {
|
||||
String key = upgrade.getUniqueIdentifier();
|
||||
if (upgradeMap.containsKey(key)) {
|
||||
//Check if this is a higher level than the previous upgrade
|
||||
|
@ -112,7 +112,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade) {
|
||||
public boolean canApplyUpgrade(PlayerEntity user, LivingArmourUpgrade upgrade) {
|
||||
String key = upgrade.getUniqueIdentifier();
|
||||
if (upgradeMap.containsKey(key)) {
|
||||
//Check if this is a higher level than the previous upgrade
|
||||
|
@ -136,8 +136,8 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void notifyPlayerOfUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade) {
|
||||
user.sendStatusMessage(new TextComponentString(TextHelper.localizeEffect(chatBase + "newUpgrade")), true);
|
||||
public void notifyPlayerOfUpgrade(PlayerEntity user, LivingArmourUpgrade upgrade) {
|
||||
user.sendStatusMessage(new StringTextComponent(TextHelper.localizeEffect(chatBase + "newUpgrade")), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -148,7 +148,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
* @param player
|
||||
*/
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player) {
|
||||
public void onTick(World world, PlayerEntity player) {
|
||||
for (Entry<String, LivingArmourUpgrade> entry : upgradeMap.entrySet()) {
|
||||
LivingArmourUpgrade upgrade = entry.getValue();
|
||||
|
||||
|
@ -211,16 +211,16 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
maxUpgradePoints = Math.max(100, tag.getInteger("maxUpgradePoints"));
|
||||
|
||||
NBTTagList upgradeTags = tag.getTagList("upgrades", 10);
|
||||
ListNBT upgradeTags = tag.getTagList("upgrades", 10);
|
||||
if (upgradeTags != null) {
|
||||
for (int i = 0; i < upgradeTags.tagCount(); i++) {
|
||||
NBTTagCompound upgradeTag = upgradeTags.getCompoundTagAt(i);
|
||||
CompoundNBT upgradeTag = upgradeTags.getCompoundTagAt(i);
|
||||
String key = upgradeTag.getString("key");
|
||||
int level = upgradeTag.getInteger("level");
|
||||
NBTTagCompound nbtTag = upgradeTag.getCompoundTag("upgrade");
|
||||
CompoundNBT nbtTag = upgradeTag.getCompoundTag("upgrade");
|
||||
LivingArmourUpgrade upgrade = LivingArmourHandler.generateUpgradeFromKey(key, level, nbtTag);
|
||||
if (upgrade != null) {
|
||||
upgradeMap.put(key, upgrade);
|
||||
|
@ -238,7 +238,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
StatTracker tracker = (StatTracker) obj;
|
||||
String key = tracker.getUniqueIdentifier();
|
||||
NBTTagCompound trackerTag = tag.getCompoundTag(key);
|
||||
CompoundNBT trackerTag = tag.getCompoundTag(key);
|
||||
if (!trackerTag.isEmpty()) {
|
||||
tracker.readFromNBT(trackerTag);
|
||||
}
|
||||
|
@ -250,16 +250,16 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag, boolean forceWrite) {
|
||||
public void writeToNBT(CompoundNBT tag, boolean forceWrite) {
|
||||
tag.setInteger("maxUpgradePoints", maxUpgradePoints);
|
||||
|
||||
NBTTagList tags = new NBTTagList();
|
||||
ListNBT tags = new ListNBT();
|
||||
|
||||
for (Entry<String, LivingArmourUpgrade> entry : upgradeMap.entrySet()) {
|
||||
NBTTagCompound upgradeTag = new NBTTagCompound();
|
||||
CompoundNBT upgradeTag = new CompoundNBT();
|
||||
|
||||
LivingArmourUpgrade upgrade = entry.getValue();
|
||||
NBTTagCompound nbtTag = new NBTTagCompound();
|
||||
CompoundNBT nbtTag = new CompoundNBT();
|
||||
upgrade.writeToNBT(nbtTag);
|
||||
|
||||
upgradeTag.setString("key", upgrade.getUniqueIdentifier());
|
||||
|
@ -281,7 +281,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
String key = tracker.getUniqueIdentifier();
|
||||
|
||||
if (forceWrite || tracker.isDirty()) {
|
||||
NBTTagCompound trackerTag = new NBTTagCompound();
|
||||
CompoundNBT trackerTag = new CompoundNBT();
|
||||
tracker.writeToNBT(trackerTag);
|
||||
|
||||
tag.setTag(key, trackerTag);
|
||||
|
@ -298,17 +298,17 @@ public class LivingArmour implements ILivingArmour {
|
|||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
public void writeDirtyToNBT(NBTTagCompound tag) {
|
||||
public void writeDirtyToNBT(CompoundNBT tag) {
|
||||
writeToNBT(tag, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
writeToNBT(tag, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeUpgrade(EntityPlayer user, LivingArmourUpgrade upgrade) {
|
||||
public boolean removeUpgrade(PlayerEntity user, LivingArmourUpgrade upgrade) {
|
||||
String key = upgrade.getUniqueIdentifier();
|
||||
if (upgradeMap.containsKey(key)) {
|
||||
upgradeMap.remove(key);
|
||||
|
@ -319,9 +319,9 @@ public class LivingArmour implements ILivingArmour {
|
|||
return false;
|
||||
}
|
||||
|
||||
public static boolean hasFullSet(EntityPlayer player) {
|
||||
for (EntityEquipmentSlot slot : EntityEquipmentSlot.values()) {
|
||||
if (slot.getSlotType() != EntityEquipmentSlot.Type.ARMOR) {
|
||||
public static boolean hasFullSet(PlayerEntity player) {
|
||||
for (EquipmentSlotType slot : EquipmentSlotType.values()) {
|
||||
if (slot.getSlotType() != EquipmentSlotType.Type.ARMOR) {
|
||||
continue;
|
||||
}
|
||||
ItemStack slotStack = player.getItemStackFromSlot(slot);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.livingArmour;
|
||||
|
||||
import WayofTime.bloodmagic.util.BMLog;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
|
@ -45,7 +45,7 @@ public class LivingArmourHandler {
|
|||
return generateUpgradeFromKey(key, level, null);
|
||||
}
|
||||
|
||||
public static LivingArmourUpgrade generateUpgradeFromKey(String key, int level, NBTTagCompound tag) {
|
||||
public static LivingArmourUpgrade generateUpgradeFromKey(String key, int level, CompoundNBT tag) {
|
||||
Constructor<? extends LivingArmourUpgrade> ctor = upgradeConstructorMap.get(key);
|
||||
if (ctor != null) {
|
||||
try {
|
||||
|
|
|
@ -2,11 +2,11 @@ package WayofTime.bloodmagic.livingArmour;
|
|||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -31,11 +31,11 @@ public abstract class LivingArmourUpgrade {
|
|||
this.level = Math.min(level, getMaxTier() - 1);
|
||||
}
|
||||
|
||||
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getAdditionalDamageOnHit(double damage, PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public double getKnockbackOnHit(EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getKnockbackOnHit(PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public abstract class LivingArmourUpgrade {
|
|||
*
|
||||
* @return 0 for no damage blocked, 1 for full damage blocked
|
||||
*/
|
||||
public double getArmourProtection(EntityLivingBase wearer, DamageSource source) {
|
||||
public double getArmourProtection(LivingEntity wearer, DamageSource source) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -61,20 +61,20 @@ public abstract class LivingArmourUpgrade {
|
|||
|
||||
public abstract int getCostOfUpgrade();
|
||||
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
}
|
||||
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers() {
|
||||
return HashMultimap.create();
|
||||
}
|
||||
|
||||
public double getMiningSpeedModifier(EntityPlayer player) {
|
||||
public double getMiningSpeedModifier(PlayerEntity player) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public abstract void writeToNBT(NBTTagCompound tag);
|
||||
public abstract void writeToNBT(CompoundNBT tag);
|
||||
|
||||
public abstract void readFromNBT(NBTTagCompound tag);
|
||||
public abstract void readFromNBT(CompoundNBT tag);
|
||||
|
||||
public int getRunicShielding() {
|
||||
return 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.livingArmour;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -17,9 +17,9 @@ public abstract class StatTracker {
|
|||
*/
|
||||
public abstract void resetTracker();
|
||||
|
||||
public abstract void readFromNBT(NBTTagCompound tag);
|
||||
public abstract void readFromNBT(CompoundNBT tag);
|
||||
|
||||
public abstract void writeToNBT(NBTTagCompound tag);
|
||||
public abstract void writeToNBT(CompoundNBT tag);
|
||||
|
||||
/**
|
||||
* Called each tick to update the tracker's information. Called in
|
||||
|
@ -30,9 +30,9 @@ public abstract class StatTracker {
|
|||
* @param livingArmour The equipped LivingArmour
|
||||
* @return True if there is a new upgrade unlocked this tick.
|
||||
*/
|
||||
public abstract boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour);
|
||||
public abstract boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour);
|
||||
|
||||
public abstract void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour);
|
||||
public abstract void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour);
|
||||
|
||||
public abstract List<LivingArmourUpgrade> getUpgrades();
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeBattleHungry extends LivingArmourUpgrade {
|
||||
|
@ -23,7 +23,7 @@ public class LivingArmourUpgradeBattleHungry extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (timer > 0) {
|
||||
timer--;
|
||||
return;
|
||||
|
@ -50,12 +50,12 @@ public class LivingArmourUpgradeBattleHungry extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger("timer", timer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
timer = tag.getInteger("timer");
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeCrippledArm extends LivingArmourUpgrade {
|
||||
|
@ -15,7 +15,7 @@ public class LivingArmourUpgradeCrippledArm extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,11 +35,11 @@ public class LivingArmourUpgradeCrippledArm extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -19,12 +19,12 @@ public class LivingArmourUpgradeDigSlowdown extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getMiningSpeedModifier(EntityPlayer player) {
|
||||
public double getMiningSpeedModifier(PlayerEntity player) {
|
||||
return digSpeedModifier[this.level];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -44,12 +44,12 @@ public class LivingArmourUpgradeDigSlowdown extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeDisoriented extends LivingArmourUpgrade {
|
||||
|
@ -16,7 +16,7 @@ public class LivingArmourUpgradeDisoriented extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (world.isRemote && player.ticksExisted % 20 == 0 && world.rand.nextDouble() <= chance[this.level]) {
|
||||
player.rotationYaw = world.rand.nextFloat() * 360;
|
||||
player.rotationPitch = world.rand.nextFloat() * 180 - 90;
|
||||
|
@ -44,11 +44,11 @@ public class LivingArmourUpgradeDisoriented extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,8 +7,8 @@ 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.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class LivingArmourUpgradeMeleeDecrease extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,12 +53,12 @@ public class LivingArmourUpgradeMeleeDecrease extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeQuenched extends LivingArmourUpgrade {
|
||||
|
@ -15,7 +15,7 @@ public class LivingArmourUpgradeQuenched extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,11 +35,11 @@ public class LivingArmourUpgradeQuenched extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class LivingArmourUpgradeSlippery extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (world.isRemote && player.onGround) {
|
||||
// if (player.moveForward == 0)
|
||||
{
|
||||
|
@ -72,11 +72,11 @@ public class LivingArmourUpgradeSlippery extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeSlowHeal extends LivingArmourUpgrade {
|
||||
|
@ -21,7 +21,7 @@ public class LivingArmourUpgradeSlowHeal extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -41,12 +41,12 @@ public class LivingArmourUpgradeSlowHeal extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ 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.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class LivingArmourUpgradeSlowness extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,11 +53,11 @@ public class LivingArmourUpgradeSlowness extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.downgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeStormTrooper extends LivingArmourUpgrade {
|
||||
|
@ -16,11 +16,11 @@ public class LivingArmourUpgradeStormTrooper extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
public float getArrowJiggle(EntityPlayer player) {
|
||||
public float getArrowJiggle(PlayerEntity player) {
|
||||
return inaccuracy[this.level];
|
||||
}
|
||||
|
||||
|
@ -40,11 +40,11 @@ public class LivingArmourUpgradeStormTrooper extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowProtect;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerArrowProtect extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.arrowProtect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.arrowProtect", totalDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerArrowProtect extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowShot;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerArrowShot extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalShots = tag.getInteger(BloodMagic.MODID + ".tracker.trickShot");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.trickShot", totalShots);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
int change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerArrowShot extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeCriticalStrike;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerCriticalStrike extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamageDealt = tag.getDouble(BloodMagic.MODID + ".tracker.criticalStrike");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.criticalStrike", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerCriticalStrike extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeDigging;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerDigging extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalBlocksDug = tag.getInteger(BloodMagic.MODID + ".tracker.digging");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.digging", totalBlocksDug);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
int change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerDigging extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeExperience;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerExperience extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalExperienceGained = tag.getDouble(BloodMagic.MODID + ".tracker.experienced");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.experienced", totalExperienceGained);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerExperience extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFallProtect;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerFallProtect extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.fallProtect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.fallProtect", totalDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerFallProtect extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeFireResist;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -28,17 +28,17 @@ public class StatTrackerFireResist extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalFireTicks = tag.getInteger(BloodMagic.MODID + ".tracker.fire");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.fire", totalFireTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (player.isBurning()) {
|
||||
totalFireTicks++;
|
||||
this.markDirty();
|
||||
|
@ -49,7 +49,7 @@ public class StatTrackerFireResist extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeKnockbackResist;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
public class StatTrackerFood extends StatTracker {
|
||||
public static Map<EntityPlayer, Integer> lastFoodEatenMap = new HashMap<>();
|
||||
public static Map<PlayerEntity, Integer> lastFoodEatenMap = new HashMap<>();
|
||||
|
||||
public static int[] foodRequired = new int[]{100, 200, 300, 500, 1000};
|
||||
|
||||
|
@ -33,18 +33,18 @@ public class StatTrackerFood extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
foodEaten = tag.getInteger(BloodMagic.MODID + ".tracker.foodEaten");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.foodEaten", foodEaten);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (!lastFoodEatenMap.containsKey(player)) {
|
||||
lastFoodEatenMap.put(player, 20);
|
||||
return false;
|
||||
|
@ -66,7 +66,7 @@ public class StatTrackerFood extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (lastFoodEatenMap.containsKey(player)) {
|
||||
lastFoodEatenMap.remove(player);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGraveDigger;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerGraveDigger extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamageDealt = tag.getDouble(BloodMagic.MODID + ".tracker.graveDigger");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.graveDigger", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerGraveDigger extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
|||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGrimReaperSprint;
|
||||
import WayofTime.bloodmagic.util.BMLog;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -31,17 +31,17 @@ public class StatTrackerGrimReaperSprint extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDeaths = tag.getInteger(BloodMagic.MODID + ".tracker.grimReaper");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.grimReaper", totalDeaths);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -59,7 +59,7 @@ public class StatTrackerGrimReaperSprint extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeHealthboost;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerHealthboost extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalHealthGenned = tag.getDouble(BloodMagic.MODID + ".tracker.health");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.health", totalHealthGenned);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerHealthboost extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeJump;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -31,18 +31,18 @@ public class StatTrackerJump extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalJumps = tag.getInteger(BloodMagic.MODID + ".tracker.jump");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.jump", totalJumps);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
int change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -60,7 +60,7 @@ public class StatTrackerJump extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeMeleeDamage;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerMeleeDamage extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamageDealt = tag.getDouble(BloodMagic.MODID + ".tracker.meleeDamage");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.meleeDamage", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerMeleeDamage extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSpeed;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -16,8 +16,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
public class StatTrackerMovement extends StatTracker {
|
||||
public static Map<EntityPlayer, Double> lastPosX = new HashMap<>();
|
||||
public static Map<EntityPlayer, Double> lastPosZ = new HashMap<>();
|
||||
public static Map<PlayerEntity, Double> lastPosX = new HashMap<>();
|
||||
public static Map<PlayerEntity, Double> lastPosZ = new HashMap<>();
|
||||
|
||||
public static int[] blocksRequired = new int[]{200, 1000, 2000, 4000, 7000, 15000, 25000, 35000, 50000, 70000};
|
||||
|
||||
|
@ -34,18 +34,18 @@ public class StatTrackerMovement extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalMovement = tag.getDouble(BloodMagic.MODID + ".tracker.movement");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.movement", totalMovement);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (!lastPosX.containsKey(player)) {
|
||||
lastPosX.put(player, player.posX);
|
||||
lastPosZ.put(player, player.posZ);
|
||||
|
@ -76,7 +76,7 @@ public class StatTrackerMovement extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeNightSight;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -34,19 +34,19 @@ public class StatTrackerNightSight extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamageDealt = tag.getDouble(BloodMagic.MODID + ".tracker.nightSight");
|
||||
totalNightVision = tag.getInteger(BloodMagic.MODID + ".tracker.nightSightVision");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.nightSight", totalDamageDealt);
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.nightSightVision", totalNightVision);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
boolean test = false;
|
||||
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
|
@ -60,7 +60,7 @@ public class StatTrackerNightSight extends StatTracker {
|
|||
}
|
||||
}
|
||||
|
||||
if (world.getLight(player.getPosition()) <= 9 && player.isPotionActive(MobEffects.NIGHT_VISION)) {
|
||||
if (world.getLight(player.getPosition()) <= 9 && player.isPotionActive(Effects.NIGHT_VISION)) {
|
||||
totalNightVision++;
|
||||
test = true;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class StatTrackerNightSight extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradePhysicalProtect;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerPhysicalProtect extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.physicalProtect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.physicalProtect", totalDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerPhysicalProtect extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradePoisonResist;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -29,18 +29,18 @@ public class StatTrackerPoison extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalPoisonTicks = tag.getInteger(BloodMagic.MODID + ".tracker.poison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.poison", totalPoisonTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
if (player.isPotionActive(MobEffects.POISON)) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (player.isPotionActive(Effects.POISON)) {
|
||||
totalPoisonTicks++;
|
||||
this.markDirty();
|
||||
return true;
|
||||
|
@ -50,7 +50,7 @@ public class StatTrackerPoison extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeRepairing;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerRepairing extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamage = tag.getDouble(BloodMagic.MODID + ".tracker.repair");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.repair", totalDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerRepairing extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSelfSacrifice;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -31,18 +31,18 @@ public class StatTrackerSelfSacrifice extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalSacrifices = tag.getInteger(BloodMagic.MODID + ".tracker.selfSacrifice");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.selfSacrifice", totalSacrifices);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
int change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -60,7 +60,7 @@ public class StatTrackerSelfSacrifice extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSolarPowered;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerSolarPowered extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalHealthGenned = tag.getDouble(BloodMagic.MODID + ".tracker.solarPowered");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.solarPowered", totalHealthGenned);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerSolarPowered extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import WayofTime.bloodmagic.livingArmour.StatTracker;
|
|||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSprintAttack;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,17 +30,17 @@ public class StatTrackerSprintAttack extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamageDealt = tag.getDouble(BloodMagic.MODID + ".tracker.sprintAttack");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.sprintAttack", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
double change = Math.abs(changeMap.get(livingArmour));
|
||||
if (change > 0) {
|
||||
|
@ -58,7 +58,7 @@ public class StatTrackerSprintAttack extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour)) {
|
||||
changeMap.remove(livingArmour);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
|||
import WayofTime.bloodmagic.livingArmour.StatTracker;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeStepAssist;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -15,8 +15,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
public class StatTrackerStepAssist extends StatTracker {
|
||||
public static Map<EntityPlayer, Double> lastPosX = new HashMap<>();
|
||||
public static Map<EntityPlayer, Double> lastPosZ = new HashMap<>();
|
||||
public static Map<PlayerEntity, Double> lastPosX = new HashMap<>();
|
||||
public static Map<PlayerEntity, Double> lastPosZ = new HashMap<>();
|
||||
|
||||
public static int blocksRequired = 1000;
|
||||
|
||||
|
@ -33,18 +33,18 @@ public class StatTrackerStepAssist extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalMovement = tag.getDouble(BloodMagic.MODID + ".tracker.stepAssist");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.stepAssist", totalMovement);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public boolean onTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
if (!lastPosX.containsKey(player)) {
|
||||
lastPosX.put(player, player.posX);
|
||||
lastPosZ.put(player, player.posZ);
|
||||
|
@ -76,7 +76,7 @@ public class StatTrackerStepAssist extends StatTracker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivatedTick(World world, EntityPlayer player, LivingArmour livingArmour) {
|
||||
public void onDeactivatedTick(World world, PlayerEntity player, LivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
public class LivingArmourUpgradeArrowProtect extends LivingArmourUpgrade {
|
||||
|
@ -15,7 +15,7 @@ public class LivingArmourUpgradeArrowProtect extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getArmourProtection(EntityLivingBase wearer, DamageSource source) {
|
||||
public double getArmourProtection(LivingEntity wearer, DamageSource source) {
|
||||
if (source.isProjectile()) {
|
||||
return protectionLevel[this.level];
|
||||
}
|
||||
|
@ -39,12 +39,12 @@ public class LivingArmourUpgradeArrowProtect extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeArrowShot extends LivingArmourUpgrade {
|
||||
|
@ -16,7 +16,7 @@ public class LivingArmourUpgradeArrowShot extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,12 +36,12 @@ public class LivingArmourUpgradeArrowShot extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class LivingArmourUpgradeCriticalStrike extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{5, 12, 22, 35, 49};
|
||||
|
@ -17,8 +17,8 @@ public class LivingArmourUpgradeCriticalStrike extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
boolean flag = wearer.fallDistance > 0.0F && !wearer.onGround && !wearer.isOnLadder() && !wearer.isInWater() && !wearer.isPotionActive(MobEffects.BLINDNESS) && !wearer.isRiding() && !wearer.isSprinting();
|
||||
public double getAdditionalDamageOnHit(double damage, PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
boolean flag = wearer.fallDistance > 0.0F && !wearer.onGround && !wearer.isOnLadder() && !wearer.isInWater() && !wearer.isPotionActive(Effects.BLINDNESS) && !wearer.isRiding() && !wearer.isSprinting();
|
||||
|
||||
if (flag) {
|
||||
return getDamageModifier() * damage;
|
||||
|
@ -47,12 +47,12 @@ public class LivingArmourUpgradeCriticalStrike extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ import WayofTime.bloodmagic.BloodMagic;
|
|||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.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.PotionEffect;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -24,17 +24,17 @@ public class LivingArmourUpgradeDigging extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getMiningSpeedModifier(EntityPlayer player) {
|
||||
public double getMiningSpeedModifier(PlayerEntity player) {
|
||||
return digSpeedModifier[this.level];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (changeMap.containsKey(livingArmour) && changeMap.get(livingArmour)) {
|
||||
changeMap.put(livingArmour, false);
|
||||
|
||||
if (digSpeedTime[this.level] > 0) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.SPEED, digSpeedTime[this.level], digSpeedLevel[this.level], false, false));
|
||||
player.addPotionEffect(new EffectInstance(Effects.SPEED, digSpeedTime[this.level], digSpeedLevel[this.level], false, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,12 +55,12 @@ public class LivingArmourUpgradeDigging extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeElytra extends LivingArmourUpgrade {
|
||||
|
@ -15,7 +15,7 @@ public class LivingArmourUpgradeElytra extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,12 @@ public class LivingArmourUpgradeElytra extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class LivingArmourUpgradeExperience extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{7, 13, 22, 40, 65, 90, 130, 180, 250, 350};
|
||||
|
@ -32,12 +32,12 @@ public class LivingArmourUpgradeExperience extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,7 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class LivingArmourUpgradeFallProtect extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{2, 5, 9, 15, 25};
|
||||
|
@ -35,12 +33,12 @@ public class LivingArmourUpgradeFallProtect extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ import WayofTime.bloodmagic.util.Constants;
|
|||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
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.PotionEffect;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeFireResist extends LivingArmourUpgrade {
|
||||
|
@ -24,13 +24,13 @@ public class LivingArmourUpgradeFireResist extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (player.isBurning() && fireCooldown <= 0) {
|
||||
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistDuration[this.level]));
|
||||
player.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE, fireResistDuration[this.level]));
|
||||
fireCooldown = fireCooldownTime[this.level];
|
||||
|
||||
player.sendStatusMessage(new TextComponentString(TextHelper.localizeEffect(chatBase + "fireRemove")), true);
|
||||
player.sendStatusMessage(new StringTextComponent(TextHelper.localizeEffect(chatBase + "fireRemove")), true);
|
||||
|
||||
} else if (fireCooldown > 0) {
|
||||
fireCooldown--;
|
||||
|
@ -53,12 +53,12 @@ public class LivingArmourUpgradeFireResist extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(Constants.NBT.UPGRADE_FIRE_TIMER, fireCooldown);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
fireCooldown = tag.getInteger(Constants.NBT.UPGRADE_FIRE_TIMER);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ShovelItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class LivingArmourUpgradeGraveDigger extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{5, 12, 20, 35, 49, 78, 110, 160, 215, 320};
|
||||
|
@ -17,8 +17,8 @@ public class LivingArmourUpgradeGraveDigger extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
if (!weapon.isEmpty() && weapon.getItem() instanceof ItemSpade) {
|
||||
public double getAdditionalDamageOnHit(double damage, PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
if (!weapon.isEmpty() && weapon.getItem() instanceof ShovelItem) {
|
||||
return getDamageModifier();
|
||||
}
|
||||
|
||||
|
@ -45,12 +45,12 @@ public class LivingArmourUpgradeGraveDigger extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ import WayofTime.bloodmagic.BloodMagic;
|
|||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
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.PotionEffect;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade {
|
||||
|
@ -27,7 +27,7 @@ public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (deathTimer > 0) {
|
||||
deathTimer--;
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
deathTimer = tag.getInteger(BloodMagic.MODID + ".tracker.grimReaper");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.grimReaper", deathTimer);
|
||||
}
|
||||
|
||||
|
@ -63,24 +63,24 @@ public class LivingArmourUpgradeGrimReaperSprint extends LivingArmourUpgrade {
|
|||
return tooltipBase + "grimReaper";
|
||||
}
|
||||
|
||||
public void applyEffectOnRebirth(EntityPlayer player) {
|
||||
public void applyEffectOnRebirth(PlayerEntity player) {
|
||||
player.setHealth(player.getMaxHealth() * healthOnRevive[this.level]);
|
||||
|
||||
int strDur = strengthDuration[this.level];
|
||||
if (strDur > 0) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, strDur, strengthValue[this.level]));
|
||||
player.addPotionEffect(new EffectInstance(Effects.STRENGTH, strDur, strengthValue[this.level]));
|
||||
}
|
||||
|
||||
int resDur = resistanceDuration[this.level];
|
||||
if (resDur > 0) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, resDur, resistanceValue[this.level]));
|
||||
player.addPotionEffect(new EffectInstance(Effects.RESISTANCE, resDur, resistanceValue[this.level]));
|
||||
}
|
||||
|
||||
deathTimer = rebirthDelay[this.level];
|
||||
player.sendStatusMessage(new TextComponentString(TextHelper.localizeEffect(chatBase + "grimReaper")), true);
|
||||
player.sendStatusMessage(new StringTextComponent(TextHelper.localizeEffect(chatBase + "grimReaper")), true);
|
||||
}
|
||||
|
||||
public boolean canSavePlayer(EntityPlayer player) {
|
||||
public boolean canSavePlayer(PlayerEntity player) {
|
||||
return deathTimer <= 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ 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.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class LivingArmourUpgradeHealthboost extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,12 +53,12 @@ public class LivingArmourUpgradeHealthboost extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeJump extends LivingArmourUpgrade {
|
||||
|
@ -31,7 +31,7 @@ public class LivingArmourUpgradeJump extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (!world.isRemote) {
|
||||
double motionY = player.motionY;
|
||||
|
||||
|
@ -47,12 +47,12 @@ public class LivingArmourUpgradeJump extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ 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.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -51,12 +51,12 @@ public class LivingArmourUpgradeKnockbackResist extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ 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.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class LivingArmourUpgradeMeleeDamage extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,12 +53,12 @@ public class LivingArmourUpgradeMeleeDamage extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package WayofTime.bloodmagic.livingArmour.upgrade;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeNightSight extends LivingArmourUpgrade {
|
||||
|
@ -23,21 +22,21 @@ public class LivingArmourUpgradeNightSight extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getAdditionalDamageOnHit(double damage, PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
return isActive ? meleeDamage[this.level] : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (world.getLight(player.getPosition(), false) <= 9) {
|
||||
isActive = true;
|
||||
if (player.isPotionActive(MobEffects.NIGHT_VISION))
|
||||
if (player.isPotionActive(Effects.NIGHT_VISION))
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, Integer.MAX_VALUE, 0, false, false));
|
||||
player.addPotionEffect(new EffectInstance(Effects.NIGHT_VISION, Integer.MAX_VALUE, 0, false, false));
|
||||
} else if (isActive) {
|
||||
isActive = false;
|
||||
player.removePotionEffect(MobEffects.NIGHT_VISION);
|
||||
player.removePotionEffect(Effects.NIGHT_VISION);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,12 +56,12 @@ public class LivingArmourUpgradeNightSight extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
public class LivingArmourUpgradePhysicalProtect extends LivingArmourUpgrade {
|
||||
|
@ -15,7 +15,7 @@ public class LivingArmourUpgradePhysicalProtect extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getArmourProtection(EntityLivingBase wearer, DamageSource source) {
|
||||
public double getArmourProtection(LivingEntity wearer, DamageSource source) {
|
||||
if (source.getTrueSource() != null && !source.isMagicDamage() && !source.isProjectile()) {
|
||||
return protectionLevel[this.level];
|
||||
}
|
||||
|
@ -39,12 +39,12 @@ public class LivingArmourUpgradePhysicalProtect extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ import WayofTime.bloodmagic.util.Constants;
|
|||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
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.PotionEffect;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade {
|
||||
|
@ -24,14 +24,14 @@ public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
if (player.isPotionActive(MobEffects.POISON) && poisonCooldown <= 0) {
|
||||
PotionEffect eff = player.getActivePotionEffect(MobEffects.POISON);
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (player.isPotionActive(Effects.POISON) && poisonCooldown <= 0) {
|
||||
EffectInstance eff = player.getActivePotionEffect(Effects.POISON);
|
||||
if (eff.getAmplifier() <= poisonMaxCure[this.level]) {
|
||||
player.removePotionEffect(MobEffects.POISON);
|
||||
player.removePotionEffect(Effects.POISON);
|
||||
poisonCooldown = poisonCooldownTime[this.level];
|
||||
|
||||
player.sendStatusMessage(new TextComponentString(TextHelper.localize(chatBase + "poisonRemove")), true);
|
||||
player.sendStatusMessage(new StringTextComponent(TextHelper.localize(chatBase + "poisonRemove")), true);
|
||||
}
|
||||
} else if (poisonCooldown > 0) {
|
||||
poisonCooldown--;
|
||||
|
@ -54,12 +54,12 @@ public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(Constants.NBT.UPGRADE_POISON_TIMER, poisonCooldown);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
poisonCooldown = tag.getInteger(Constants.NBT.UPGRADE_POISON_TIMER);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LivingArmourUpgradeRepairing extends LivingArmourUpgrade {
|
||||
|
@ -22,11 +22,11 @@ public class LivingArmourUpgradeRepairing extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (delay <= 0) {
|
||||
delay = repairDelay[this.level];
|
||||
|
||||
EntityEquipmentSlot randomSlot = EntityEquipmentSlot.values()[2 + world.rand.nextInt(4)];
|
||||
EquipmentSlotType randomSlot = EquipmentSlotType.values()[2 + world.rand.nextInt(4)];
|
||||
ItemStack repairStack = player.getItemStackFromSlot(randomSlot);
|
||||
if (!repairStack.isEmpty()) {
|
||||
if (repairStack.isItemStackDamageable() && repairStack.isItemDamaged()) {
|
||||
|
@ -57,12 +57,12 @@ public class LivingArmourUpgradeRepairing extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger("repairingDelay", delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
delay = tag.getInteger("repairingDelay");
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class LivingArmourUpgradeSelfSacrifice extends LivingArmourUpgrade {
|
||||
//TODO: Add extra effects for higher levels
|
||||
|
@ -33,12 +33,12 @@ public class LivingArmourUpgradeSelfSacrifice extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
||||
import WayofTime.bloodmagic.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.PotionEffect;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getArmourProtection(EntityLivingBase wearer, DamageSource source) {
|
||||
public double getArmourProtection(LivingEntity wearer, DamageSource source) {
|
||||
if (wearer.getEntityWorld().canSeeSky(wearer.getPosition()) && wearer.getEntityWorld().provider.isDaytime()) {
|
||||
return protectionLevel[this.level];
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
counter++;
|
||||
if (world.canSeeSky(player.getPosition()) && world.provider.isDaytime()) {
|
||||
if (counter % regenCooldown[this.level] == 0 && player.getHealth() < player.getMaxHealth()) {
|
||||
|
@ -42,7 +42,7 @@ public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
if (fireResistTime[this.level] != 0 && counter % fireResistCooldown[this.level] == 0) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistTime[this.level], 0, false, false));
|
||||
player.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE, fireResistTime[this.level], 0, false, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,12 +63,12 @@ public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.solarPowered", counter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
counter = tag.getInteger(BloodMagic.MODID + ".tracker.solarPowered");
|
||||
}
|
||||
|
||||
|
|
|
@ -5,16 +5,12 @@ import WayofTime.bloodmagic.livingArmour.ILivingArmour;
|
|||
import WayofTime.bloodmagic.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.PotionEffect;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class LivingArmourUpgradeSpeed extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{3, 7, 13, 26, 42, 60, 90, 130, 180, 250};
|
||||
|
@ -33,14 +29,14 @@ public class LivingArmourUpgradeSpeed extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
public void onTick(World world, PlayerEntity player, ILivingArmour livingArmour) {
|
||||
if (player.isSprinting()) {
|
||||
if (sprintSpeedTime[this.level] > 0) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.SPEED, sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false));
|
||||
player.addPotionEffect(new EffectInstance(Effects.SPEED, sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false));
|
||||
}
|
||||
|
||||
if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(MobEffects.REGENERATION)) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, sprintRegenTime[this.level], 0, false, false));
|
||||
if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(Effects.REGENERATION)) {
|
||||
player.addPotionEffect(new EffectInstance(Effects.REGENERATION, sprintRegenTime[this.level], 0, false, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,12 +71,12 @@ public class LivingArmourUpgradeSpeed extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class LivingArmourUpgradeSprintAttack extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{3, 7, 15, 25, 40};
|
||||
|
@ -17,7 +17,7 @@ public class LivingArmourUpgradeSprintAttack extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getAdditionalDamageOnHit(double damage, PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
if (wearer.isSprinting()) {
|
||||
return getDamageModifier();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class LivingArmourUpgradeSprintAttack extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getKnockbackOnHit(EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon) {
|
||||
public double getKnockbackOnHit(PlayerEntity wearer, LivingEntity hitEntity, ItemStack weapon) {
|
||||
if (wearer.isSprinting()) {
|
||||
return getKnockbackModifier();
|
||||
}
|
||||
|
@ -58,12 +58,12 @@ public class LivingArmourUpgradeSprintAttack extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package WayofTime.bloodmagic.livingArmour.upgrade;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
public class LivingArmourUpgradeStepAssist extends LivingArmourUpgrade {
|
||||
public static final int[] costs = new int[]{20};
|
||||
|
@ -35,12 +35,12 @@ public class LivingArmourUpgradeStepAssist extends LivingArmourUpgrade {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue