Added configs to have the Demon Invasion only work when using the Creative Activation Crystal (still uses LP, you scrub.). Re-fixed blood orb so that FakePlayers can't use it. Why did this get re-broken?

This commit is contained in:
WayofTime 2014-12-18 13:00:11 -05:00
parent d8f267b7e3
commit 31e154a980
6 changed files with 22 additions and 3 deletions

View file

@ -19,7 +19,7 @@ import java.util.List;
public class ActivationCrystal extends EnergyItems
{
private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened"};
private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened", "Creative"};
@SideOnly(Side.CLIENT)
private IIcon[] icons;
@ -83,6 +83,13 @@ public class ActivationCrystal extends EnergyItems
break;
}
case 2:
{
par3List.add("Creative only - activates any ritual");
break;
}
}
if (!(par1ItemStack.stackTagCompound == null))
@ -100,7 +107,7 @@ public class ActivationCrystal extends EnergyItems
public int getCrystalLevel(ItemStack itemStack)
{
return itemStack.getItemDamage() + 1;
return itemStack.getItemDamage() > 1 ? Integer.MAX_VALUE : itemStack.getItemDamage() + 1;
}
@Override

View file

@ -56,6 +56,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
{
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
World world = par3EntityPlayer.worldObj;
if (world != null)
{
double posX = par3EntityPlayer.posX;
@ -66,6 +67,11 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
}
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
if(SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
{
return par1ItemStack;
}
if (itemTag == null || itemTag.getString("ownerName").equals(""))
{
return par1ItemStack;