This commit is contained in:
WayofTime 2015-07-29 18:15:25 -04:00
parent 800bf06872
commit 94b74fe309
3 changed files with 200 additions and 198 deletions

View file

@ -8,10 +8,11 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph;
public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
{ {
@ -23,7 +24,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
} }
@Override @Override
public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount)
{ {
switch(meta) switch(meta)
{ {
@ -37,7 +38,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
} }
@Override @Override
public int getEnchantability(World world, int x, int y, int z, int meta) public int getEnchantability(World world, BlockPos pos, int meta)
{ {
switch(meta) switch(meta)
{ {
@ -49,7 +50,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
} }
@Override @Override
public int getEnchantmentLevel(World world, int x, int y, int z, int meta) public int getEnchantmentLevel(World world, BlockPos pos, int meta)
{ {
switch(meta) switch(meta)
{ {

View file

@ -7,10 +7,11 @@ import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph;
public class BlockStabilityGlyph extends Block implements IStabilityGlyph public class BlockStabilityGlyph extends Block implements IStabilityGlyph
{ {
@ -22,7 +23,7 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph
} }
@Override @Override
public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount)
{ {
switch(meta) switch(meta)
{ {

View file

@ -1,192 +1,192 @@
package WayofTime.alchemicalWizardry.common.items.thaumcraft; //package WayofTime.alchemicalWizardry.common.items.thaumcraft;
//
import WayofTime.alchemicalWizardry.AlchemicalWizardry; //import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems; //import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; //import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import cpw.mods.fml.relauncher.Side; //import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; //import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister; //import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity; //import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; //import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; //import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemArmor; //import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack; //import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; //import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector; //import net.minecraft.util.StatCollector;
import net.minecraft.world.World; //import net.minecraft.world.World;
import thaumcraft.api.IGoggles; //import thaumcraft.api.IGoggles;
import thaumcraft.api.IRepairable; //import thaumcraft.api.IRepairable;
import thaumcraft.api.IRunicArmor; //import thaumcraft.api.IRunicArmor;
import thaumcraft.api.IVisDiscountGear; //import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.aspects.Aspect; //import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.nodes.IRevealer; //import thaumcraft.api.nodes.IRevealer;
//
import java.util.List; //import java.util.List;
//
public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable //public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable
{ //{
@SideOnly(Side.CLIENT) // @SideOnly(Side.CLIENT)
private IIcon helmetIcon; // private IIcon helmetIcon;
@SideOnly(Side.CLIENT) // @SideOnly(Side.CLIENT)
private IIcon plateIcon; // private IIcon plateIcon;
@SideOnly(Side.CLIENT) // @SideOnly(Side.CLIENT)
private IIcon leggingsIcon; // private IIcon leggingsIcon;
@SideOnly(Side.CLIENT) // @SideOnly(Side.CLIENT)
private IIcon bootsIcon; // private IIcon bootsIcon;
//
public ItemSanguineArmour(int armorType) // public ItemSanguineArmour(int armorType)
{ // {
super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType); // super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType);
setMaxDamage(1000); // setMaxDamage(1000);
setCreativeTab(AlchemicalWizardry.tabBloodMagic); // setCreativeTab(AlchemicalWizardry.tabBloodMagic);
} // }
//
@Override // @Override
@SideOnly(Side.CLIENT) // @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) // public void registerIcons(IIconRegister iconRegister)
{ // {
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); // this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet"); // this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet");
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate"); // this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate");
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings"); // this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings");
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots"); // this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots");
} // }
//
@SideOnly(Side.CLIENT) // @SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1) // public IIcon getIconFromDamage(int par1)
{ // {
if (this.equals(ModItems.sanguineHelmet)) // if (this.equals(ModItems.sanguineHelmet))
{ // {
return this.helmetIcon; // return this.helmetIcon;
} // }
//
if (this.equals(ModItems.sanguineRobe)) // if (this.equals(ModItems.sanguineRobe))
{ // {
return this.plateIcon; // return this.plateIcon;
} // }
//
if (this.equals(ModItems.sanguinePants)) // if (this.equals(ModItems.sanguinePants))
{ // {
return this.leggingsIcon; // return this.leggingsIcon;
} // }
//
if (this.equals(ModItems.sanguineBoots)) // if (this.equals(ModItems.sanguineBoots))
{ // {
return this.bootsIcon; // return this.bootsIcon;
} // }
//
return this.itemIcon; // return this.itemIcon;
} // }
//
@Override // @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) // public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
{ // {
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) // if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots)
{ // {
return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; // return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png";
} // }
//
if (this == ModItems.sanguinePants) // if (this == ModItems.sanguinePants)
{ // {
return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png"; // return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png";
} else // } else
{ // {
return null; // return null;
} // }
} // }
//
@Override // @Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) // public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{ // {
int discount = 0; // int discount = 0;
//
switch (this.armorType) // switch (this.armorType)
{ // {
case 0: // case 0:
discount = 6; // discount = 6;
break; // break;
case 1: // case 1:
discount = 3; // discount = 3;
break; // break;
case 2: // case 2:
discount = 3; // discount = 3;
break; // break;
case 3: // case 3:
discount = 2; // discount = 2;
break; // break;
} // }
//
switch (this.armorType) // switch (this.armorType)
{ // {
case 0: // case 0:
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1")); // par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1"));
break; // break;
case 1: // case 1:
//
case 2: // case 2:
//
case 3: // case 3:
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2")); // par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2"));
} // }
//
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%"); // par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%");
} // }
//
@Override // @Override
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) // public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
{ // {
return; // return;
} // }
//
@Override // @Override
public boolean isUpgrade() // public boolean isUpgrade()
{ // {
return true; // return true;
} // }
//
@Override // @Override
public int getEnergyForTenSeconds() // public int getEnergyForTenSeconds()
{ // {
return 0; // return 0;
} // }
//
@Override // @Override
public boolean showNodes(ItemStack itemstack, EntityLivingBase player) // public boolean showNodes(ItemStack itemstack, EntityLivingBase player)
{ // {
return true; // return true;
} // }
//
@Override // @Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) // public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect)
{ // {
switch (this.armorType) // switch (this.armorType)
{ // {
case 0: // case 0:
return 7; // return 7;
case 1: // case 1:
return 3; // return 3;
case 2: // case 2:
return 2; // return 2;
case 3: // case 3:
return 2; // return 2;
} // }
return 0; // return 0;
} // }
//
@Override // @Override
public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) // public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player)
{ // {
return true; // return true;
} // }
//
@Override // @Override
public int getRunicCharge(ItemStack itemstack) // public int getRunicCharge(ItemStack itemstack)
{ // {
return 0; // return 0;
} // }
} //}