2015-11-02 20:39:44 +00:00
|
|
|
package WayofTime.bloodmagic.api.orb;
|
2015-10-30 03:22:14 +00:00
|
|
|
|
2015-11-02 20:39:44 +00:00
|
|
|
import WayofTime.bloodmagic.api.registry.OrbRegistry;
|
2015-10-30 03:22:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base object for all Blood Orbs. Makes Orb creation quite a bit easier.
|
2015-12-30 20:34:40 +00:00
|
|
|
*
|
|
|
|
* Just create a new BloodOrb instance then register it with
|
|
|
|
* {@link OrbRegistry#registerOrb(BloodOrb)} This will allow the use of just one
|
|
|
|
* item ID for all orbs. If an addon dev needs more control over the intricacies
|
|
|
|
* of their orb (custom right clicking, renderers, etc), they can just create
|
|
|
|
* their own item as normal.
|
2015-10-30 03:22:14 +00:00
|
|
|
*/
|
2015-12-30 20:34:40 +00:00
|
|
|
public class BloodOrb
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
private String name;
|
|
|
|
private int tier;
|
|
|
|
private int capacity;
|
2015-11-02 20:39:44 +00:00
|
|
|
private String owner = "BloodMagic";
|
2015-10-30 03:22:14 +00:00
|
|
|
|
|
|
|
/**
|
2015-12-30 20:34:40 +00:00
|
|
|
* A base object for BloodOrbs. A bit cleaner than the old way through
|
|
|
|
* EnergyItems.
|
|
|
|
*
|
|
|
|
* @param name
|
2016-01-02 22:56:37 +00:00
|
|
|
* - A name for the Orb. Gets put into an unlocalized name.
|
2015-12-30 20:34:40 +00:00
|
|
|
* @param tier
|
2016-01-02 22:56:37 +00:00
|
|
|
* - The tier of the Orb.
|
2015-12-30 20:34:40 +00:00
|
|
|
* @param capacity
|
2016-01-02 22:56:37 +00:00
|
|
|
* - The max amount of LP the Orb can store.
|
2015-10-30 03:22:14 +00:00
|
|
|
*/
|
2015-12-30 20:34:40 +00:00
|
|
|
public BloodOrb(String name, int tier, int capacity)
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
this.name = name;
|
|
|
|
this.tier = tier;
|
|
|
|
this.capacity = capacity;
|
|
|
|
}
|
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
public String getName()
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
public int getTier()
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
return tier;
|
|
|
|
}
|
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
public int getCapacity()
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
return capacity;
|
|
|
|
}
|
|
|
|
|
2015-12-30 20:34:40 +00:00
|
|
|
public String getOwner()
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
return owner;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-12-30 20:34:40 +00:00
|
|
|
* For setting the MODID of the mod that creates the Orb. Not required, but
|
|
|
|
* preferred.
|
|
|
|
*
|
2015-10-30 03:22:14 +00:00
|
|
|
* @return - The BloodOrb object for further use.
|
|
|
|
*/
|
2015-12-30 20:34:40 +00:00
|
|
|
public BloodOrb setOwner(String owner)
|
|
|
|
{
|
2015-10-30 03:22:14 +00:00
|
|
|
this.owner = owner;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
return "BloodOrb{" + "name='" + name + '\'' + ", tier=" + tier + ", capacity=" + capacity + ", owner=" + owner + '}';
|
2015-10-30 03:22:14 +00:00
|
|
|
}
|
|
|
|
}
|