Added a crafting cooldown on IAltar, so that outside blocks may request the altar to not perform work while it is not active.
This commit is contained in:
parent
8fbb19acc0
commit
39e3d6eb34
14 changed files with 57 additions and 26 deletions
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.routing;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.api.ILimitingLogic;
|
||||
import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus;
|
||||
|
||||
public class RoutingFocusLogicLimitMatchNBT extends RoutingFocusLogicMatchNBT implements ILimitingLogic
|
||||
{
|
||||
public int limit = 0;
|
||||
|
||||
public RoutingFocusLogicLimitMatchNBT(ItemStack stack)
|
||||
{
|
||||
if(stack != null && stack.getItem() instanceof ILimitedRoutingFocus)
|
||||
{
|
||||
limit = ((ILimitedRoutingFocus)stack.getItem()).getRoutingFocusLimit(stack);
|
||||
}else
|
||||
{
|
||||
limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRoutingLimit()
|
||||
{
|
||||
return limit;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue