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
@@ -229,7 +229,6 @@ public class TRecipes
|
||||
tb.addNormalToolRecipe(TRepo.hammer, TRepo.hammerHead, TRepo.toughRod, TRepo.largePlate, TRepo.largePlate);
|
||||
tb.addNormalToolRecipe(TRepo.battleaxe, TRepo.broadAxeHead, TRepo.toughRod, TRepo.broadAxeHead, TRepo.toughBinding);
|
||||
|
||||
//tb.addNormalToolRecipe(TRepo.shortbow, TRepo.toolRod, TRepo.bowstring, TRepo.toolRod);
|
||||
BowRecipe recipe = new BowRecipe(TRepo.toolRod, TRepo.bowstring, TRepo.toolRod, TRepo.shortbow);
|
||||
tb.addCustomToolRecipe(recipe);
|
||||
tb.addNormalToolRecipe(TRepo.arrow, TRepo.arrowhead, TRepo.toolRod, TRepo.fletching);
|
||||
@@ -244,55 +243,39 @@ public class TRecipes
|
||||
|
||||
ItemStack redstoneItem = new ItemStack(Item.redstone);
|
||||
ItemStack redstoneBlock = new ItemStack(Block.blockRedstone);
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { redstoneItem }, 2, 1));
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { redstoneItem, redstoneItem }, 2, 2));
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { redstoneBlock }, 2, 9));
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { redstoneItem, redstoneBlock }, 2, 10));
|
||||
tb.registerToolMod(new ModRedstone(new ItemStack[] { redstoneBlock, redstoneBlock }, 2, 18));
|
||||
tb.registerToolMod(new ModRedstone(2, new ItemStack[] { redstoneItem, redstoneBlock }, new int[] { 1, 9 }));
|
||||
|
||||
ItemStack lapisItem = new ItemStack(Item.dyePowder, 1, 4);
|
||||
ItemStack lapisBlock = new ItemStack(Block.blockLapis);
|
||||
TRepo.modLapis = new ModLapis(new ItemStack[] { lapisItem }, 10, 1);
|
||||
TRepo.modLapis = new ModLapis(10, new ItemStack[] { lapisItem, lapisBlock }, new int[] { 1, 9 });
|
||||
tb.registerToolMod(TRepo.modLapis);
|
||||
tb.registerToolMod(new ModLapis(new ItemStack[] { lapisItem, lapisItem }, 10, 2));
|
||||
tb.registerToolMod(new ModLapis(new ItemStack[] { lapisBlock }, 10, 9));
|
||||
tb.registerToolMod(new ModLapis(new ItemStack[] { lapisItem, lapisBlock }, 10, 10));
|
||||
tb.registerToolMod(new ModLapis(new ItemStack[] { lapisBlock, lapisBlock }, 10, 18));
|
||||
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 6) }, 4, "Moss", 3, "\u00a72", "Auto-Repair"));
|
||||
ItemStack blazePowder = new ItemStack(Item.blazePowder);
|
||||
tb.registerToolMod(new ModBlaze(new ItemStack[] { blazePowder }, 7, 1));
|
||||
tb.registerToolMod(new ModBlaze(new ItemStack[] { blazePowder, blazePowder }, 7, 2));
|
||||
tb.registerToolMod(new ModBlaze(7, new ItemStack[] { blazePowder }, new int[] { 1 }));
|
||||
tb.registerToolMod(new ModAutoSmelt(new ItemStack[] { new ItemStack(TRepo.materials, 1, 7) }, 6, "Lava", "\u00a74", "Auto-Smelt"));
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 8) }, 8, "Necrotic", 1, "\u00a78", "Life Steal"));
|
||||
|
||||
TRepo.modAttack = new ModAttack("Quartz", 11, new ItemStack[] { new ItemStack(Item.netherQuartz), new ItemStack(Block.blockNetherQuartz, 1, Short.MAX_VALUE) }, new int[] { 1, 4 });
|
||||
tb.registerToolMod(TRepo.modAttack);
|
||||
/*tb.registerToolMod(new ModAttack("Quartz", new ItemStack[] { new ItemStack(Item.netherQuartz), new ItemStack(Block.blockNetherQuartz, 1, Short.MAX_VALUE) }, 11, 1));
|
||||
tb.registerToolMod(new ModAttack("Quartz", new ItemStack[] { quartzItem, quartzItem }, 11, 2));
|
||||
tb.registerToolMod(new ModAttack("Quartz", new ItemStack[] { quartzBlock }, 11, 4));
|
||||
tb.registerToolMod(new ModAttack("Quartz", new ItemStack[] { quartzItem, quartzBlock }, 11, 5));
|
||||
tb.registerToolMod(new ModAttack("Quartz", new ItemStack[] { quartzBlock, quartzBlock }, 11, 8));*/
|
||||
|
||||
tb.registerToolMod(new ModExtraModifier(new ItemStack[] { diamond, new ItemStack(Block.blockGold) }, "Tier1Free"));
|
||||
tb.registerToolMod(new ModExtraModifier(new ItemStack[] { new ItemStack(Block.blockDiamond), new ItemStack(Item.appleGold, 1, 1) }, "Tier1.5Free"));
|
||||
tb.registerToolMod(new ModExtraModifier(new ItemStack[] { new ItemStack(Item.netherStar) }, "Tier2Free"));
|
||||
|
||||
ItemStack silkyJewel = new ItemStack(TRepo.materials, 1, 26);
|
||||
tb.registerToolMod(new ModButtertouch(new ItemStack[] { silkyJewel }, 12));
|
||||
|
||||
ItemStack piston = new ItemStack(Block.pistonBase);
|
||||
tb.registerToolMod(new ModPiston(new ItemStack[] { piston }, 3, 1));
|
||||
tb.registerToolMod(new ModPiston(new ItemStack[] { piston, piston }, 3, 2));
|
||||
tb.registerToolMod(new ModPiston(3, new ItemStack[] { piston }, new int[] { 1 }));
|
||||
|
||||
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(Block.obsidian), new ItemStack(Item.enderPearl) }, 13, "Beheading", 1, "\u00a7d", "Beheading"));
|
||||
|
||||
ItemStack holySoil = new ItemStack(TRepo.craftedSoil, 1, 4);
|
||||
tb.registerToolMod(new ModSmite("Smite", new ItemStack[] { holySoil }, 14, 1));
|
||||
tb.registerToolMod(new ModSmite("Smite", new ItemStack[] { holySoil, holySoil }, 14, 2));
|
||||
tb.registerToolMod(new ModSmite("Smite", 14, new ItemStack[] { holySoil }, new int[] { 1 }));
|
||||
|
||||
ItemStack spidereyeball = new ItemStack(Item.fermentedSpiderEye);
|
||||
tb.registerToolMod(new ModAntiSpider("Anti-Spider", new ItemStack[] { spidereyeball }, 15, 1));
|
||||
tb.registerToolMod(new ModAntiSpider("Anti-Spider", new ItemStack[] { spidereyeball, spidereyeball }, 15, 2));
|
||||
tb.registerToolMod(new ModAntiSpider("Anti-Spider", 15, new ItemStack[] { spidereyeball }, new int[] { 1 }));
|
||||
|
||||
ItemStack obsidianPlate = new ItemStack(TRepo.largePlate, 1, 6);
|
||||
tb.registerToolMod(new ModReinforced(new ItemStack[] { obsidianPlate }, 16, 1));
|
||||
|
||||
@@ -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