Add a hook to allow continuously using items through stack changes (#4834)

* Add a hook to allow continuously using items through stack changes

* Update licences
This commit is contained in:
Ben Staddon authored and tterrag committed 2019-01-03 23:22:24 -05:00
1 parent 21f7c31f62
commit be565d2ddc
4 files changed
+169 -10

No files matched your search

@@ -195,6 +195,15 @@ public class ForgeHooks
return entry.getStack(rand, fortune);
}
public static boolean canContinueUsing(@Nonnull ItemStack from, @Nonnull ItemStack to)
{
if (!from.isEmpty() && !to.isEmpty())
{
return from.getItem().canContinueUsing(from, to);
}
return false;
}
private static boolean toolInit = false;
//static HashSet<List> toolEffectiveness = new HashSet<List>();