Finished all errors except for the sigils.

This commit is contained in:
WayofTime 2015-07-30 09:31:16 -04:00
parent 9e2c0e6e74
commit 230b44fe88
44 changed files with 431 additions and 1148 deletions

View file

@ -3,26 +3,24 @@ package WayofTime.alchemicalWizardry.common.items.armour;
import java.util.List;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.potion.Potion;
import net.minecraft.util.DamageSource;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor;
import net.minecraftforge.common.util.Constants;
import thaumcraft.api.IGoggles;
import thaumcraft.api.IRunicArmor;
import thaumcraft.api.nodes.IRevealer;
import net.minecraftforge.fml.common.Optional;
import net.minecraftforge.fml.common.Optional.Interface;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
@ -32,23 +30,12 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour;
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;
@Optional.InterfaceList(value = {@Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft")})
public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge
public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, ILPGauge//, IRevealer, IGoggles, IRunicArmor
{
private static int invSize = 9;
@SideOnly(Side.CLIENT)
private IIcon helmetIcon;
@SideOnly(Side.CLIENT)
private IIcon plateIcon;
@SideOnly(Side.CLIENT)
private IIcon leggingsIcon;
@SideOnly(Side.CLIENT)
private IIcon bootsIcon;
public static boolean tryComplexRendering = true;
@ -109,10 +96,10 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0)
{
EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction();
if (enumaction == EnumAction.block)
if (enumaction == EnumAction.BLOCK)
{
this.model.heldItemRight = 3;
} else if (enumaction == EnumAction.bow)
} else if (enumaction == EnumAction.BOW)
{
this.model.aimedBow = true;
}
@ -128,44 +115,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundHelmet");
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPlate");
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundLeggings");
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundBoots");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1)
{
if (this.equals(ModItems.boundHelmet))
{
return this.helmetIcon;
}
if (this.equals(ModItems.boundPlate))
{
return this.plateIcon;
}
if (this.equals(ModItems.boundLeggings))
{
return this.leggingsIcon;
}
if (this.equals(ModItems.boundBoots))
{
return this.bootsIcon;
}
return this.itemIcon;
}
@Override
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
@ -594,66 +543,66 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
return false;
}
@Optional.Method(modid = "Thaumcraft")
public boolean hasIRevealer(ItemStack itemStack)
{
ItemStack[] inv = getInternalInventory(itemStack);
if (inv == null)
{
return false;
}
for (ItemStack item : inv)
{
if (item == null)
{
continue;
}
if (item.getItem() instanceof IRevealer)
{
return true;
}
}
return false;
}
@Optional.Method(modid = "Thaumcraft")
public boolean hasIGoggles(ItemStack itemStack)
{
ItemStack[] inv = getInternalInventory(itemStack);
if (inv == null)
{
return false;
}
int blood = getMaxBloodShardLevel(itemStack);
for (ItemStack item : inv)
{
if (item == null)
{
continue;
}
if (item.getItem() instanceof ArmourUpgrade && blood > 0)
{
if (item.getItem() instanceof IGoggles)
{
return true;
}
if(((ArmourUpgrade)item.getItem()).isUpgrade())
{
blood--;
}
}
}
return false;
}
// @Optional.Method(modid = "Thaumcraft")
// public boolean hasIRevealer(ItemStack itemStack)
// {
// ItemStack[] inv = getInternalInventory(itemStack);
//
// if (inv == null)
// {
// return false;
// }
//
// for (ItemStack item : inv)
// {
// if (item == null)
// {
// continue;
// }
//
// if (item.getItem() instanceof IRevealer)
// {
// return true;
// }
// }
//
// return false;
// }
//
// @Optional.Method(modid = "Thaumcraft")
// public boolean hasIGoggles(ItemStack itemStack)
// {
// ItemStack[] inv = getInternalInventory(itemStack);
//
// if (inv == null)
// {
// return false;
// }
//
// int blood = getMaxBloodShardLevel(itemStack);
//
// for (ItemStack item : inv)
// {
// if (item == null)
// {
// continue;
// }
// if (item.getItem() instanceof ArmourUpgrade && blood > 0)
// {
// if (item.getItem() instanceof IGoggles)
// {
// return true;
// }
//
// if(((ArmourUpgrade)item.getItem()).isUpgrade())
// {
// blood--;
// }
// }
// }
//
// return false;
// }
@Override
public boolean canSeeLPBar(ItemStack itemStack)
@ -783,75 +732,75 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
tag.setBoolean("invisible", invisible);
}
@Override
@Optional.Method(modid = "Thaumcraft")
public boolean showNodes(ItemStack itemstack, EntityLivingBase player)
{
return this.hasIRevealer(itemstack);
}
@Override
@Optional.Method(modid = "Thaumcraft")
public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player)
{
return this.hasIGoggles(itemstack);
}
@Override
@Optional.Method(modid = "Thaumcraft")
public int getRunicCharge(ItemStack itemstack)
{
ItemStack[] inv = this.getInternalInventory(itemstack);
int shardLevel = this.getMaxBloodShardLevel(itemstack);
int count = 0;
int harden = 0;
if (inv == null)
{
return 0;
}
for (ItemStack stack : inv)
{
if (count >= shardLevel)
{
break;
}
if (stack == null || !(stack.getItem() instanceof ArmourUpgrade))
{
continue;
}
if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType)
{
continue;
}
if (stack.hasTagCompound())
{
NBTTagCompound tag = stack.getTagCompound();
int enchLvl = tag.getByte("RS.HARDEN");
if (stack.getItem() instanceof IRunicArmor)
{
enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack);
}
if (enchLvl > 0)
{
harden += enchLvl;
if (((ArmourUpgrade) stack.getItem()).isUpgrade())
{
count += 1;
}
}
}
}
return harden;
}
// @Override
// @Optional.Method(modid = "Thaumcraft")
// public boolean showNodes(ItemStack itemstack, EntityLivingBase player)
// {
// return this.hasIRevealer(itemstack);
// }
//
// @Override
// @Optional.Method(modid = "Thaumcraft")
// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player)
// {
// return this.hasIGoggles(itemstack);
// }
//
// @Override
// @Optional.Method(modid = "Thaumcraft")
// public int getRunicCharge(ItemStack itemstack)
// {
// ItemStack[] inv = this.getInternalInventory(itemstack);
// int shardLevel = this.getMaxBloodShardLevel(itemstack);
// int count = 0;
// int harden = 0;
//
// if (inv == null)
// {
// return 0;
// }
//
// for (ItemStack stack : inv)
// {
// if (count >= shardLevel)
// {
// break;
// }
//
// if (stack == null || !(stack.getItem() instanceof ArmourUpgrade))
// {
// continue;
// }
//
// if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType)
// {
// continue;
// }
//
// if (stack.hasTagCompound())
// {
// NBTTagCompound tag = stack.getTagCompound();
//
// int enchLvl = tag.getByte("RS.HARDEN");
//
// if (stack.getItem() instanceof IRunicArmor)
// {
// enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack);
// }
//
// if (enchLvl > 0)
// {
// harden += enchLvl;
// if (((ArmourUpgrade) stack.getItem()).isUpgrade())
// {
// count += 1;
// }
// }
// }
// }
//
// return harden;
// }
@Override
public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player)

View file

@ -20,15 +20,16 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public abstract class OmegaArmour extends BoundArmour
{
@ -90,10 +91,9 @@ public abstract class OmegaArmour extends BoundArmour
{
if(this.storeBiomeID())
{
int xCoord = (int) Math.floor(player.posX);
int zCoord = (int) Math.floor(player.posZ);
BlockPos pos = player.getPosition();
BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord);
BiomeGenBase biome = world.getBiomeGenForCoords(pos);
if(biome != null)
{
this.setBiomeIDStored(itemStack, biome.biomeID);
@ -376,10 +376,10 @@ public abstract class OmegaArmour extends BoundArmour
if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0)
{
EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction();
if (enumaction == EnumAction.block)
if (enumaction == EnumAction.BLOCK)
{
this.model.heldItemRight = 3;
} else if (enumaction == EnumAction.bow)
} else if (enumaction == EnumAction.BOW)
{
this.model.aimedBow = true;
}

View file

@ -3,32 +3,19 @@ package WayofTime.alchemicalWizardry.common.items.armour;
import java.util.UUID;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import WayofTime.alchemicalWizardry.ModItems;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class OmegaArmourEarth extends OmegaArmour
{
@SideOnly(Side.CLIENT)
private IIcon helmetIcon;
@SideOnly(Side.CLIENT)
private IIcon plateIcon;
@SideOnly(Side.CLIENT)
private IIcon leggingsIcon;
@SideOnly(Side.CLIENT)
private IIcon bootsIcon;
{
public OmegaArmourEarth(int armorType)
{
super(armorType);
@ -55,44 +42,6 @@ public class OmegaArmourEarth extends OmegaArmour
return new ModelOmegaEarth(0.5f, false, false, true, false);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_earth");
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_earth");
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_earth");
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_earth");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1)
{
if (this.equals(ModItems.boundHelmetEarth))
{
return this.helmetIcon;
}
if (this.equals(ModItems.boundPlateEarth))
{
return this.plateIcon;
}
if (this.equals(ModItems.boundLeggingsEarth))
{
return this.leggingsIcon;
}
if (this.equals(ModItems.boundBootsEarth))
{
return this.bootsIcon;
}
return this.itemIcon;
}
@Override
public Multimap getAttributeModifiers(ItemStack stack)
{

View file

@ -2,34 +2,22 @@ package WayofTime.alchemicalWizardry.common.items.armour;
import java.util.UUID;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.biome.BiomeGenBase;
import WayofTime.alchemicalWizardry.ModItems;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
public class OmegaArmourFire extends OmegaArmour
{
@SideOnly(Side.CLIENT)
private IIcon helmetIcon;
@SideOnly(Side.CLIENT)
private IIcon plateIcon;
@SideOnly(Side.CLIENT)
private IIcon leggingsIcon;
@SideOnly(Side.CLIENT)
private IIcon bootsIcon;
{
public OmegaArmourFire(int armorType)
{
super(armorType);
@ -57,44 +45,6 @@ public class OmegaArmourFire extends OmegaArmour
return new ModelOmegaFire(0.5f, false, false, true, false);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_fire");
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_fire");
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_fire");
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_fire");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1)
{
if (this.equals(ModItems.boundHelmetFire))
{
return this.helmetIcon;
}
if (this.equals(ModItems.boundPlateFire))
{
return this.plateIcon;
}
if (this.equals(ModItems.boundLeggingsFire))
{
return this.leggingsIcon;
}
if (this.equals(ModItems.boundBootsFire))
{
return this.bootsIcon;
}
return this.itemIcon;
}
@Override
public Multimap getAttributeModifiers(ItemStack stack)
{

View file

@ -2,33 +2,21 @@ package WayofTime.alchemicalWizardry.common.items.armour;
import java.util.UUID;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.biome.BiomeGenBase;
import WayofTime.alchemicalWizardry.ModItems;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
public class OmegaArmourWater extends OmegaArmour
{
@SideOnly(Side.CLIENT)
private IIcon helmetIcon;
@SideOnly(Side.CLIENT)
private IIcon plateIcon;
@SideOnly(Side.CLIENT)
private IIcon leggingsIcon;
@SideOnly(Side.CLIENT)
private IIcon bootsIcon;
{
public OmegaArmourWater(int armorType)
{
super(armorType);
@ -55,44 +43,6 @@ public class OmegaArmourWater extends OmegaArmour
return new ModelOmegaWater(0.5f, false, false, true, false);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_water");
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_water");
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_water");
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_water");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1)
{
if (this.equals(ModItems.boundHelmetWater))
{
return this.helmetIcon;
}
if (this.equals(ModItems.boundPlateWater))
{
return this.plateIcon;
}
if (this.equals(ModItems.boundLeggingsWater))
{
return this.leggingsIcon;
}
if (this.equals(ModItems.boundBootsWater))
{
return this.bootsIcon;
}
return this.itemIcon;
}
@Override
public Multimap getAttributeModifiers(ItemStack stack)
{

View file

@ -3,32 +3,19 @@ package WayofTime.alchemicalWizardry.common.items.armour;
import java.util.UUID;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import WayofTime.alchemicalWizardry.ModItems;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class OmegaArmourWind extends OmegaArmour
{
@SideOnly(Side.CLIENT)
private IIcon helmetIcon;
@SideOnly(Side.CLIENT)
private IIcon plateIcon;
@SideOnly(Side.CLIENT)
private IIcon leggingsIcon;
@SideOnly(Side.CLIENT)
private IIcon bootsIcon;
{
public OmegaArmourWind(int armorType)
{
super(armorType);
@ -55,44 +42,6 @@ public class OmegaArmourWind extends OmegaArmour
return new ModelOmegaWind(0.5f, false, false, true, false);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_wind");
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_wind");
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_wind");
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_wind");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1)
{
if (this.equals(ModItems.boundHelmetWind))
{
return this.helmetIcon;
}
if (this.equals(ModItems.boundPlateWind))
{
return this.plateIcon;
}
if (this.equals(ModItems.boundLeggingsWind))
{
return this.leggingsIcon;
}
if (this.equals(ModItems.boundBootsWind))
{
return this.bootsIcon;
}
return this.itemIcon;
}
@Override
public Multimap getAttributeModifiers(ItemStack stack)
{

View file

@ -1,36 +1,34 @@
package WayofTime.alchemicalWizardry.common.items.energy;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.IIcon;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.LinkedList;
import java.util.List;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
public class ItemAttunedCrystal extends Item implements IReagentManipulator
{
public static final int maxDistance = 6;
public IIcon crystalBody;
public IIcon crystalLabel;
public ItemAttunedCrystal()
{
super();
@ -78,62 +76,6 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal1");
this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal2");
}
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass)
{
switch (pass)
{
case 0:
return 256 * (256 * 255 + 255) + 255;
case 1:
Reagent reagent = this.getReagent(stack);
if (reagent != null)
{
return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue());
}
break;
}
return 256 * (256 * 255 + 255) + 255;
}
@Override
@SideOnly(Side.CLIENT)
public boolean requiresMultipleRenderPasses()
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderPasses(int meta)
{
return 2;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass)
{
switch (pass)
{
case 0:
return this.crystalBody;
case 1:
return this.crystalLabel;
}
return this.itemIcon;
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
@ -157,11 +99,9 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
{
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
int x = movingobjectposition.blockX;
int y = movingobjectposition.blockY;
int z = movingobjectposition.blockZ;
BlockPos pos = movingobjectposition.func_178782_a();
TileEntity tile = world.getTileEntity(x, y, z);
TileEntity tile = world.getTileEntity(pos);
if (!(tile instanceof IReagentHandler))
{
@ -172,7 +112,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
if (player.isSneaking())
{
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN);
ReagentContainerInfo[] infos = relay.getContainerInfo(EnumFacing.UP);
if (infos != null)
{
List<Reagent> reagentList = new LinkedList();
@ -223,13 +163,13 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
return itemStack;
}
if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance)
if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - pos.getX()) > maxDistance || Math.abs(coords.yCoord - pos.getY()) > maxDistance || Math.abs(coords.zCoord - pos.getZ()) > maxDistance)
{
player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.toofar"));
return itemStack;
}
TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
TileEntity pastTile = world.getTileEntity(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord));
if (!(pastTile instanceof TEReagentConduit))
{
player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.cannotfind"));
@ -247,10 +187,10 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
if (player.isSneaking())
{
pastRelay.removeReagentDestinationViaActual(reagent, x, y, z);
pastRelay.removeReagentDestinationViaActual(reagent, pos);
} else
{
if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z))
if (pastRelay.addReagentDestinationViaActual(reagent, pos))
{
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.attunedcrystal.linked") + " " + reagent.name));
} else
@ -258,13 +198,13 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.noconnections"));
}
}
world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord);
world.markBlockForUpdate(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord));
} else
{
int dimension = world.provider.getDimensionId();
this.setDimension(itemStack, dimension);
this.setCoordinates(itemStack, new Int3(x, y, z));
this.setCoordinates(itemStack, new Int3(pos));
player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.linking"));
}

View file

@ -1,21 +1,19 @@
package WayofTime.alchemicalWizardry.common.items.energy;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import java.util.List;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
public class ItemDestinationClearer extends Item implements IReagentManipulator
{
@ -26,13 +24,6 @@ public class ItemDestinationClearer extends Item implements IReagentManipulator
this.maxStackSize = 1;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TankClearer");
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
@ -57,11 +48,9 @@ public class ItemDestinationClearer extends Item implements IReagentManipulator
{
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
int x = movingobjectposition.blockX;
int y = movingobjectposition.blockY;
int z = movingobjectposition.blockZ;
BlockPos pos = movingobjectposition.func_178782_a();
TileEntity tile = world.getTileEntity(x, y, z);
TileEntity tile = world.getTileEntity(pos);
if (!(tile instanceof TEReagentConduit))
{

View file

@ -1,33 +1,29 @@
package WayofTime.alchemicalWizardry.common.items.energy;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IIcon;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.LinkedList;
import java.util.List;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
public class ItemTankSegmenter extends Item implements IReagentManipulator
{
@SideOnly(Side.CLIENT)
public IIcon crystalBody;
@SideOnly(Side.CLIENT)
public IIcon crystalLabel;
public ItemTankSegmenter()
{
super();
@ -64,62 +60,6 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter1");
this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter2");
}
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass)
{
switch (pass)
{
case 0:
return 256 * (256 * 255 + 255) + 255;
case 1:
Reagent reagent = this.getReagent(stack);
if (reagent != null)
{
return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue());
}
break;
}
return 256 * (256 * 255 + 255) + 255;
}
@Override
@SideOnly(Side.CLIENT)
public boolean requiresMultipleRenderPasses()
{
return true;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderPasses(int meta)
{
return 2;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass)
{
switch (pass)
{
case 0:
return this.crystalBody;
case 1:
return this.crystalLabel;
}
return this.itemIcon;
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
@ -136,10 +76,8 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator
{
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
int x = movingobjectposition.blockX;
int y = movingobjectposition.blockY;
int z = movingobjectposition.blockZ;
TileEntity tile = world.getTileEntity(x, y, z);
BlockPos pos = movingobjectposition.func_178782_a();
TileEntity tile = world.getTileEntity(pos);
if (!(tile instanceof ISegmentedReagentHandler))
{
return itemStack;
@ -148,7 +86,7 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator
if (player.isSneaking())
{
ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(ForgeDirection.UNKNOWN);
ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(EnumFacing.UP);
if (infos != null)
{
List<Reagent> reagentList = new LinkedList();

View file

@ -1,11 +1,11 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
import com.google.common.collect.HashMultimap;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.IAttribute;
@ -23,12 +23,10 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.collect.HashMultimap;
public class AlchemyFlask extends Item
{
@ -40,13 +38,6 @@ public class AlchemyFlask extends Item
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:PotionFlask");
}
public static ArrayList<AlchemyPotionHelper> getEffects(ItemStack par1ItemStack)
{
if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("CustomFlaskEffects"))
@ -149,10 +140,10 @@ public class AlchemyFlask extends Item
{
if (this.isPotionThrowable(par1ItemStack))
{
return EnumAction.none;
return EnumAction.NONE;
}
return EnumAction.drink;
return EnumAction.DRINK;
}
/**
@ -283,7 +274,7 @@ public class AlchemyFlask extends Item
PotionEffect potioneffect = (PotionEffect) iterator.next();
String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim();
Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
Map map = potion.func_111186_k();
Map map = potion.getAttributeModifierMap();
if (map != null && map.size() > 0)
{
@ -293,7 +284,7 @@ public class AlchemyFlask extends Item
{
Entry entry = (Entry) iterator1.next();
AttributeModifier attributemodifier = (AttributeModifier) entry.getValue();
AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.func_111183_a(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation());
AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.getAttributeModifierAmount(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation());
hashmultimap.put(((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1);
}
}
@ -345,11 +336,11 @@ public class AlchemyFlask extends Item
if (d0 > 0.0D)
{
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())}));
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())}));
} else if (d0 < 0.0D)
{
d1 *= -1.0D;
par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())}));
par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())}));
}
}
}

View file

@ -1,19 +1,17 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import org.lwjgl.input.Keyboard;
import java.util.List;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
public class AlchemyReagent extends Item
{
@ -24,61 +22,6 @@ public class AlchemyReagent extends Item
this.setMaxStackSize(64);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
if (this == ModItems.incendium)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Incendium");
return;
}
if (this == ModItems.magicales)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Magicales");
return;
}
if (this == ModItems.sanctus)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Sanctus");
return;
}
if (this == ModItems.aether)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aether");
return;
}
if (this == ModItems.simpleCatalyst)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleCatalyst");
return;
}
if (this == ModItems.crepitous)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crepitous");
return;
}
if (this == ModItems.crystallos)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crystallos");
return;
}
if (this == ModItems.terrae)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Terrae");
return;
}
if (this == ModItems.aquasalus)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aquasalus");
return;
}
if (this == ModItems.tennebrae)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae");
}
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class AverageLengtheningCatalyst extends LengtheningCatalyst
{
@ -10,11 +7,4 @@ public class AverageLengtheningCatalyst extends LengtheningCatalyst
{
super(2);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AverageLengtheningCatalyst");
}
}

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class AveragePowerCatalyst extends PowerCatalyst
{
@ -10,11 +7,4 @@ public class AveragePowerCatalyst extends PowerCatalyst
{
super(2);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AveragePowerCatalyst");
}
}

View file

@ -1,11 +1,8 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import net.minecraft.item.Item;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
public class CombinationalCatalyst extends Item implements ICombinationalCatalyst
{
@ -15,10 +12,4 @@ public class CombinationalCatalyst extends Item implements ICombinationalCatalys
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:CombinationalCatalyst");
}
}

View file

@ -1,9 +1,6 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class EnhancedFillingAgent extends WeakFillingAgent
{
@ -41,11 +38,4 @@ public class EnhancedFillingAgent extends WeakFillingAgent
}
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnhancedFillingAgent");
}
}

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class GreaterLengtheningCatalyst extends LengtheningCatalyst
{
@ -10,11 +7,4 @@ public class GreaterLengtheningCatalyst extends LengtheningCatalyst
{
super(3);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GreaterLengtheningCatalyst");
}
}

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class GreaterPowerCatalyst extends PowerCatalyst
{
@ -10,11 +7,4 @@ public class GreaterPowerCatalyst extends PowerCatalyst
{
super(3);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GreaterPowerCatalyst");
}
}

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class MundaneLengtheningCatalyst extends LengtheningCatalyst
{
@ -10,11 +7,4 @@ public class MundaneLengtheningCatalyst extends LengtheningCatalyst
{
super(1);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MundaneLengtheningCatalyst");
}
}

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class MundanePowerCatalyst extends PowerCatalyst
{
@ -10,11 +7,4 @@ public class MundanePowerCatalyst extends PowerCatalyst
{
super(1);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MundanePowerCatalyst");
}
}

View file

@ -1,19 +1,18 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.common.IBindingAgent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import org.lwjgl.input.Keyboard;
import java.util.List;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.common.IBindingAgent;
public class StandardBindingAgent extends Item implements IBindingAgent
{
@ -29,13 +28,6 @@ public class StandardBindingAgent extends Item implements IBindingAgent
return (float) Math.pow(0.65, potions);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:StandardBindingAgent");
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{

View file

@ -1,9 +1,6 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class StandardFillingAgent extends WeakFillingAgent
{
@ -28,11 +25,4 @@ public class StandardFillingAgent extends WeakFillingAgent
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:StandardFillingAgent");
}
}

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
public class WeakBindingAgent extends StandardBindingAgent
{
@ -16,11 +13,4 @@ public class WeakBindingAgent extends StandardBindingAgent
{
return (float) Math.pow(0.4, potions);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBindingAgent");
}
}

View file

@ -1,20 +1,19 @@
package WayofTime.alchemicalWizardry.common.items.potion;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.common.IFillingAgent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import org.lwjgl.input.Keyboard;
import java.util.List;
import java.util.Random;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.common.IFillingAgent;
public class WeakFillingAgent extends Item implements IFillingAgent
{
@ -48,13 +47,6 @@ public class WeakFillingAgent extends Item implements IFillingAgent
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakFillingAgent");
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.items.routing;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import codechicken.lib.render.TextureUtils.IIconRegister;
public class InputRoutingFocus extends RoutingFocus
{
@ -10,11 +7,4 @@ public class InputRoutingFocus extends RoutingFocus
{
super();
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InputRoutingFocus");
}
}

View file

@ -2,30 +2,23 @@ package WayofTime.alchemicalWizardry.common.items.routing;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitDefault;
import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitGlobal;
import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitIgnMeta;
import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitMatchNBT;
import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitModItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingFocus
{
IIcon modItemIcon;
IIcon ignMetaIcon;
IIcon matchNBTIcon;
IIcon globalIcon;
{
public OutputRoutingFocus()
{
super();
@ -46,36 +39,6 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocus");
this.modItemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusModItems");
this.ignMetaIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusIgnMeta");
this.matchNBTIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusMatchNBT");
this.globalIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusGlobal");
}
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int damage)
{
switch(damage)
{
case 0:
return this.itemIcon;
case 1:
return this.modItemIcon;
case 2:
return this.ignMetaIcon;
case 3:
return this.matchNBTIcon;
case 4:
return this.globalIcon;
}
return this.itemIcon;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{

View file

@ -7,14 +7,13 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import codechicken.lib.render.TextureUtils.IIconRegister;
public class SigilOfHolding extends EnergyItems
{
@ -30,51 +29,21 @@ public class SigilOfHolding extends EnergyItems
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfHolding");
}
@Override
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
{
if (!(stack.getTagCompound() == null))
{
ItemStack[] inv = getInternalInventory(stack);
if (inv == null)
{
return this.itemIcon;
}
ItemStack item = getCurrentSigil(stack);
if (item != null)
{
return item.getIconIndex();
}
}
return this.itemIcon;
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean par4)
{
par3List.add(StatCollector.translateToLocal("tooltip.sigilofholding.desc"));
if (!(par1ItemStack.getTagCompound() == null))
if (!(stack.getTagCompound() == null))
{
par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName"));
ItemStack[] inv = getInternalInventory(par1ItemStack);
par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName"));
ItemStack[] inv = getInternalInventory(stack);
if (inv == null)
{
return;
}
int currentSlot = getCurrentItem(par1ItemStack);
int currentSlot = getCurrentItem(stack);
ItemStack item = inv[currentSlot];
if (item != null)
@ -93,12 +62,12 @@ public class SigilOfHolding extends EnergyItems
}
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (checkAndSetItemOwner(par1ItemStack, par2EntityPlayer))
if (checkAndSetItemOwner(stack, player))
{
int currentSlot = getCurrentItem(par1ItemStack);
ItemStack[] inv = getInternalInventory(par1ItemStack);
int currentSlot = getCurrentItem(stack);
ItemStack[] inv = getInternalInventory(stack);
if (inv == null)
{
@ -112,9 +81,9 @@ public class SigilOfHolding extends EnergyItems
return false;
}
boolean bool = itemUsed.getItem().onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
boolean bool = itemUsed.getItem().onItemUse(stack, player, world, pos, side, hitX, hitY, hitZ);
saveInventory(par1ItemStack, inv);
saveInventory(stack, inv);
return bool;
}
@ -123,36 +92,36 @@ public class SigilOfHolding extends EnergyItems
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer)
{
if (checkAndSetItemOwner(par1ItemStack, par3EntityPlayer))
if (checkAndSetItemOwner(stack, par3EntityPlayer))
{
if (par3EntityPlayer.isSneaking())
{
InventoryHolding.setUUID(par1ItemStack);
InventoryHolding.setUUID(stack);
par3EntityPlayer.openGui(AlchemicalWizardry.instance, 3, par3EntityPlayer.worldObj, (int) par3EntityPlayer.posX, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ);
return par1ItemStack;
return stack;
}
int currentSlot = getCurrentItem(par1ItemStack);
ItemStack[] inv = getInternalInventory(par1ItemStack);
int currentSlot = getCurrentItem(stack);
ItemStack[] inv = getInternalInventory(stack);
if (inv == null)
{
return par1ItemStack;
return stack;
}
ItemStack itemUsed = inv[currentSlot];
if (itemUsed == null)
{
return par1ItemStack;
return stack;
}
itemUsed.getItem().onItemRightClick(itemUsed, par2World, par3EntityPlayer);
saveInventory(par1ItemStack, inv);
saveInventory(stack, inv);
}
return par1ItemStack;
return stack;
}
public static int next(int mode)
@ -183,7 +152,7 @@ public class SigilOfHolding extends EnergyItems
{
if (itemStack.getTagCompound() == null)
{
itemStack.getTagCompound() = new NBTTagCompound();
itemStack.setTagCompound(new NBTTagCompound());
itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, invSize);
}
}
@ -283,17 +252,17 @@ public class SigilOfHolding extends EnergyItems
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
public void onUpdate(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5)
{
if (!(par1ItemStack.getTagCompound() == null))
if (!(stack.getTagCompound() == null))
{
this.tickInternalInventory(par1ItemStack, par2World, par3Entity, par4, par5);
this.tickInternalInventory(stack, par2World, par3Entity, par4, par5);
}
}
public void tickInternalInventory(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
public void tickInternalInventory(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5)
{
ItemStack[] inv = getInternalInventory(par1ItemStack);
ItemStack[] inv = getInternalInventory(stack);
if (inv == null)
{