Updated Computer Craft API

This commit is contained in:
Katrina Swales committed 2015-02-04 12:58:20 +01:00
1 parent e0c3e3ad07
commit 7f466627c1
32 files changed
+324 -139

No files matched your search

@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -22,7 +22,7 @@ import java.lang.reflect.Method;
* but may be called before it is fully loaded.
*/
public final class ComputerCraftAPI
{
{
/**
* Creates a numbered directory in a subfolder of the save directory for a given world, and returns that number.<br>
* Use in conjuction with createSaveDirMount() to create a unique place for your peripherals or media items to store files.<br>
@@ -30,7 +30,7 @@ public final class ComputerCraftAPI
* @param parentSubPath The folder path within the save directory where the new directory should be created. eg: "computercraft/disk"
* @return The numerical value of the name of the new folder, or -1 if the folder could not be created for some reason.<br>
* eg: if createUniqueNumberedSaveDir( world, "computer/disk" ) was called returns 42, then "computer/disk/42" is now available for writing.
* @see #createSaveDirMount(World, String, long)
* @see #createSaveDirMount(net.minecraft.world.World, String, long)
*/
public static int createUniqueNumberedSaveDir( World world, String parentSubPath )
{
@@ -45,7 +45,7 @@ public final class ComputerCraftAPI
}
return -1;
}
/**
* Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
* Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
@@ -56,11 +56,11 @@ public final class ComputerCraftAPI
* @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
* @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
* to mount this on a Computers' file system.
* @see #createUniqueNumberedSaveDir(World, String)
* @see #createUniqueNumberedSaveDir(net.minecraft.world.World, String)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
* @see dan200.computercraft.api.filesystem.IMount
* @see IWritableMount
* @see dan200.computercraft.api.filesystem.IWritableMount
*/
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
@@ -75,7 +75,7 @@ public final class ComputerCraftAPI
}
return null;
}
/**
* Creates a file system mount to a resource folder, and returns it.<br>
* Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
@@ -86,7 +86,7 @@ public final class ComputerCraftAPI
* @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
* to mount this on a Computers' file system.
* @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
* @see dan200.computercraft.api.filesystem.IMount
*/
public static IMount createResourceMount( Class modClass, String domain, String subPath )
@@ -102,7 +102,7 @@ public final class ComputerCraftAPI
}
return null;
}
/**
* Registers a peripheral handler to convert blocks into IPeripheral implementations.
* @see dan200.computercraft.api.peripheral.IPeripheral
@@ -200,7 +200,7 @@ public final class ComputerCraftAPI
// The functions below here are private, and are used to interface with the non-API ComputerCraft classes.
// Reflection is used here so you can develop your mod in MCP without decompiling ComputerCraft and including
// it in your solution.
private static void findCC()
{
if( !ccSearched ) {
@@ -250,9 +250,9 @@ public final class ComputerCraftAPI
System.out.println( "ComputerCraftAPI: ComputerCraft method " + name + " not found." );
return null;
}
}
private static boolean ccSearched = false;
}
private static boolean ccSearched = false;
private static Class computerCraft = null;
private static Method computerCraft_createUniqueNumberedSaveDir = null;
private static Method computerCraft_createSaveDirMount = null;
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -15,7 +15,7 @@ import java.util.List;
* Ready made implementations of this interface can be created using ComputerCraftAPI.createSaveDirMount() or ComputerCraftAPI.createResourceMount(), or you're free to implement it yourselves!
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, IMount)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
* @see IWritableMount
*/
public interface IMount
@@ -25,33 +25,33 @@ public interface IMount
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprogram"
* @return true if the file exists, false otherwise
*/
public boolean exists( String path ) throws IOException;
public boolean exists(String path) throws IOException;
/**
* Returns whether a file with a given path is a directory or not.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprograms"
* @return true if the file exists and is a directory, false otherwise
*/
public boolean isDirectory( String path ) throws IOException;
public boolean isDirectory(String path) throws IOException;
/**
* Returns the file names of all the files in a directory.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprograms"
* @param contents A list of strings. Add all the file names to this list
*/
public void list( String path, List<String> contents ) throws IOException;
public void list(String path, List<String> contents) throws IOException;
/**
* Returns the size of a file with a given path, in bytes
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprogram"
* @return the size of the file, in bytes
*/
public long getSize( String path ) throws IOException;
public long getSize(String path) throws IOException;
/**
* Opens a file with a given path, and returns an inputstream representing it's contents.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprogram"
* @return a stream representing the contents of the file
*/
public InputStream openForRead( String path ) throws IOException;
public InputStream openForRead(String path) throws IOException;
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -13,8 +13,8 @@ import java.io.OutputStream;
* Represents a part of a virtual filesystem that can be mounted onto a computercraft using IComputerAccess.mount() or IComputerAccess.mountWritable(), that can also be written to.
* Ready made implementations of this interface can be created using ComputerCraftAPI.createSaveDirMount(), or you're free to implement it yourselves!
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
* @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IMount)
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IMount)
* @see IMount
*/
public interface IWritableMount extends IMount
{
@@ -22,27 +22,27 @@ public interface IWritableMount extends IMount
* Creates a directory at a given path inside the virtual file system.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/mynewprograms"
*/
public void makeDirectory( String path ) throws IOException;
public void makeDirectory(String path) throws IOException;
/**
* Deletes a directory at a given path inside the virtual file system.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myoldprograms"
*/
public void delete( String path ) throws IOException;
public void delete(String path) throws IOException;
/**
* Opens a file with a given path, and returns an outputstream for writing to it.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprogram"
* @return a stream for writing to
*/
public OutputStream openForWrite( String path ) throws IOException;
public OutputStream openForWrite(String path) throws IOException;
/**
* Opens a file with a given path, and returns an outputstream for appending to it.
* @param path A file path in normalised format, relative to the mount location. ie: "programs/myprogram"
* @return a stream for writing to
*/
public OutputStream openForAppend( String path ) throws IOException;
public OutputStream openForAppend(String path) throws IOException;
/**
* Get the ammount of free space on the mount, in bytes. You should decrease this value as the user writes to the mount, and write operations should fail once it reaches zero.
@@ -1,10 +1,10 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API|FileSystem", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API|FileSystem", apiVersion="1.66pr3" )
package dan200.computercraft.api.filesystem;
import cpw.mods.fml.common.API;
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -22,8 +22,8 @@ public interface ILuaContext
* Do not attempt to common this exception, unless you wish to prevent termination, which is not recommended.
* @throws InterruptedException If the user shuts down or reboots the computercraft while pullEvent() is waiting for an event, InterruptedException will be thrown. This exception must not be caught or intercepted, or the computercraft will leak memory and end up in a broken state.
*/
public Object[] pullEvent( String filter ) throws LuaException, InterruptedException;
public Object[] pullEvent(String filter) throws LuaException, InterruptedException;
/**
* The same as pullEvent(), except "terminated" events are ignored. Only use this if you want to prevent program termination, which is not recommended. This method is exactly equivalent to os.pullEventRaw() in lua.
* @param filter A specific event to wait for, or null to wait for any event
@@ -31,8 +31,8 @@ public interface ILuaContext
* @throws InterruptedException If the user shuts down or reboots the computercraft while pullEventRaw() is waiting for an event, InterruptedException will be thrown. This exception must not be caught or intercepted, or the computercraft will leak memory and end up in a broken state.
* @see #pullEvent(String)
*/
public Object[] pullEventRaw( String filter ) throws InterruptedException;
public Object[] pullEventRaw(String filter) throws InterruptedException;
/**
* Yield the current coroutine with some arguments until it is resumed. This method is exactly equivalent to coroutine.yield() in lua. Use pullEvent() if you wish to wait for events.
* @param arguments An object array containing the arguments to pass to coroutine.yield()
@@ -40,5 +40,19 @@ public interface ILuaContext
* @throws InterruptedException If the user shuts down or reboots the computercraft the coroutine is suspended, InterruptedException will be thrown. This exception must not be caught or intercepted, or the computercraft will leak memory and end up in a broken state.
* @see #pullEvent(String)
*/
public Object[] yield( Object[] arguments ) throws InterruptedException;
public Object[] yield(Object[] arguments) throws InterruptedException;
/**
* TODO: Document me
* @param task
* @return
*/
public Object[] executeMainThreadTask(ILuaTask task) throws LuaException, InterruptedException;
/**
* TODO: Document me
* @param task
* @return
*/
public long issueMainThreadTask(ILuaTask task);
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -22,5 +22,5 @@ public interface ILuaObject
* Called when a user calls one of the methods that this object implements. This works the same as IPeripheral.callMethod(). See that method for detailed documentation.
* @see dan200.computercraft.api.peripheral.IPeripheral#callMethod(dan200.computercraft.api.peripheral.IComputerAccess, ILuaContext, int, Object[])
*/
public Object[] callMethod( ILuaContext context, int method, Object[] arguments ) throws LuaException, InterruptedException;
public Object[] callMethod(ILuaContext context, int method, Object[] arguments) throws LuaException, InterruptedException;
}
@@ -0,0 +1,12 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
package dan200.computercraft.api.lua;
public interface ILuaTask
{
public Object[] execute() throws LuaException;
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -13,6 +13,11 @@ public class LuaException extends Exception
{
private final int m_level;
public LuaException()
{
this( "error", 1 );
}
public LuaException( String message )
{
this( message, 1 );
@@ -1,10 +1,10 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API|Lua", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API|Lua", apiVersion="1.66pr3" )
package dan200.computercraft.api.lua;
import cpw.mods.fml.common.API;
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -21,7 +21,7 @@ public interface IMedia
* @param stack The itemstack to inspect
* @return The label. ie: "Dan's Programs"
*/
public String getLabel( ItemStack stack );
public String getLabel(ItemStack stack);
/**
* Set a string representing the label of this item. Will be called vi disk.setLabel() in lua.
@@ -29,22 +29,22 @@ public interface IMedia
* @param label The string to set the label to.
* @return true if the label was updated, false if the label may not be modified.
*/
public boolean setLabel( ItemStack stack, String label );
public boolean setLabel(ItemStack stack, String label);
/**
* If this disk represents an item with audio (like a record), get the readable name of the audio track. ie: "Jonathon Coulton - Still Alive"
* @param stack The itemstack to inspect.
* @return The name, or null if this item does not represent an item with audio.
*/
public String getAudioTitle( ItemStack stack );
public String getAudioTitle(ItemStack stack);
/**
* If this disk represents an item with audio (like a record), get the resource name of the audio track to play.
* @param stack The itemstack to inspect.
* @return The name, or null if this item does not represent an item with audio.
*/
public String getAudioRecordName( ItemStack stack );
public String getAudioRecordName(ItemStack stack);
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
@@ -52,8 +52,8 @@ public interface IMedia
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(net.minecraft.world.World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
public IMount createDataMount( ItemStack stack, World world );
public IMount createDataMount(ItemStack stack, World world);
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -10,14 +10,14 @@ import net.minecraft.item.ItemStack;
/**
* This interface is used to provide IMedia implementations for ItemStack
* @see dan200.computercraft.api.ComputerCraftAPI#registerMediaProvider(IMediaProvider)
* @see dan200.computercraft.api.ComputerCraftAPI#registerMediaProvider(dan200.computercraft.api.media.IMediaProvider)
*/
public interface IMediaProvider
{
/**
* Produce an IMedia implementation from an ItemStack.
* @see dan200.computercraft.api.ComputerCraftAPI#registerMediaProvider(IMediaProvider)
* @see dan200.computercraft.api.ComputerCraftAPI#registerMediaProvider(dan200.computercraft.api.media.IMediaProvider)
* @return an IMedia implementation, or null if the item is not something you wish to handle
*/
public IMedia getMedia( ItemStack stack );
public IMedia getMedia(ItemStack stack);
}
@@ -1,10 +1,10 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API|Media", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API|Media", apiVersion="1.66pr3" )
package dan200.computercraft.api.media;
import cpw.mods.fml.common.API;
@@ -1,10 +1,10 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API", apiVersion="1.66pr3" )
package dan200.computercraft.api;
import cpw.mods.fml.common.API;
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -27,12 +27,12 @@ public interface IComputerAccess
* @see #unmount(String)
* @see dan200.computercraft.api.filesystem.IMount
*/
public String mount( String desiredLocation, IMount mount );
public String mount(String desiredLocation, IMount mount);
/**
* TODO: Document me
*/
public String mount( String desiredLocation, IMount mount, String driveName );
public String mount(String desiredLocation, IMount mount, String driveName);
/**
* Mount a mount onto the computers' file system in a writable mode.<br>
@@ -41,16 +41,16 @@ public interface IComputerAccess
* @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
* @see #mount(String, IMount)
* @see #mount(String, dan200.computercraft.api.filesystem.IMount)
* @see #unmount(String)
* @see IMount
* @see dan200.computercraft.api.filesystem.IMount
*/
public String mountWritable( String desiredLocation, IWritableMount mount );
public String mountWritable(String desiredLocation, IWritableMount mount);
/**
* TODO: Document me
*/
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
public String mountWritable(String desiredLocation, IWritableMount mount, String driveName);
/**
* Unmounts a directory previously mounted onto the computers file system by mount() or mountWritable().<br>
@@ -60,18 +60,18 @@ public interface IComputerAccess
* @param location The desired location in the computers file system of the directory to unmount.
* This must be the location of a directory previously mounted by mount() or mountWritable(), as
* indicated by their return value.
* @see #mount(String, IMount)
* @see #mountWritable(String, IWritableMount)
* @see #mount(String, dan200.computercraft.api.filesystem.IMount)
* @see #mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
*/
public void unmount( String location );
public void unmount(String location);
/**
* Returns the numerical ID of this computercraft.<br>
* This is the same number obtained by calling os.getComputerID() or running the "id" program from lua,
* and is guarunteed unique. This number will be positive.
* @return The identifier.
*/
public int getID();
public int getID();
/**
* Causes an event to be raised on this computercraft, which the computercraft can respond to by calling
@@ -79,16 +79,16 @@ public interface IComputerAccess
* this peripheral.
* @param event A string identifying the type of event that has occurred, this will be
* returned as the first value from os.pullEvent(). It is recommended that you
* you choose a name that is unique, and recognisable as originating from your
* you choose a name that is unique, and recognisable as originating from your
* peripheral. eg: If your peripheral type is "button", a suitable event would be
* "button_pressed".
* @param arguments In addition to a name, you may pass an array of extra arguments to the event, that will
* be supplied as extra return values to os.pullEvent(). Objects in the array will be converted
* to lua data types in the same fashion as the return values of IPeripheral.callMethod().<br>
* You may supply null to indicate that no arguments are to be supplied.
* @see dan200.computercraft.api.peripheral.IPeripheral#callMethod
* @see IPeripheral#callMethod
*/
public void queueEvent( String event, Object[] arguments );
public void queueEvent(String event, Object[] arguments);
/**
* Get a string, unique to the computercraft, by which the computercraft refers to this peripheral.
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -22,16 +22,16 @@ public interface IPeripheral
* @return A string identifying the type of peripheral.
*/
public String getType();
/**
* Should return an array of strings that identify the methods that this
* Should return an array of strings that identify the methods that this
* peripheral exposes to Lua. This will be called once before each attachment,
* and should not change when called multiple times.
* @return An array of strings representing method names.
* @see #callMethod
*/
public String[] getMethodNames();
/**
* This is called when a lua program on an attached computercraft calls peripheral.call() with
* one of the methods exposed by getMethodNames().<br>
@@ -60,8 +60,8 @@ public interface IPeripheral
* arguments are supplied to your method.
* @see #getMethodNames
*/
public Object[] callMethod( IComputerAccess computer, ILuaContext context, int method, Object[] arguments ) throws LuaException, InterruptedException;
public Object[] callMethod(IComputerAccess computer, ILuaContext context, int method, Object[] arguments) throws LuaException, InterruptedException;
/**
* Is called when canAttachToSide has returned true, and a computercraft is attaching to the peripheral.
* This will occur when a peripheral is placed next to an active computercraft, when a computercraft is turned on next to a peripheral,
@@ -76,7 +76,7 @@ public interface IPeripheral
* computers can be attached to a peripheral at once.
* @see #detach
*/
public void attach( IComputerAccess computer );
public void attach(IComputerAccess computer);
/**
* Is called when a computercraft is detaching from the peripheral.
@@ -91,10 +91,10 @@ public interface IPeripheral
* computers can be attached to a peripheral at once.
* @see #detach
*/
public void detach( IComputerAccess computer );
public void detach(IComputerAccess computer);
/**
* TODO: Document me
*/
public boolean equals( IPeripheral other );
public boolean equals(IPeripheral other);
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -10,14 +10,14 @@ import net.minecraft.world.World;
/**
* This interface is used to create peripheral implementations for blocks
* @see dan200.computercraft.api.ComputerCraftAPI#registerPeripheralProvider(IPeripheralProvider)
* @see dan200.computercraft.api.ComputerCraftAPI#registerPeripheralProvider(dan200.computercraft.api.peripheral.IPeripheralProvider)
*/
public interface IPeripheralProvider
{
/**
* Produce an peripheral implementation from a block location.
* @see dan200.computercraft.api.ComputerCraftAPI#registerPeripheralProvider(IPeripheralProvider)
* @see dan200.computercraft.api.ComputerCraftAPI#registerPeripheralProvider(dan200.computercraft.api.peripheral.IPeripheralProvider)
* @return a peripheral, or null if there is not a peripheral here you'd like to handle.
*/
public IPeripheral getPeripheral( World world, int x, int y, int z, int side );
public IPeripheral getPeripheral(World world, int x, int y, int z, int side);
}
@@ -1,10 +1,10 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API|Peripheral", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API|Peripheral", apiVersion="1.66pr3" )
package dan200.computercraft.api.peripheral;
import cpw.mods.fml.common.API;
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -10,14 +10,14 @@ import net.minecraft.world.World;
/**
* This interface is used to provide bundled redstone output for blocks
* @see dan200.computercraft.api.ComputerCraftAPI#registerBundledRedstoneProvider(IBundledRedstoneProvider)
* @see dan200.computercraft.api.ComputerCraftAPI#registerBundledRedstoneProvider(dan200.computercraft.api.redstone.IBundledRedstoneProvider)
*/
public interface IBundledRedstoneProvider
{
/**
* Produce an bundled redstone output from a block location.
* @see dan200.computercraft.api.ComputerCraftAPI#registerBundledRedstoneProvider(IBundledRedstoneProvider)
* @see dan200.computercraft.api.ComputerCraftAPI#registerBundledRedstoneProvider(dan200.computercraft.api.redstone.IBundledRedstoneProvider)
* @return a number in the range 0-65535 to indicate this block is providing output, or -1 if you do not wish to handle this block
*/
public int getBundledRedstoneOutput( World world, int x, int y, int z, int side );
public int getBundledRedstoneOutput(World world, int x, int y, int z, int side);
}
@@ -1,10 +1,10 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@API( owner="ComputerCraft", provides="ComputerCraft|API|Redstone", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API|Redstone", apiVersion="1.66pr3" )
package dan200.computercraft.api.redstone;
import cpw.mods.fml.common.API;
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -36,7 +36,7 @@ public interface ITurtleAccess
/**
* TODO: Document me
*/
public boolean teleportTo( World world, int x, int y, int z );
public boolean teleportTo(World world, int x, int y, int z);
/**
* Returns a vector containing the floating point co-ordinates at which the turtle is rendered.
@@ -44,12 +44,12 @@ public interface ITurtleAccess
* @param f The subframe fraction
* @return a vector containing the floating point co-ordinates at which the turtle resides.
*/
public Vec3 getVisualPosition( float f );
public Vec3 getVisualPosition(float f);
/**
* TODO: Document me
*/
public float getVisualYaw( float f );
public float getVisualYaw(float f);
/**
* Returns the world direction the turtle is currently facing.
@@ -60,7 +60,7 @@ public interface ITurtleAccess
/**
* TODO: Document me
*/
public void setDirection( int dir );
public void setDirection(int dir);
/**
* TODO: Document me
@@ -70,7 +70,19 @@ public interface ITurtleAccess
/**
* TODO: Document me
*/
public void setSelectedSlot( int slot );
public void setSelectedSlot(int slot);
/**
* Sets the colour of the turtle, as if the player had dyed it with a dye item.
* @param dyeColour 0-15 to dye the turtle one of the 16 standard minecraft colours, or -1 to remove the dye from the turtle.
*/
public void setDyeColour(int dyeColour);
/**
* Gets the colour the turtle has been dyed.
* @return 0-15 if the turtle has been dyed one of the 16 standard minecraft colours, -1 if the turtle is clean.
*/
public int getDyeColour();
/**
* TODO: Document me
@@ -90,7 +102,7 @@ public interface ITurtleAccess
/**
* TODO: Document me
*/
public void setFuelLevel( int fuel );
public void setFuelLevel(int fuel);
/**
* TODO: Document me
@@ -102,12 +114,12 @@ public interface ITurtleAccess
* @return Whether the turtle was able to consume the ammount of fuel specified. Will return false if you supply a number
* greater than the current fuel level of the turtle.
*/
public boolean consumeFuel( int fuel );
public boolean consumeFuel(int fuel);
/**
* TODO: Document me
*/
public void addFuel( int fuel );
public void addFuel(int fuel);
/**
* Adds a custom command to the turtles command queue. Unlike peripheral methods, these custom commands will be executed
@@ -120,37 +132,37 @@ public interface ITurtleAccess
* unchanged if called from a peripheral method.
* @see ITurtleCommand
*/
public Object[] executeCommand( ILuaContext context, ITurtleCommand command ) throws LuaException, InterruptedException;
public Object[] executeCommand(ILuaContext context, ITurtleCommand command) throws LuaException, InterruptedException;
/**
* TODO: Document me
*/
public void playAnimation( TurtleAnimation animation );
public void playAnimation(TurtleAnimation animation);
/**
* Returns the turtle on the specified side of the turtle, if there is one.
* @return the turtle on the specified side of the turtle, if there is one.
*/
public ITurtleUpgrade getUpgrade( TurtleSide side );
public ITurtleUpgrade getUpgrade(TurtleSide side);
/**
* TODO: Document me
*/
public void setUpgrade( TurtleSide side, ITurtleUpgrade upgrade );
public void setUpgrade(TurtleSide side, ITurtleUpgrade upgrade);
/**
* Returns the peripheral created by the upgrade on the specified side of the turtle, if there is one.
* @return the peripheral created by the upgrade on the specified side of the turtle, if there is one.
*/
public IPeripheral getPeripheral( TurtleSide side );
public IPeripheral getPeripheral(TurtleSide side);
/**
* TODO: Document me
*/
public NBTTagCompound getUpgradeNBTData( TurtleSide side );
public NBTTagCompound getUpgradeNBTData(TurtleSide side);
/**
* TODO: Document me
*/
public void updateUpgradeNBTData( TurtleSide side );
public void updateUpgradeNBTData(TurtleSide side);
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -8,7 +8,7 @@ package dan200.computercraft.api.turtle;
/**
* An interface for objects executing custom turtle commands, used with ITurtleAccess.issueCommand
* @see ITurtleAccess#executeCommand(dan200.computercraft.api.lua.ILuaContext,ITurtleCommand)
* @see dan200.computercraft.api.turtle.ITurtleAccess#executeCommand(dan200.computercraft.api.lua.ILuaContext, dan200.computercraft.api.turtle.ITurtleCommand)
*/
public interface ITurtleCommand
{
@@ -18,8 +18,8 @@ public interface ITurtleCommand
* failure with an error message to indicate the command cannot be executed at this time.
* @param turtle access to the turtle for whom the command was issued
* @return TurtleCommandResult.success() or TurtleCommandResult.failure( errorMessage )
* @see ITurtleAccess#executeCommand(dan200.computercraft.api.lua.ILuaContext,ITurtleCommand)
* @see dan200.computercraft.api.turtle.ITurtleAccess#executeCommand(dan200.computercraft.api.lua.ILuaContext, dan200.computercraft.api.turtle.ITurtleCommand)
* @see dan200.computercraft.api.turtle.TurtleCommandResult
*/
public TurtleCommandResult execute( ITurtleAccess turtle );
public TurtleCommandResult execute(ITurtleAccess turtle);
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -13,7 +13,7 @@ import net.minecraft.util.IIcon;
/**
* The primary interface for defining an turtle for Turtles. A turtle turtle
* can either be a new tool, or a new peripheral.
* @see dan200.computercraft.api.ComputerCraftAPI#registerTurtleUpgrade( dan200.computercraft.api.turtle.ITurtleUpgrade )
* @see dan200.computercraft.api.ComputerCraftAPI#registerTurtleUpgrade( ITurtleUpgrade )
*/
public interface ITurtleUpgrade
{
@@ -24,28 +24,28 @@ public interface ITurtleUpgrade
* The ID must be in the range 64 to 255, as the ID is stored as an 8-bit value,
* and 0-64 is reserved for future use by ComputerCraft. The turtle will
* fail registration if an already used ID is specified.
* @see dan200.computercraft.api.ComputerCraftAPI#registerTurtleUpgrade( dan200.computercraft.api.turtle.ITurtleUpgrade )
* @see dan200.computercraft.api.ComputerCraftAPI#registerTurtleUpgrade( ITurtleUpgrade )
*/
public int getUpgradeID();
/**
* Return a String to describe this type of turtle in turtle item names.
* Examples of built-in adjectives are "Wireless", "Mining" and "Crafty".
*/
*/
public String getUnlocalisedAdjective();
/**
* Return whether this turtle adds a tool or a peripheral to the turtle.
* Currently, turtle crafting is restricted to one tool & one peripheral per turtle.
* @see TurtleUpgradeType for the differences between the two.
*/
*/
public TurtleUpgradeType getType();
/**
* Return an item stack representing the type of item that a turtle must be crafted
* with to create a turtle which holds this turtle.
* Currently, turtle crafting is restricted to one tool & one peripheral per turtle.
*/
*/
public ItemStack getCraftingItem();
/**
@@ -58,8 +58,8 @@ public interface ITurtleUpgrade
* @param side Which side of the turtle (left or right) that the turtle resides on.
* @return The newly created peripheral. You may return null if this turtle is a Tool
* and this method is not expected to be called.
*/
public IPeripheral createPeripheral( ITurtleAccess turtle, TurtleSide side );
*/
public IPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side);
/**
* Will only be called for Tool turtle. Called when turtle.dig() or turtle.attack() is called
@@ -75,7 +75,7 @@ public interface ITurtleUpgrade
* a swinging animation. You may return null if this turtle is a Peripheral
* and this method is not expected to be called.
*/
public TurtleCommandResult useTool( ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, int direction );
public TurtleCommandResult useTool(ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, int direction);
/**
* Called to obtain the IIcon to be used when rendering a turtle peripheral. Needs to be a "common"
@@ -85,10 +85,10 @@ public interface ITurtleUpgrade
* @param side Which side of the turtle (left or right) the peripheral resides on.
* @return The IIcon that you wish to be used to render your turtle peripheral.
*/
public IIcon getIcon( ITurtleAccess turtle, TurtleSide side );
public IIcon getIcon(ITurtleAccess turtle, TurtleSide side);
/**
* TODO: Document me
*/
public void update( ITurtleAccess turtle, TurtleSide side );
public void update(ITurtleAccess turtle, TurtleSide side);
}
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -9,7 +9,7 @@ package dan200.computercraft.api.turtle;
/**
* An enum representing the two different types of turtle that an ITurtleUpgrade
* implementation can add to a turtle.
* @see ITurtleUpgrade
* @see dan200.computercraft.api.turtle.ITurtleUpgrade
*/
public enum TurtleUpgradeType
{
@@ -18,7 +18,7 @@ public enum TurtleUpgradeType
* and turtle.attack() methods (Such as pickaxe or sword on Mining and Melee turtles).
*/
Tool,
/**
* A peripheral adds a special peripheral which is attached to the side of the turtle,
* and can be interacted with the peripheral API (Such as the modem on Wireless Turtles).
@@ -1,6 +1,6 @@
/**
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2014. This API may be redistributed unmodified and in full only.
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
@@ -18,7 +18,7 @@ public enum TurtleVerb
* The turtle called turtle.dig(), turtle.digUp() or turtle.digDown()
*/
Dig,
/**
* The turtle called turtle.attack(), turtle.attackUp() or turtle.attackDown()
*/
@@ -1,4 +1,4 @@
@API( owner="ComputerCraft", provides="ComputerCraft|API|Turtle", apiVersion="1.65" )
@API( owner="ComputerCraft", provides="ComputerCraft|API|Turtle", apiVersion="1.66pr3" )
package dan200.computercraft.api.turtle;
import cpw.mods.fml.common.API;
@@ -55,6 +55,7 @@ import thaumic.tinkerer.common.block.tile.TileMagnet;
import thaumic.tinkerer.common.block.tile.TileRepairer;
import thaumic.tinkerer.common.block.tile.kami.TileWarpGate;
import thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet;
import thaumic.tinkerer.common.compat.FumeTool;
import thaumic.tinkerer.common.core.handler.ConfigHandler;
import thaumic.tinkerer.common.core.proxy.TTCommonProxy;
import thaumic.tinkerer.common.item.ItemInfusedSeeds;
@@ -71,8 +72,7 @@ public class TTClientProxy extends TTCommonProxy {
@Override
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
//Temporarly disabled for 1.7
//MinecraftForge.EVENT_BUS.register(new FumeTool());
MinecraftForge.EVENT_BUS.register(new FumeTool());
if (ConfigHandler.enableKami)
//kamiRarity = EnumHelperClient.addRarity("KAMI", 0x6, "Kami");
kamiRarity = EnumHelperClient.addEnum(new Class[][]{{EnumRarity.class, EnumChatFormatting.class, String.class}}, EnumRarity.class, "KAMI", EnumChatFormatting.LIGHT_PURPLE, "Kami");
@@ -0,0 +1,41 @@
package thaumic.tinkerer.common.compat;
import dan200.computercraft.api.lua.ILuaContext;
import dan200.computercraft.api.lua.LuaException;
import dan200.computercraft.api.peripheral.IComputerAccess;
import dan200.computercraft.api.peripheral.IPeripheral;
/**
* Created by Katrina on 04/02/2015.
*/
public class FumePeripheral implements IPeripheral {
@Override
public String getType() {
return "gasRemover";
}
@Override
public String[] getMethodNames() {
return new String[]{};
}
@Override
public Object[] callMethod(IComputerAccess computer, ILuaContext context, int method, Object[] arguments) throws LuaException, InterruptedException {
return new Object[]{};
}
@Override
public void attach(IComputerAccess computer) {
}
@Override
public void detach(IComputerAccess computer) {
}
@Override
public boolean equals(IPeripheral other) {
return other instanceof FumePeripheral;
}
}
@@ -0,0 +1,99 @@
package thaumic.tinkerer.common.compat;
import WayofTime.alchemicalWizardry.ModItems;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.api.turtle.*;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraftforge.client.event.TextureStitchEvent;
import thaumic.tinkerer.common.ThaumicTinkerer;
import thaumic.tinkerer.common.block.BlockGas;
import thaumic.tinkerer.common.item.ItemGasRemover;
import thaumic.tinkerer.common.registry.TTRegistry;
/**
* Created by Katrina on 04/02/2015.
*/
public class FumeTool implements ITurtleUpgrade {
@SideOnly(Side.CLIENT)
public static IIcon icon;
@Override
public int getUpgradeID() {
return 171;
}
@Override
public String getUnlocalisedAdjective() {
return "ttcomputer.dissipator";
}
@Override
public TurtleUpgradeType getType() {
return TurtleUpgradeType.Tool;
}
@Override
public ItemStack getCraftingItem() {
return new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemGasRemover.class));
}
@Override
public IPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side) {
return null;
}
@Override
public TurtleCommandResult useTool(ITurtleAccess turtle, TurtleSide side,
TurtleVerb verb, int direction) {
if(verb==TurtleVerb.Dig)
{
ChunkCoordinates pos=turtle.getPosition();
int xs = (int) pos.posX;
int ys = (int) pos.posY;
int zs = (int) pos.posZ;
for(int x = xs - 3; x < xs + 3; x++)
for(int y = ys - 3; y < ys + 3; y++)
for(int z = zs - 3; z < zs + 3; z++) {
Block block = turtle.getWorld().getBlock(x, y, z);
if(block != null && block instanceof BlockGas) {
BlockGas gas = (BlockGas) block;
gas.placeParticle(turtle.getWorld(), x, y, z);
turtle.getWorld().setBlock(x, y, z, Blocks.air, 0, 1 | 2);
}
}
//turtle.getWorld().playSoundAtEntity(turtle., "thaumcraft.wand", 0.2F, 1F);
return TurtleCommandResult.success();
}
return TurtleCommandResult.failure();
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ITurtleAccess turtle, TurtleSide side) {
return icon;
}
@Override
public void update(ITurtleAccess turtle, TurtleSide side) {
}
@SubscribeEvent
public void registerIcons(TextureStitchEvent evt) {
if (evt.map.getTextureType() == 1) icon = evt.map.registerIcon("ttinkerer:gasRemover");
}
}
@@ -23,6 +23,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
import dan200.computercraft.api.ComputerCraftAPI;
import li.cil.oc.api.Driver;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@@ -40,6 +41,7 @@ import thaumic.tinkerer.common.ThaumicTinkerer;
import thaumic.tinkerer.common.block.tile.TileFunnel;
import thaumic.tinkerer.common.block.tile.TileRepairer;
import thaumic.tinkerer.common.block.tile.transvector.TileTransvectorInterface;
import thaumic.tinkerer.common.compat.FumeTool;
import thaumic.tinkerer.common.core.handler.ConfigHandler;
import thaumic.tinkerer.common.core.handler.ModCreativeTab;
import thaumic.tinkerer.common.core.handler.kami.DimensionalShardDropHandler;
@@ -168,7 +170,7 @@ public class TTCommonProxy {
};
handler.registerPeripheralProvider();
//ComputerCraftAPI.registerTurtleUpgrade(new FumeTool());
ComputerCraftAPI.registerTurtleUpgrade(new FumeTool());
}
@Optional.Method(modid = "OpenComputers")