Fixing Sanguine armour, adding some fancy rendering, doing other random bug fixes
This commit is contained in:
parent
4f9fad22c5
commit
14f9e3c61b
66 changed files with 2425 additions and 911 deletions
|
@ -1,169 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class FocusBase extends EnergyItems //implements IWandFocus
|
||||
{
|
||||
protected IIcon ornament, depth;
|
||||
|
||||
public FocusBase()
|
||||
{
|
||||
super();
|
||||
setMaxDamage(1);
|
||||
setNoRepair();
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
boolean hasOrnament()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean hasDepth()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
super.registerIcons(iconRegister);
|
||||
// if(hasOrnament())
|
||||
// {
|
||||
// ornament = iconRegister.registerIcon("AlchemicalWizardry:" + this.getUnlocalizedName() + "Orn");
|
||||
// }
|
||||
// if(hasDepth())
|
||||
// {
|
||||
// depth = iconRegister.registerIcon("AlchemicalWizardry:" + this.getUnlocalizedName() + "Depth");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemTool(ItemStack par1ItemStack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/*erride
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
AspectList cost = getVisCost();
|
||||
|
||||
if (cost != null && cost.size() > 0)
|
||||
{
|
||||
par3List.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
|
||||
|
||||
for (Aspect aspect : cost.getAspectsSorted())
|
||||
{
|
||||
float amount = cost.getAmount(aspect) / 100.0F;
|
||||
par3List.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack)
|
||||
{
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getOrnament()
|
||||
{
|
||||
return ornament;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getFocusDepthLayerIcon()
|
||||
{
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WandFocusAnimation getAnimation()
|
||||
{
|
||||
return WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisCostPerTick()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isUseItem()
|
||||
{
|
||||
return isVisCostPerTick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition)
|
||||
{
|
||||
if (isUseItem())
|
||||
{
|
||||
paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
return paramItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack paramItemStack, EntityPlayer paramEntityPlayer, int paramInt)
|
||||
{
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsingFocus(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, int paramInt)
|
||||
{
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack paramItemStack)
|
||||
{
|
||||
return "00";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onFocusBlockStartBreak(ItemStack paramItemStack, int paramInt1, int paramInt2, int paramInt3, EntityPlayer paramEntityPlayer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsEnchant(int id)
|
||||
{
|
||||
if (id == ThaumcraftApi.enchantFrugal ||
|
||||
id == ThaumcraftApi.enchantPotency)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FocusBloodBlast extends FocusBase
|
||||
{
|
||||
//private static final AspectList visUsage = new AspectList().add(Aspect.AIR, 15).add(Aspect.ENTROPY, 45);
|
||||
|
||||
private final int maxCooldown = 7;
|
||||
|
||||
public static Map<String,Integer> playerCooldown = new HashMap();
|
||||
|
||||
public FocusBloodBlast()
|
||||
{
|
||||
super();
|
||||
this.setUnlocalizedName("focusBloodBlast");
|
||||
this.setEnergyUsed(100);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
super.registerIcons(iconRegister);
|
||||
|
||||
if (hasOrnament())
|
||||
{
|
||||
ornament = iconRegister.registerIcon("AlchemicalWizardry:" + "focusBloodBlast" + "Orn");
|
||||
}
|
||||
|
||||
if (hasDepth())
|
||||
{
|
||||
depth = iconRegister.registerIcon("AlchemicalWizardry:" + "focusBloodBlast" + "Depth");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
//super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack stack, EntityPlayer par3EntityPlayer, int ticks)
|
||||
{
|
||||
if (AlchemicalWizardry.isThaumcraftLoaded)
|
||||
{
|
||||
Item item = stack.getItem();
|
||||
Class clazz = item.getClass();
|
||||
|
||||
while (!clazz.getName().equals("thaumcraft.common.items.wands.ItemWandCasting"))
|
||||
{
|
||||
if (clazz == Object.class)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clazz = clazz.getSuperclass();
|
||||
}
|
||||
|
||||
//Item testItem = item.set
|
||||
|
||||
//Method consumeAllVis = null;
|
||||
try
|
||||
{
|
||||
if (!playerCooldown.containsKey(par3EntityPlayer.username))
|
||||
{
|
||||
playerCooldown.put(par3EntityPlayer.username, 0);
|
||||
}
|
||||
|
||||
Method getFocusItem = clazz.getMethod("getFocusItem", ItemStack.class);
|
||||
ItemStack focusStack = (ItemStack) getFocusItem.invoke(item, stack);
|
||||
//int potency = EnchantmentHelper.getEnchantmentLevel(ThaumcraftApi.enchantPotency, focusStack);
|
||||
int cooldown = playerCooldown.get(par3EntityPlayer.username) + 1;
|
||||
playerCooldown.put(par3EntityPlayer.username, cooldown);
|
||||
|
||||
if (cooldown >= this.maxCooldown)
|
||||
{
|
||||
Method consumeAllVis = clazz.getMethod("consumeAllVis", ItemStack.class, EntityPlayer.class, AspectList.class, boolean.class);
|
||||
|
||||
if ((Boolean) consumeAllVis.invoke(item, stack, par3EntityPlayer, getVisCost(), true))
|
||||
{
|
||||
playerCooldown.put(par3EntityPlayer.username, 0);
|
||||
EnergyItems.checkAndSetItemOwner(focusStack, par3EntityPlayer);
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
this.syphonBatteries(focusStack, par3EntityPlayer, 100);
|
||||
}
|
||||
|
||||
//world.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
world.playSoundAtEntity(par3EntityPlayer, "thaumcraft:wand", 0.5F, 1F);
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
world.spawnEntityInWorld(new EnergyBlastProjectile(world, par3EntityPlayer, (int) (5)));
|
||||
//this.setDelay(par1ItemStack, maxDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchMethodException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (SecurityException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (IllegalAccessException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IllegalArgumentException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsingFocus(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, int paramInt)
|
||||
{
|
||||
playerCooldown.put(paramEntityPlayer.username, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack)
|
||||
{
|
||||
return "BLOODBLAST";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor()
|
||||
{
|
||||
return 0x8A0707;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getVisCost()
|
||||
{
|
||||
return visUsage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisCostPerTick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WandFocusAnimation getAnimation()
|
||||
{
|
||||
return WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
boolean hasOrnament()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
}
|
|
@ -1,263 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FocusGravityWell extends FocusBase
|
||||
{
|
||||
//private static final AspectList visUsage = new AspectList().add(Aspect.AIR, 5).add(Aspect.ORDER, 5);
|
||||
|
||||
private final int maxCooldown = 1;
|
||||
|
||||
public static Map<String,Integer> playerCooldown = new HashMap();
|
||||
|
||||
public FocusGravityWell()
|
||||
{
|
||||
super();
|
||||
this.setUnlocalizedName("focusGravityWell");
|
||||
this.setEnergyUsed(100);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
super.registerIcons(iconRegister);
|
||||
|
||||
if (hasOrnament())
|
||||
{
|
||||
ornament = iconRegister.registerIcon("AlchemicalWizardry:" + "focusGravityWell" + "Orn");
|
||||
}
|
||||
|
||||
if (hasDepth())
|
||||
{
|
||||
depth = iconRegister.registerIcon("AlchemicalWizardry:" + "focusGravityWell" + "Depth");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
//super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack stack, EntityPlayer par3EntityPlayer, int ticks)
|
||||
{
|
||||
if (AlchemicalWizardry.isThaumcraftLoaded)
|
||||
{
|
||||
Item item = stack.getItem();
|
||||
Class clazz = item.getClass();
|
||||
|
||||
while (!clazz.getName().equals("thaumcraft.common.items.wands.ItemWandCasting"))
|
||||
{
|
||||
if (clazz == Object.class)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clazz = clazz.getSuperclass();
|
||||
}
|
||||
|
||||
//Item testItem = item.set
|
||||
|
||||
//Method consumeAllVis = null;
|
||||
try
|
||||
{
|
||||
if (!playerCooldown.containsKey(par3EntityPlayer.username))
|
||||
{
|
||||
playerCooldown.put(par3EntityPlayer.username, 0);
|
||||
}
|
||||
|
||||
Method getFocusItem = clazz.getMethod("getFocusItem", ItemStack.class);
|
||||
ItemStack focusStack = (ItemStack) getFocusItem.invoke(item, stack);
|
||||
//int potency = EnchantmentHelper.getEnchantmentLevel(ThaumcraftApi.enchantPotency, focusStack);
|
||||
int cooldown = playerCooldown.get(par3EntityPlayer.username) + 1;
|
||||
playerCooldown.put(par3EntityPlayer.username, cooldown);
|
||||
//if(cooldown>=this.maxCooldown)
|
||||
{
|
||||
Method consumeAllVis = clazz.getMethod("consumeAllVis", ItemStack.class, EntityPlayer.class, AspectList.class, boolean.class);
|
||||
|
||||
if ((Boolean) consumeAllVis.invoke(item, stack, par3EntityPlayer, getVisCost(), true))
|
||||
{
|
||||
playerCooldown.put(par3EntityPlayer.username, 0);
|
||||
EnergyItems.checkAndSetItemOwner(focusStack, par3EntityPlayer);
|
||||
Vec3 vector = par3EntityPlayer.getLookVec();
|
||||
float distance = 2;
|
||||
//if(par3EntityPlayer.worldObj.isRemote)
|
||||
{
|
||||
List<Entity> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX + vector.xCoord * distance - 0.5f, par3EntityPlayer.posY + vector.yCoord * distance - 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance - 0.5f, par3EntityPlayer.posX + vector.xCoord * distance + 0.5f, par3EntityPlayer.posY + vector.yCoord * distance + 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance + 0.5f).expand(1, 1, 1));
|
||||
|
||||
for (Entity entity : entities)
|
||||
{
|
||||
if (entity.getEntityName() == par3EntityPlayer.username)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
entity.motionX = par3EntityPlayer.posX + vector.xCoord * distance - entity.posX;
|
||||
entity.motionY = par3EntityPlayer.posY + vector.yCoord * distance - entity.posY;
|
||||
entity.motionZ = par3EntityPlayer.posZ + vector.zCoord * distance - entity.posZ;
|
||||
//entity.setVelocity(par3EntityPlayer.posX+vector.xCoord*distance-entity.posX, par3EntityPlayer.posY+vector.yCoord*distance-entity.posY, par3EntityPlayer.posZ+vector.zCoord*distance-entity.posZ);
|
||||
}
|
||||
}
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
this.syphonBatteriesWithoutParticles(focusStack, par3EntityPlayer, 10, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchMethodException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (SecurityException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (IllegalAccessException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IllegalArgumentException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsingFocus(ItemStack stack, World paramWorld, EntityPlayer par3EntityPlayer, int paramInt)
|
||||
{
|
||||
playerCooldown.put(par3EntityPlayer.username, 0);
|
||||
|
||||
if (AlchemicalWizardry.isThaumcraftLoaded)
|
||||
{
|
||||
Item item = stack.getItem();
|
||||
Class clazz = item.getClass();
|
||||
|
||||
while (!clazz.getName().equals("thaumcraft.common.items.wands.ItemWandCasting"))
|
||||
{
|
||||
if (clazz == Object.class)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clazz = clazz.getSuperclass();
|
||||
}
|
||||
|
||||
//Item testItem = item.set
|
||||
|
||||
//Method consumeAllVis = null;
|
||||
try
|
||||
{
|
||||
Method getFocusItem = clazz.getMethod("getFocusItem", ItemStack.class);
|
||||
ItemStack focusStack = (ItemStack) getFocusItem.invoke(item, stack);
|
||||
int potency = EnchantmentHelper.getEnchantmentLevel(ThaumcraftApi.enchantPotency, focusStack);
|
||||
|
||||
if (potency > 0)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(focusStack, par3EntityPlayer);
|
||||
Vec3 vector = par3EntityPlayer.getLookVec();
|
||||
float distance = 2;
|
||||
//if(par3EntityPlayer.worldObj.isRemote)
|
||||
{
|
||||
List<Entity> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX + vector.xCoord * distance - 0.5f, par3EntityPlayer.posY + vector.yCoord * distance - 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance - 0.5f, par3EntityPlayer.posX + vector.xCoord * distance + 0.5f, par3EntityPlayer.posY + vector.yCoord * distance + 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance + 0.5f).expand(1, 1, 1));
|
||||
|
||||
for (Entity entity : entities)
|
||||
{
|
||||
if (entity.getEntityName() == par3EntityPlayer.username)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
float speed = 1.0F * potency;
|
||||
entity.motionX = vector.xCoord * speed;
|
||||
entity.motionY = vector.yCoord * speed;
|
||||
entity.motionZ = vector.zCoord * speed;
|
||||
//entity.setVelocity(par3EntityPlayer.posX+vector.xCoord*distance-entity.posX, par3EntityPlayer.posY+vector.yCoord*distance-entity.posY, par3EntityPlayer.posZ+vector.zCoord*distance-entity.posZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchMethodException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (SecurityException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (IllegalAccessException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IllegalArgumentException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack)
|
||||
{
|
||||
return "BLOODBLAST";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor()
|
||||
{
|
||||
return 0x8A0707;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getVisCost()
|
||||
{
|
||||
return visUsage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisCostPerTick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WandFocusAnimation getAnimation()
|
||||
{
|
||||
return WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
boolean hasOrnament()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
|
@ -8,10 +8,15 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
|
@ -20,13 +25,17 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer
|
||||
public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
public ItemSanguineArmour()
|
||||
public ItemSanguineArmour(int armorType)
|
||||
{
|
||||
super(AlchemicalWizardry.sanguineArmourArmourMaterial, 4, 0);
|
||||
super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType);
|
||||
setMaxDamage(1000);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
@ -34,36 +43,97 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
//this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet");
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet");
|
||||
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPlate");
|
||||
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundLeggings");
|
||||
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundBoots");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
if (this.equals(ModItems.sanguineHelmet))
|
||||
{
|
||||
return this.helmetIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.sanguineRobe))
|
||||
{
|
||||
return this.plateIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.sanguinePants))
|
||||
{
|
||||
return this.leggingsIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.sanguineBoots))
|
||||
{
|
||||
return this.bootsIcon;
|
||||
}
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
|
||||
{
|
||||
//if(AlchemicalWizardry.isThaumcraftLoaded)
|
||||
if (this == ModItems.sanguineHelmet)
|
||||
{
|
||||
if (this == ModItems.sanguineHelmet)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png";
|
||||
}
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png";
|
||||
}
|
||||
|
||||
if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_layer_1.png";
|
||||
}
|
||||
|
||||
if (this == ModItems.sanguinePants)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_layer_2.png";
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("A pair of goggles imbued with power");
|
||||
par3List.add("Vis discount: " + 8 + "%");
|
||||
}
|
||||
int discount = 0;
|
||||
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0:
|
||||
discount = 8;
|
||||
break;
|
||||
case 1:
|
||||
discount = 4;
|
||||
break;
|
||||
case 2:
|
||||
discount = 3;
|
||||
break;
|
||||
case 3:
|
||||
discount = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0:
|
||||
par3List.add("A pair of goggles imbued with power");
|
||||
break;
|
||||
case 1:
|
||||
|
||||
|
||||
// @Override
|
||||
// public boolean showNodes(ItemStack itemstack, EntityLivingBase player)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
case 2:
|
||||
|
||||
case 3:
|
||||
par3List.add("Robes imbued with forbidden power");
|
||||
}
|
||||
|
||||
par3List.add("Vis discount: " + discount + "%");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
|
@ -74,7 +144,7 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -92,7 +162,14 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
@Override
|
||||
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect)
|
||||
{
|
||||
return 8;
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0: return 8;
|
||||
case 1: return 4;
|
||||
case 2: return 3;
|
||||
case 3: return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -100,4 +177,10 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRunicCharge(ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue