1.7.2 is almost ready!

This commit is contained in:
WayofTime 2014-02-23 21:25:10 -05:00
parent d5ba110323
commit fa6ccb83a1
21 changed files with 231 additions and 69 deletions

View file

@ -16,14 +16,18 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor;
import net.minecraftforge.common.util.Constants;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.IBindable;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.Optional.Interface;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,IRevealer, IGoggles
@Optional.InterfaceList(value = {@Interface(iface="IRevealer", modid = "Thaumcraft"), @Interface(iface="IGoggles", modid = "Thaumcraft")})
public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable //,IRevealer, IGoggles
{
private static int invSize = 9;
private static IIcon helmetIcon;
@ -111,7 +115,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
return new ArmorProperties(-1, 0, 0);
}
if (helmet.equals(ModItems.boundHelmet) || plate.equals(ModItems.boundPlate) || leggings.equals(ModItems.boundLeggings) || boots.equals(ModItems.boundBoots))
if (helmet.getItem().equals(ModItems.boundHelmet) || plate.getItem().equals(ModItems.boundPlate) || leggings.getItem().equals(ModItems.boundLeggings) || boots.getItem().equals(ModItems.boundBoots))
{
if (source.isUnblockable())
{
@ -329,12 +333,12 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
if (itemStack != null)
{
if (itemStack.equals(ModItems.weakBloodShard))
if (itemStack.getItem().equals(ModItems.weakBloodShard))
{
max = Math.max(max, 1);
}
if (itemStack.equals(ModItems.demonBloodShard))
if (itemStack.getItem().equals(ModItems.demonBloodShard))
{
max = Math.max(max, 2);
}
@ -394,11 +398,10 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
if (itemTag == null)
{
itemStack.setTagCompound(new NBTTagCompound());
return null;
}
ItemStack[] inv = new ItemStack[9];
NBTTagList tagList = itemTag.getTagList("Inventory",0);
NBTTagList tagList = itemTag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND);
if (tagList == null)
{
@ -407,14 +410,13 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
int slot = tag.getByte("Slot");
if (slot >= 0 && slot < invSize)
{
inv[slot] = ItemStack.loadItemStackFromNBT(tag);
}
tagList.appendTag(tag);
}
return inv;
@ -463,7 +465,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
continue;
}
if (item.equals(ModItems.voidSigil))
if (item.getItem().equals(ModItems.voidSigil))
{
return true;
}
@ -540,27 +542,27 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
continue;
}
if (item.equals(ModItems.weakBloodOrb))
if (item.getItem().equals(ModItems.weakBloodOrb))
{
return 0.75f;
}
if (item.equals(ModItems.apprenticeBloodOrb))
if (item.getItem().equals(ModItems.apprenticeBloodOrb))
{
return 0.50f;
}
if (item.equals(ModItems.magicianBloodOrb))
if (item.getItem().equals(ModItems.magicianBloodOrb))
{
return 0.25f;
}
if (item.equals(ModItems.masterBloodOrb))
if (item.getItem().equals(ModItems.masterBloodOrb))
{
return 0.0f;
}
if (item.equals(ModItems.archmageBloodOrb))
if (item.getItem().equals(ModItems.archmageBloodOrb))
{
return 0.0f;
}

View file

@ -19,10 +19,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.IBindable;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -138,9 +140,10 @@ public class BoundAxe extends ItemAxe implements IBindable
return par1ItemStack;
}
int posX = (int) par3EntityPlayer.posX;
int posY = (int) par3EntityPlayer.posY;
int posZ = (int) par3EntityPlayer.posZ;
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.xCoord);
int posZ = (int)(blockVec.xCoord);
boolean silkTouch = false;
int so = Enchantment.silkTouch.effectId;
int fortune = Enchantment.fortune.effectId;

View file

@ -4,23 +4,23 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.IBindable;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -136,10 +136,11 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
{
return par1ItemStack;
}
int posX = (int) par3EntityPlayer.posX;
int posY = (int) par3EntityPlayer.posY;
int posZ = (int) par3EntityPlayer.posZ;
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.xCoord);
int posZ = (int)(blockVec.xCoord);
boolean silkTouch = false;
int so = Enchantment.silkTouch.effectId;
int fortune = Enchantment.fortune.effectId;

View file

@ -17,10 +17,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.IBindable;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import com.google.common.collect.Multimap;
@ -139,9 +141,10 @@ public class BoundShovel extends ItemSpade implements IBindable
return par1ItemStack;
}
int posX = (int) par3EntityPlayer.posX;
int posY = (int) par3EntityPlayer.posY;
int posZ = (int) par3EntityPlayer.posZ;
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.xCoord);
int posZ = (int)(blockVec.xCoord);
boolean silkTouch = false;
int so = Enchantment.silkTouch.effectId;
int fortune = Enchantment.fortune.effectId;