Move some base classes into the API
Add Javadocs for API classes that didn't already have them Redo 'nother redo Another redo Update ItemSigil.java Last one, I swear Fix
This commit is contained in:
parent
6a40dbab0a
commit
0383f0fb31
41 changed files with 331 additions and 343 deletions
38
src/main/java/WayofTime/bloodmagic/api/impl/ItemSigil.java
Normal file
38
src/main/java/WayofTime/bloodmagic/api/impl/ItemSigil.java
Normal file
|
@ -0,0 +1,38 @@
|
|||
package WayofTime.bloodmagic.api.impl;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.iface.ISigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Base class for all (static) sigils.
|
||||
*/
|
||||
public class ItemSigil extends ItemBindable implements ISigil
|
||||
{
|
||||
@Getter
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue