mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-12 03:13:00 +00:00
Fix turtle.craft failing when missing an argument.
Stupid typo, stupid squid.
This commit is contained in:
@@ -41,7 +41,7 @@ public class CraftingTablePeripheral implements IPeripheral
|
|||||||
@LuaFunction
|
@LuaFunction
|
||||||
public final MethodResult craft( Optional<Integer> count ) throws LuaException
|
public final MethodResult craft( Optional<Integer> count ) throws LuaException
|
||||||
{
|
{
|
||||||
int limit = count.orElse( 65 );
|
int limit = count.orElse( 64 );
|
||||||
if( limit < 0 || limit > 64 ) throw new LuaException( "Crafting count " + limit + " out of range" );
|
if( limit < 0 || limit > 64 ) throw new LuaException( "Crafting count " + limit + " out of range" );
|
||||||
return turtle.executeCommand( new TurtleCraftCommand( limit ) );
|
return turtle.executeCommand( new TurtleCraftCommand( limit ) );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user