mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Crafting Station Prototype
This commit is contained in:
1 parent
179f9dfa05
commit
85aaa05d4b
54 files changed
+585
-131
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package tconstruct.modifiers.tools;
|
||||
|
||||
import tconstruct.library.tools.ToolMod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ModExtraModifier extends ToolMod
|
||||
{
|
||||
|
||||
public ModExtraModifier(ItemStack[] items, String dataKey)
|
||||
{
|
||||
super(items, 0, dataKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canModify (ItemStack tool, ItemStack[] input)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
if (tags.getBoolean(key))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modify (ItemStack[] input, ItemStack tool)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
tags.setBoolean(key, true);
|
||||
int modifiers = tags.getInteger("Modifiers");
|
||||
modifiers += 1;
|
||||
tags.setInteger("Modifiers", modifiers);
|
||||
}
|
||||
|
||||
public void addMatchingEffect (ItemStack tool)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user