Merge apibutnotreally with the main packages
Do not consider anything outside of the true API safe to use. And even then, I'm changing things. Just wait. Please I beg you.
This commit is contained in:
parent
616c08094b
commit
2fecb427fd
399 changed files with 958 additions and 977 deletions
38
src/main/java/WayofTime/bloodmagic/item/ItemSigil.java
Normal file
38
src/main/java/WayofTime/bloodmagic/item/ItemSigil.java
Normal file
|
@ -0,0 +1,38 @@
|
|||
package WayofTime.bloodmagic.item;
|
||||
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.iface.IBindable;
|
||||
import WayofTime.bloodmagic.iface.ISigil;
|
||||
import WayofTime.bloodmagic.util.helper.NBTHelper;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Base class for all (static) sigils.
|
||||
*/
|
||||
public class ItemSigil extends Item implements IBindable, ISigil {
|
||||
private int lpUsed;
|
||||
|
||||
public ItemSigil(int lpUsed) {
|
||||
super();
|
||||
|
||||
this.lpUsed = lpUsed;
|
||||
}
|
||||
|
||||
public boolean isUnusable(ItemStack stack) {
|
||||
NBTHelper.checkNBT(stack);
|
||||
|
||||
return stack.getTagCompound().getBoolean(Constants.NBT.UNUSABLE);
|
||||
}
|
||||
|
||||
public ItemStack setUnusable(ItemStack stack, boolean unusable) {
|
||||
NBTHelper.checkNBT(stack);
|
||||
|
||||
stack.getTagCompound().setBoolean(Constants.NBT.UNUSABLE, unusable);
|
||||
return stack;
|
||||
}
|
||||
|
||||
public int getLpUsed() {
|
||||
return lpUsed;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue