1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-13 03:43:08 +00:00

Expose ArgumentHelper in the public API

This is sufficiently useful a class, that it's worthwhile exposing it.
Hopefully we can slowly encourage other mods to migrate to it (well, at
least in 1.14), and so make error messages more consistent.

Also:
 - Add Javadoc for all public methods
 - Clarify the method names a little (getNumber -> getDouble,
   getReal -> getFiniteDouble).
 - Make the *Table methods return a Map<?,?> instead of
   Map<Object, Object>.
This commit is contained in:
SquidDev
2019-10-27 14:29:07 +00:00
parent 14b3065ba4
commit a93e0f3284
27 changed files with 414 additions and 236 deletions

View File

@@ -27,7 +27,7 @@ import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.Map;
import static dan200.computercraft.core.apis.ArgumentHelper.*;
import static dan200.computercraft.api.lua.ArgumentHelper.*;
public class TurtleAPI implements ILuaAPI
{

View File

@@ -15,7 +15,7 @@ import dan200.computercraft.shared.turtle.core.TurtleCraftCommand;
import javax.annotation.Nonnull;
import static dan200.computercraft.core.apis.ArgumentHelper.optInt;
import static dan200.computercraft.api.lua.ArgumentHelper.optInt;
public class CraftingTablePeripheral implements IPeripheral
{