2015-01-10 12:23:41 -05:00
|
|
|
package WayofTime.alchemicalWizardry.common.omega;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2015-01-11 21:19:49 -05:00
|
|
|
import net.minecraft.world.World;
|
2015-01-10 12:23:41 -05:00
|
|
|
import WayofTime.alchemicalWizardry.ModItems;
|
2015-01-10 14:31:24 -05:00
|
|
|
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
2015-01-10 12:23:41 -05:00
|
|
|
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
|
|
|
|
|
|
|
public class OmegaParadigm
|
|
|
|
{
|
|
|
|
public OmegaArmour helmet;
|
|
|
|
public OmegaArmour chestPiece;
|
|
|
|
public OmegaArmour leggings;
|
|
|
|
public OmegaArmour boots;
|
|
|
|
|
2015-01-11 21:05:28 -05:00
|
|
|
public ReagentRegenConfiguration config;
|
|
|
|
|
|
|
|
public OmegaParadigm(Reagent reagent, OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots, ReagentRegenConfiguration config)
|
2015-01-10 12:23:41 -05:00
|
|
|
{
|
|
|
|
this.helmet = helmet;
|
|
|
|
this.chestPiece = chestPiece;
|
|
|
|
this.leggings = leggings;
|
|
|
|
this.boots = boots;
|
|
|
|
|
|
|
|
this.helmet.setParadigm(this);
|
|
|
|
this.chestPiece.setParadigm(this);
|
|
|
|
this.leggings.setParadigm(this);
|
|
|
|
this.boots.setParadigm(this);
|
2015-01-10 14:31:24 -05:00
|
|
|
this.helmet.setReagent(reagent);
|
|
|
|
this.chestPiece.setReagent(reagent);
|
|
|
|
this.leggings.setReagent(reagent);
|
|
|
|
this.boots.setReagent(reagent);
|
2015-01-11 21:05:28 -05:00
|
|
|
|
|
|
|
this.config = new ReagentRegenConfiguration(20, 10, 1);
|
2015-01-10 12:23:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public void convertPlayerArmour(EntityPlayer player)
|
|
|
|
{
|
|
|
|
ItemStack[] armours = player.inventory.armorInventory;
|
|
|
|
|
|
|
|
ItemStack helmetStack = armours[3];
|
|
|
|
ItemStack chestStack = armours[2];
|
|
|
|
ItemStack leggingsStack = armours[1];
|
|
|
|
ItemStack bootsStack = armours[0];
|
|
|
|
|
|
|
|
if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots)
|
|
|
|
{
|
|
|
|
ItemStack omegaHelmetStack = helmet.getSubstituteStack(helmetStack);
|
|
|
|
ItemStack omegaChestStack = chestPiece.getSubstituteStack(chestStack);
|
|
|
|
ItemStack omegaLeggingsStack = leggings.getSubstituteStack(leggingsStack);
|
|
|
|
ItemStack omegaBootsStack = boots.getSubstituteStack(bootsStack);
|
|
|
|
|
|
|
|
armours[3] = omegaHelmetStack;
|
|
|
|
armours[2] = omegaChestStack;
|
|
|
|
armours[1] = omegaLeggingsStack;
|
|
|
|
armours[0] = omegaBootsStack;
|
|
|
|
}
|
|
|
|
}
|
2015-01-11 21:05:28 -05:00
|
|
|
|
|
|
|
public ReagentRegenConfiguration getRegenConfig(EntityPlayer player)
|
|
|
|
{
|
|
|
|
return this.config;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMaxAdditionalHealth()
|
|
|
|
{
|
|
|
|
return 50;
|
|
|
|
}
|
|
|
|
|
|
|
|
public float getCostPerTickOfUse(EntityPlayer player)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isPlayerWearingFullSet(EntityPlayer player)
|
|
|
|
{
|
|
|
|
ItemStack[] armours = player.inventory.armorInventory;
|
|
|
|
|
|
|
|
ItemStack helmetStack = armours[3];
|
|
|
|
ItemStack chestStack = armours[2];
|
|
|
|
ItemStack leggingsStack = armours[1];
|
|
|
|
ItemStack bootsStack = armours[0];
|
|
|
|
|
|
|
|
return helmetStack != null && helmetStack.getItem() == helmet && chestStack != null && chestStack.getItem() == chestPiece && leggingsStack != null && leggingsStack.getItem() == leggings && bootsStack != null && bootsStack.getItem() == boots;
|
|
|
|
}
|
2015-01-11 21:19:49 -05:00
|
|
|
|
|
|
|
public void onUpdate(World world, EntityPlayer player, ItemStack stack)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2015-01-10 12:23:41 -05:00
|
|
|
}
|