mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
Change modid from 'OpenComputers' to 'opencomputers'
Camel case doesn't seem to work while all-lowercase does.
This commit is contained in:
parent
2de3169e62
commit
803402c4a9
@ -7,7 +7,7 @@ Making a tile entity available as a component / peripheral
|
||||
--------------------------------------------------
|
||||
If you simply wish to expose a couple of methods that can be called from a computer if your tile entity's block is 'connected' to the computer, you can use the `SimpleComponent` interface. This interface serves as a marker for OpenComputers to know it has to inject code that converts your tile entity into a component using its class transformer. It is an interface instead of an annotation to allow stripping it, removing any dependencies on OpenComputers. Here is an example implementation:
|
||||
```java
|
||||
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")
|
||||
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")
|
||||
public class TileEntityMyFancyThing extends TileEntity
|
||||
implements SimpleComponent
|
||||
{
|
||||
@ -17,7 +17,7 @@ public class TileEntityMyFancyThing extends TileEntity
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
@Optional.Method(modid = "opencomputers")
|
||||
public Object[] greet(Context context, Arguments args) {
|
||||
return new Object[]{String.format("Hello, %s!", args.checkString(0))};
|
||||
}
|
||||
@ -82,4 +82,4 @@ public class TileEntityWithFileSystem extends TileEntityEnvironment {
|
||||
```
|
||||
|
||||
|
||||
[integration]: https://github.com/MightyPirates/OpenComputers/tree/master-MC1.7.10/src/main/scala/li/cil/oc/integration
|
||||
[integration]: https://github.com/MightyPirates/OpenComputers/tree/master-MC1.7.10/src/main/scala/li/cil/oc/integration
|
||||
|
Loading…
x
Reference in New Issue
Block a user