Merge pull request #284 from MoreThanHidden/master
fix #281, addRepairMaterial
This commit is contained in:
commit
ca15964aa3
|
@ -67,15 +67,4 @@ public class TConstructHelper {
|
|||
output);
|
||||
}
|
||||
|
||||
public static String getMaterialFromID(int id) {
|
||||
return TConstructRegistry.toolMaterials.get(id).materialName;
|
||||
}
|
||||
|
||||
public static ItemKey getItemKey(Item item, int damage, int value, String material) {
|
||||
return ReflectionHelper.getInstance(ReflectionHelper.getConstructor(ItemKey.class, ItemStack.class, int.class, int.class, String.class),
|
||||
item,
|
||||
damage,
|
||||
value,
|
||||
material);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class TiCTweaks {
|
|||
@ZenMethod
|
||||
public static void addRepairMaterial(IItemStack stack, String material, int value) {
|
||||
ItemStack input = toStack(stack);
|
||||
MineTweakerAPI.apply(new Add(TConstructHelper.getItemKey(input.getItem(), input.getItemDamage(), value, material)));
|
||||
MineTweakerAPI.apply(new Add(PatternBuilder.instance.new ItemKey(input.getItem(), input.getItemDamage(), value, material)));
|
||||
}
|
||||
|
||||
// Tweaks for setting repair materials
|
||||
|
|
Loading…
Reference in a new issue