mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 12:17:17 -04:00
upgraded forge version and added API annotation to api package
This commit is contained in:
parent
59ab8767a2
commit
e9bc0888bc
@ -14,7 +14,9 @@ import li.cil.oc.common.Proxy
|
||||
import li.cil.oc.server.{PacketHandler => ServerPacketHandler}
|
||||
import scala.reflect.runtime.{universe => ru}
|
||||
|
||||
@Mod(modid = "OpenComputers", name = "OpenComputers", version = "0.0.0", dependencies = "required-after:Forge@[9.10.0.804,)", modLanguage = "scala")
|
||||
@Mod(modid = "OpenComputers", name = "OpenComputers", version = "0.0.0",
|
||||
dependencies = "required-after:Forge@[9.11.1.940,)",
|
||||
modLanguage = "scala")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false,
|
||||
clientPacketHandlerSpec = new SidedPacketHandler(
|
||||
channels = Array("OpenComp"), packetHandler = classOf[ClientPacketHandler]),
|
||||
|
@ -5,6 +5,18 @@ import dan200.computer.api.IWritableMount;
|
||||
import li.cil.oc.api.detail.FileSystemAPI;
|
||||
import li.cil.oc.api.network.ManagedEnvironment;
|
||||
|
||||
/**
|
||||
* This class provides factory methods for creating file systems that are
|
||||
* compatible with the built-in filesystem driver.
|
||||
* <p/>
|
||||
* File systems created this way and wrapped in a managed environment via
|
||||
* {@link #asManagedEnvironment(li.cil.oc.api.fs.FileSystem)} will appear as
|
||||
* <tt>filesystem</tt> components in the internal network. Note that the
|
||||
* component's visibility is set to <tt>Neighbors</tt> per default. If you wish
|
||||
* to change the file system's visibility (e.g. like the disk drive does) you
|
||||
* must cast the environment's node to {@link li.cil.oc.api.network.Component}
|
||||
* and set it accordingly.
|
||||
*/
|
||||
final public class FileSystem {
|
||||
/**
|
||||
* Creates a new file system based on the location of a class.
|
||||
|
@ -6,6 +6,15 @@ import li.cil.oc.api.network.Environment;
|
||||
import li.cil.oc.api.network.Visibility;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* This class provides factories networks and nodes.
|
||||
* <p/>
|
||||
* The two functions provided provided by this API are to allow existing
|
||||
* environments - implemented in a tile entity - to join an existing network or
|
||||
* create a new one, and to create nodes that may then be connected to an
|
||||
* existing network. It is not possible to create networks that do not belong
|
||||
* to at least one tile entity at this time.
|
||||
*/
|
||||
final public class Network {
|
||||
/**
|
||||
* Tries to add a tile entity network node at the specified coordinates to
|
||||
|
40
li/cil/oc/api/package-info.java
Normal file
40
li/cil/oc/api/package-info.java
Normal file
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* This API provides interfaces and factory methods for the OpenComputers mod.
|
||||
* <p/>
|
||||
* There are several parts to this API:
|
||||
* <dl>
|
||||
* <dt>The {@link Driver} API</dt>
|
||||
* <dd>
|
||||
* This API is used to provide glue code to the mod that allows it to interact
|
||||
* with foreign objects. You need a driver if you wish to connect some object
|
||||
* to the internal {@link li.cil.oc.api.network.Network}, for example because
|
||||
* you wish to interact with other blocks / components of the mod. The most
|
||||
* typical scenario for this will be adding a new object that Lua programs
|
||||
* should be able to interact with: a {@link li.cil.oc.api.network.Component}.
|
||||
* <p/>
|
||||
* Note that for tile entities you implement yourself, you will not have to
|
||||
* provide a driver, as long as you implement the necessary interface:
|
||||
* {@link li.cil.oc.api.network.Environment}. For items that should be installed
|
||||
* in a computer, however, you will always have to provide a driver.
|
||||
* </dd>
|
||||
* <dt>The {@link FileSystem} API</dt>
|
||||
* <dd>
|
||||
* This API provides facilities that make it easier to create file systems that
|
||||
* can be interacted with from Lua programs via the file system driver that
|
||||
* comes with the mod.
|
||||
* </dd>
|
||||
* <dt>The {@link Network} API</dt>
|
||||
* <dd>
|
||||
* This API provides interfaces that allow interacting with the internal network
|
||||
* and creating nodes, components and power connectors for said network. If you
|
||||
* implement <tt>Environment</tt> in your tile entity or provide a
|
||||
* {@link li.cil.oc.api.network.ManagedEnvironment} via a driver you'll have to
|
||||
* create a node. This API provides factory methods for creating it.
|
||||
* </dd>
|
||||
* </dl>
|
||||
*/
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers",
|
||||
provides = "OpenComputersAPI",
|
||||
apiVersion = "1.0.0")
|
||||
package li.cil.oc.api;
|
Loading…
x
Reference in New Issue
Block a user