mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-26 00:46:54 +00:00
Remove several deprecated methods
This commit is contained in:
parent
f4f71185ae
commit
2360a6e951
@ -1,117 +0,0 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
package dan200.computercraft.core.apis;
|
||||
|
||||
import dan200.computercraft.api.lua.LuaException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A stub for any mods which depended on this version of the argument helper.
|
||||
*
|
||||
* @deprecated Use {@link dan200.computercraft.api.lua.ArgumentHelper}.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class ArgumentHelper
|
||||
{
|
||||
private ArgumentHelper()
|
||||
{
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static String getType( @Nullable Object type )
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getType( type );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static LuaException badArgument( int index, @Nonnull String expected, @Nullable Object actual )
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.badArgumentOf( index, expected, actual );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static LuaException badArgument( int index, @Nonnull String expected, @Nonnull String actual )
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.badArgument( index, expected, actual );
|
||||
}
|
||||
|
||||
public static double getNumber( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getDouble( args, index );
|
||||
}
|
||||
|
||||
public static int getInt( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getInt( args, index );
|
||||
}
|
||||
|
||||
public static long getLong( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getLong( args, index );
|
||||
}
|
||||
|
||||
public static double getReal( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getFiniteDouble( args, index );
|
||||
}
|
||||
|
||||
public static boolean getBoolean( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getBoolean( args, index );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static String getString( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.getString( args, index );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public static Map<Object, Object> getTable( @Nonnull Object[] args, int index ) throws LuaException
|
||||
{
|
||||
return (Map<Object, Object>) dan200.computercraft.api.lua.ArgumentHelper.getTable( args, index );
|
||||
}
|
||||
|
||||
public static double optNumber( @Nonnull Object[] args, int index, double def ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.optDouble( args, index, def );
|
||||
}
|
||||
|
||||
public static int optInt( @Nonnull Object[] args, int index, int def ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.optInt( args, index, def );
|
||||
}
|
||||
|
||||
public static long optLong( @Nonnull Object[] args, int index, long def ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.optLong( args, index, def );
|
||||
}
|
||||
|
||||
public static double optReal( @Nonnull Object[] args, int index, double def ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.optFiniteDouble( args, index, def );
|
||||
}
|
||||
|
||||
public static boolean optBoolean( @Nonnull Object[] args, int index, boolean def ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.optBoolean( args, index, def );
|
||||
}
|
||||
|
||||
public static String optString( @Nonnull Object[] args, int index, String def ) throws LuaException
|
||||
{
|
||||
return dan200.computercraft.api.lua.ArgumentHelper.optString( args, index, def );
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public static Map<Object, Object> optTable( @Nonnull Object[] args, int index, Map<Object, Object> def ) throws LuaException
|
||||
{
|
||||
return (Map<Object, Object>) dan200.computercraft.api.lua.ArgumentHelper.optTable( args, index, def );
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
package dan200.computercraft.core.apis;
|
||||
|
||||
/**
|
||||
* This exists purely to ensure binary compatibility.
|
||||
*
|
||||
* @see dan200.computercraft.api.lua.ILuaAPI
|
||||
* @deprecated Use the version in the public API. Only exists for compatibility with CCEmuX.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ILuaAPI extends dan200.computercraft.api.lua.ILuaAPI
|
||||
{
|
||||
void advance( double v );
|
||||
|
||||
@Override
|
||||
default void update()
|
||||
{
|
||||
advance( 0.05 );
|
||||
}
|
||||
}
|
@ -40,7 +40,6 @@ public class EmptyMount implements IMount
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public ReadableByteChannel openForRead( @Nonnull String path ) throws IOException
|
||||
{
|
||||
throw new FileOperationException( path, "No such file" );
|
||||
|
@ -312,19 +312,6 @@ public class Terminal
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether this terminal has changed.
|
||||
*
|
||||
* @return If this terminal is dirty.
|
||||
* @deprecated All {@code *Changed()} methods are deprecated: one should pass in a callback
|
||||
* instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public final boolean getChanged()
|
||||
{
|
||||
return m_changed;
|
||||
}
|
||||
|
||||
public final void setChanged()
|
||||
{
|
||||
m_changed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user