1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-26 11:27:38 +00:00

A wee bit of a cleanup of the API

- Move some method over to defaulted methods
 - Use Objects rather than Preconditions
This commit is contained in:
SquidDev
2018-12-17 21:33:49 +00:00
parent 3537f49ced
commit 741ee447ca
38 changed files with 184 additions and 260 deletions

View File

@@ -90,7 +90,7 @@ public interface IMount
* @throws IOException If the file does not exist, or could not be opened.
*/
@Nonnull
@SuppressWarnings("deprecation")
@SuppressWarnings( "deprecation" )
default ReadableByteChannel openChannelForRead( @Nonnull String path ) throws IOException
{
return Channels.newChannel( openForRead( path ) );

View File

@@ -67,7 +67,7 @@ public interface IWritableMount extends IMount
* @throws IOException If the file could not be opened for writing.
*/
@Nonnull
@SuppressWarnings("deprecation")
@SuppressWarnings( "deprecation" )
default WritableByteChannel openChannelForWrite( @Nonnull String path ) throws IOException
{
return Channels.newChannel( openForWrite( path ) );
@@ -94,7 +94,7 @@ public interface IWritableMount extends IMount
* @throws IOException If the file could not be opened for writing.
*/
@Nonnull
@SuppressWarnings("deprecation")
@SuppressWarnings( "deprecation" )
default WritableByteChannel openChannelForAppend( @Nonnull String path ) throws IOException
{
return Channels.newChannel( openForAppend( path ) );

View File

@@ -4,7 +4,7 @@
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API|FileSystem", apiVersion="${version}" )
@API( owner = "ComputerCraft", provides = "ComputerCraft|API|FileSystem", apiVersion = "${version}" )
package dan200.computercraft.api.filesystem;
import net.minecraftforge.fml.common.API;