mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 14:34:22 +00:00
All modifiers changed to use the tinker table
This commit is contained in:
1 parent
50fdf1b161
commit
8b154a9cb4
7 files changed
+40
-68
No files matched your search
@@ -4,19 +4,17 @@ import tconstruct.library.tools.ToolMod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ModAntiSpider extends ToolMod
|
||||
public class ModAntiSpider extends ToolModTypeFilter
|
||||
{
|
||||
String tooltipName;
|
||||
int increase;
|
||||
int max = 4;
|
||||
String guiType;
|
||||
|
||||
public ModAntiSpider(String type, ItemStack[] items, int effect, int inc)
|
||||
public ModAntiSpider(String type, int effect, ItemStack[] items, int[] values)
|
||||
{
|
||||
super(items, effect, "ModAntiSpider");
|
||||
super(effect, "ModAntiSpider", items, values);
|
||||
tooltipName = "\u00a72Bane of Arthropods";
|
||||
guiType = type;
|
||||
increase = inc;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -27,7 +25,7 @@ public class ModAntiSpider extends ToolMod
|
||||
return tags.getInteger("Modifiers") > 0;
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
if (keyPair[0] + increase <= keyPair[1])
|
||||
if (keyPair[0] + matchingAmount(input) <= keyPair[1])
|
||||
return true;
|
||||
|
||||
else if (keyPair[0] == keyPair[1])
|
||||
@@ -41,6 +39,7 @@ public class ModAntiSpider extends ToolMod
|
||||
public void modify (ItemStack[] input, ItemStack tool)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int increase = matchingAmount(input);
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
|
||||
@@ -3,23 +3,19 @@ package tconstruct.modifiers.tools;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.library.tools.ToolMod;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
public class ModBlaze extends ToolMod
|
||||
public class ModBlaze extends ToolModTypeFilter
|
||||
{
|
||||
String tooltipName;
|
||||
int increase;
|
||||
int max;
|
||||
|
||||
public ModBlaze(ItemStack[] items, int effect, int inc)
|
||||
public ModBlaze(int effect, ItemStack[] items, int[] values)
|
||||
{
|
||||
super(items, effect, "Blaze");
|
||||
super(effect, "Blaze", items, values);
|
||||
tooltipName = "\u00a76Fiery";
|
||||
increase = inc;
|
||||
max = 25;
|
||||
}
|
||||
|
||||
@@ -35,7 +31,7 @@ public class ModBlaze extends ToolMod
|
||||
return tags.getInteger("Modifiers") > 0;
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
if (keyPair[0] + increase <= keyPair[1])
|
||||
if (keyPair[0] + matchingAmount(input) <= keyPair[1])
|
||||
return true;
|
||||
|
||||
else if (keyPair[0] == keyPair[1])
|
||||
@@ -49,6 +45,7 @@ public class ModBlaze extends ToolMod
|
||||
public void modify (ItemStack[] input, ItemStack tool)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int increase = matchingAmount(input);
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
|
||||
@@ -15,17 +15,15 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
public class ModLapis extends ToolMod
|
||||
public class ModLapis extends ToolModTypeFilter
|
||||
{
|
||||
String tooltipName;
|
||||
int increase;
|
||||
int max = 450;
|
||||
|
||||
public ModLapis(ItemStack[] items, int effect, int inc)
|
||||
public ModLapis(int effect, ItemStack[] items, int[] values)
|
||||
{
|
||||
super(items, effect, "Lapis");
|
||||
super(effect, "Lapis", items, values);
|
||||
tooltipName = "\u00a79Luck";
|
||||
increase = inc;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,7 +42,7 @@ public class ModLapis extends ToolMod
|
||||
return tags.getInteger("Modifiers") > 0;
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
if (keyPair[0] + increase <= max)
|
||||
if (keyPair[0] + matchingAmount(input) <= max)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
@@ -68,6 +66,7 @@ public class ModLapis extends ToolMod
|
||||
tags.setInteger("Modifiers", modifiers);
|
||||
}
|
||||
|
||||
int increase = matchingAmount(input);
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
keyPair[0] += increase;
|
||||
tags.setIntArray(key, keyPair);
|
||||
|
||||
@@ -9,18 +9,15 @@ import tconstruct.library.tools.ToolMod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ModPiston extends ToolMod
|
||||
public class ModPiston extends ToolModTypeFilter
|
||||
{
|
||||
String tooltipName;
|
||||
int increase;
|
||||
int max;
|
||||
int max = 10;
|
||||
|
||||
public ModPiston(ItemStack[] items, int effect, int inc)
|
||||
public ModPiston(int effect, ItemStack[] items, int[] values)
|
||||
{
|
||||
super(items, effect, "Piston");
|
||||
super(effect, "Piston", items, values);
|
||||
tooltipName = "\u00a77Knockback";
|
||||
increase = inc;
|
||||
max = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,7 +32,7 @@ public class ModPiston extends ToolMod
|
||||
return tags.getInteger("Modifiers") > 0;
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
if (keyPair[0] + increase <= keyPair[1])
|
||||
if (keyPair[0] + matchingAmount(input) <= keyPair[1])
|
||||
return true;
|
||||
|
||||
else if (keyPair[0] == keyPair[1])
|
||||
@@ -49,6 +46,7 @@ public class ModPiston extends ToolMod
|
||||
public void modify (ItemStack[] input, ItemStack tool)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int increase = matchingAmount(input);
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
|
||||
@@ -9,18 +9,15 @@ import tconstruct.library.tools.ToolMod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ModRedstone extends ToolMod
|
||||
public class ModRedstone extends ToolModTypeFilter
|
||||
{
|
||||
String tooltipName;
|
||||
int increase;
|
||||
int max;
|
||||
int max = 50;
|
||||
|
||||
public ModRedstone(ItemStack[] items, int effect, int inc)
|
||||
public ModRedstone(int effect, ItemStack[] items, int[] values)
|
||||
{
|
||||
super(items, effect, "Redstone");
|
||||
super(effect, "Redstone", items, values);
|
||||
tooltipName = "\u00a74Haste";
|
||||
increase = inc;
|
||||
max = 50;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,7 +32,7 @@ public class ModRedstone extends ToolMod
|
||||
return tags.getInteger("Modifiers") > 0;
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
if (keyPair[0] + increase <= keyPair[1])
|
||||
if (keyPair[0] + matchingAmount(input) <= keyPair[1])
|
||||
return true;
|
||||
|
||||
else if (keyPair[0] == keyPair[1])
|
||||
@@ -50,6 +47,7 @@ public class ModRedstone extends ToolMod
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int[] keyPair;
|
||||
int increase = matchingAmount(input);
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
keyPair = tags.getIntArray(key);
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
package tconstruct.modifiers.tools;
|
||||
|
||||
import tconstruct.library.tools.ToolMod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ModSmite extends ToolMod
|
||||
public class ModSmite extends ToolModTypeFilter
|
||||
{
|
||||
String tooltipName;
|
||||
int increase;
|
||||
int max = 36;
|
||||
String tagName;
|
||||
|
||||
public ModSmite(String type, ItemStack[] items, int effect, int inc)
|
||||
public ModSmite(String type, int effect, ItemStack[] items, int[] values)
|
||||
{
|
||||
super(items, effect, "ModSmite");
|
||||
super(effect, "ModSmite", items, values);
|
||||
tooltipName = "\u00a7eSmite";
|
||||
tagName = type;
|
||||
increase = inc;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -27,7 +24,7 @@ public class ModSmite extends ToolMod
|
||||
return tags.getInteger("Modifiers") > 0;
|
||||
|
||||
int keyPair[] = tags.getIntArray(key);
|
||||
if (keyPair[0] + increase <= keyPair[1])
|
||||
if (keyPair[0] + matchingAmount(input) <= keyPair[1])
|
||||
return true;
|
||||
|
||||
else if (keyPair[0] == keyPair[1])
|
||||
@@ -41,6 +38,7 @@ public class ModSmite extends ToolMod
|
||||
public void modify (ItemStack[] input, ItemStack tool)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int increase = matchingAmount(input);
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
|
||||
Reference in new issue
Block a user