...am I done?
This commit is contained in:
parent
0558c0bcf6
commit
338cabfd4a
8 changed files with 7 additions and 32 deletions
|
|
@ -43,12 +43,6 @@ public class TinkersAddons
|
|||
MinecraftForge.EVENT_BUS.register(new ModAutoRepair());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.oitsjustjose.tinkers_addons.modifiers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
||||
import com.oitsjustjose.tinkers_addons.lib.Lib;
|
||||
|
|
@ -10,12 +9,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import slimeknights.mantle.util.RecipeMatch.Match;
|
||||
import slimeknights.tconstruct.library.modifiers.ModifierAspect;
|
||||
import slimeknights.tconstruct.library.tools.ToolCore;
|
||||
import slimeknights.tconstruct.library.utils.TagUtil;
|
||||
|
|
@ -53,11 +50,11 @@ public class ModAutoRepair extends ToolModifier
|
|||
ArrayList<ItemStack> tinkersTools = new ArrayList<ItemStack>();
|
||||
int autoRepairLevel;
|
||||
for (ItemStack iterStack : player.inventory.mainInventory)
|
||||
if (iterStack != null && iterStack.getItem() instanceof ToolCore)
|
||||
if (!iterStack.isEmpty() && iterStack.getItem() instanceof ToolCore)
|
||||
tinkersTools.add(iterStack);
|
||||
|
||||
// Works to include items held in the second hand
|
||||
if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ToolCore)
|
||||
if (!player.getHeldItemOffhand().isEmpty() && player.getHeldItemOffhand().getItem() instanceof ToolCore)
|
||||
tinkersTools.add(player.getHeldItemOffhand());
|
||||
|
||||
for (ItemStack iterStack : tinkersTools)
|
||||
|
|
@ -99,10 +96,4 @@ public class ModAutoRepair extends ToolModifier
|
|||
|
||||
return 15000 + rand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Match> matches(NonNullList<ItemStack> stacks)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
package com.oitsjustjose.tinkers_addons.modifiers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import slimeknights.mantle.util.RecipeMatch.Match;
|
||||
import slimeknights.tconstruct.library.modifiers.ModifierAspect;
|
||||
import slimeknights.tconstruct.library.tools.ToolNBT;
|
||||
import slimeknights.tconstruct.library.utils.TagUtil;
|
||||
|
|
@ -36,10 +32,4 @@ public class ModExtraModifier extends ToolModifier
|
|||
|
||||
TagUtil.setToolTag(rootCompound, data.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Match> matches(NonNullList<ItemStack> stacks)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/amelioration_tome"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/diamond_toolkit"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/ender_toolkit"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/gold_toolkit"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/iron_toolkit"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue