Renamed to oc2r (OpenComputers II: Reimagined) this includes changing the mod id from oc2 to oc2r.
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -39,7 +39,7 @@ If applicable, add screenshots to help explain your problem.
|
||||
**Versions (please complete the following information):**
|
||||
- Minecraft: [e.g. 1.18.2]
|
||||
- Forge: [e.g. 40.0.40]
|
||||
- OC2: [e.g. 0.1.7]
|
||||
- oc2r: [e.g. 0.1.7]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
37
README.md
37
README.md
@@ -1,27 +1,32 @@
|
||||
# OpenComputers II
|
||||
# OpenComputers II: Reimagined
|
||||
|
||||
OpenComputers II is a Minecraft mod adding virtual computers to the game. These computers run a virtual machine emulating a 64-Bit RISC-V architecture capable of booting Linux. On top of this, a high-level Lua API is provided to communicate with various devices in the game world. This enables adding virtual devices using a simple, Java-friendly API, without having to implement actual kernel drivers.
|
||||
*OpenComputers II: Reimagined* is a Minecraft mod adding virtual computers to the game. It is a fork of the mod originally made by [Sangar (fnuecke)], this fork is maintained North Western Development. These computers run a virtual machine emulating a 64-Bit RISC-V architecture capable of booting Linux. On top of this, a high-level Lua API is provided to communicate with various devices in the game world. This enables adding virtual devices using a simple, Java-friendly API, without having to implement actual kernel drivers.
|
||||
|
||||
This mod is a successor to [OpenComputers]. At least in spirit. While many of the implementation details have changed quite dramatically, the core concepts of customizable hardware, persistence and sand-boxing are shared.
|
||||
The original mod was a successor to [OpenComputers]. At least in spirit. While many of the implementation details have changed quite dramatically, the core concepts of customizable hardware, persistence and sand-boxing are shared.
|
||||
|
||||
The underlying VM, which is written entirely in Java, is called [Sedna] and was written by [Sangar (fnuecke)] as well.
|
||||
|
||||
## Why the Fork?
|
||||
|
||||
*OpenComputers II: Reimagined* aims to fix bugs with OC2 while adding new features and attempting to keep up with the latest popular versions of Minecraft. We did attempt to reach [Sangar (fnuecke)] on Twitter but got no response, so we've decided to continue with the fork and releasing separately on Curse under a new name.
|
||||
The name change is simply an attempt to ensure it is well known that [Sangar (fnuecke)] is not responsible for this version, so they're not blasted with issues from it. We will be doing everything we can to ensure [Sangar (fnuecke)] does still get the credit they deserve for the mod though.
|
||||
|
||||
## Gameplay Documentation
|
||||
For documentation on how the to get computers up and running, and how to use them, see the [documentation]. It is available as a manual item in the game.
|
||||
|
||||
## Development Documentation
|
||||
While the mod isn't quite yet ready for release due to some remaining technical and usability issues, the API should be mostly stable at this point. For most people the high level device API will be sufficient, and is much more accessible. It centers around the [`RPCDevice`][RPC Device]. For a sample block implementation, see the [redstone interface]. For a sample item implementation, see the [sound card]. If you wish to dive deeper, and provide emulated hardware that requires a Linux driver, this centers around the [`VMDevice`][VM Device]. For a sample block implementation, see the [disk drive]. For a sample item implementation, see the [network card].
|
||||
The original section that was found here is preserved below, however it should be taken with a grain of salt as the current team has a ways to go in being 100% up to speed with where the device APIs are at the moment. So everything below is subject to change, though it is likely to remain mostly the same.
|
||||
|
||||
## Building
|
||||
To build this project, credentials for the Github Package Repository must be set up once on your machine (see
|
||||
[the documentation][GithubPackagesGradle] for more information). In short, you'll want to add your username and a
|
||||
public access token with `read:packages` permissions into your `~/.gradle/gradle.properties`. The properties must be
|
||||
named `gpr.user` and `gpr.key`.
|
||||
~~While the mod isn't quite yet ready for release due to some remaining technical and usability issues, the API should be mostly stable at this point. For most people the high level device API will be sufficient, and is much more accessible. It centers around the [`RPCDevice`][RPC Device]. For a sample block implementation, see the [redstone interface]. For a sample item implementation, see the [sound card]. If you wish to dive deeper, and provide emulated hardware that requires a Linux driver, this centers around the [`VMDevice`][VM Device]. For a sample block implementation, see the [disk drive]. For a sample item implementation, see the [network card].~~
|
||||
|
||||
[OpenComputers]: https://github.com/MightyPirates/OpenComputers
|
||||
[RPC Device]: src/main/java/li/cil/oc2/api/bus/device/rpc/RPCDevice.java
|
||||
[redstone interface]: src/main/java/li/cil/oc2/common/blockentity/RedstoneInterfaceBlockEntity.java
|
||||
[sound card]: src/main/java/li/cil/oc2/common/bus/device/rpc/item/SoundCardItemDevice.java
|
||||
[VM Device]: src/main/java/li/cil/oc2/api/bus/device/vm/VMDevice.java
|
||||
[disk drive]: src/main/java/li/cil/oc2/common/blockentity/DiskDriveBlockEntity.java
|
||||
[network card]: src/main/java/li/cil/oc2/common/bus/device/vm/item/NetworkInterfaceCardDevice.java
|
||||
[documentation]: src/main/resources/assets/oc2/doc/en_us/index.md
|
||||
[RPC Device]: src/main/java/li/cil/oc2r/api/bus/device/rpc/RPCDevice.java
|
||||
[redstone interface]: src/main/java/li/cil/oc2r/common/blockentity/RedstoneInterfaceBlockEntity.java
|
||||
[sound card]: src/main/java/li/cil/oc2r/common/bus/device/rpc/item/SoundCardItemDevice.java
|
||||
[VM Device]: src/main/java/li/cil/oc2r/api/bus/device/vm/VMDevice.java
|
||||
[disk drive]: src/main/java/li/cil/oc2r/common/blockentity/DiskDriveBlockEntity.java
|
||||
[network card]: src/main/java/li/cil/oc2r/common/bus/device/vm/item/NetworkInterfaceCardDevice.java
|
||||
[documentation]: src/main/resources/assets/oc2r/doc/en_us/index.md
|
||||
[GithubPackagesGradle]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry
|
||||
[Sangar (fnuecke)]: https://github.com/fnuecke
|
||||
[Sedna]: https://github.com/fnuecke/sedna
|
||||
|
||||
28
build.gradle
28
build.gradle
@@ -31,7 +31,7 @@ def getGitRef() {
|
||||
}
|
||||
|
||||
version = "${semver}+${getGitRef()}"
|
||||
group = "li.cil.oc2"
|
||||
group = "li.cil.oc2r"
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
@@ -105,7 +105,7 @@ System.setProperty("line.separator", "\n")
|
||||
|
||||
task packageScripts(type: Zip) {
|
||||
archiveFileName = "scripts.zip"
|
||||
destinationDirectory = file("$buildDir/resources/main/data/oc2/file_systems")
|
||||
destinationDirectory = file("$buildDir/resources/main/data/oc2r/file_systems")
|
||||
from "src/main/scripts"
|
||||
filter { line -> line }
|
||||
}
|
||||
@@ -130,7 +130,7 @@ minecraft {
|
||||
property "forge.logging.console.level", "debug"
|
||||
|
||||
mods {
|
||||
oc2 {
|
||||
oc2r {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
@@ -138,30 +138,30 @@ minecraft {
|
||||
|
||||
client {
|
||||
workingDirectory project.file("runclient")
|
||||
property "forge.enabledGameTestNamespaces", "oc2"
|
||||
property "forge.enabledGameTestNamespaces", "oc2r"
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file("run")
|
||||
property "forge.enabledGameTestNamespaces", "oc2"
|
||||
property "forge.enabledGameTestNamespaces", "oc2r"
|
||||
arg "--nogui"
|
||||
}
|
||||
|
||||
gameTestServer {
|
||||
workingDirectory project.file('run')
|
||||
property "forge.enabledGameTestNamespaces", "oc2"
|
||||
property "forge.enabledGameTestNamespaces", "oc2r"
|
||||
}
|
||||
|
||||
data {
|
||||
workingDirectory project.file("run")
|
||||
args "--mod", "oc2", "--all", "--output", file("src/generated/resources/"), "--existing", file("src/main/resources")
|
||||
args "--mod", "oc2r", "--all", "--output", file("src/generated/resources/"), "--existing", file("src/main/resources")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "mixins.oc2.refmap.json"
|
||||
config "mixins.oc2.json"
|
||||
add sourceSets.main, "mixins.oc2r.refmap.json"
|
||||
config "mixins.oc2r.json"
|
||||
|
||||
// quiet
|
||||
}
|
||||
@@ -178,14 +178,14 @@ jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"FMLAT" : "accesstransformer.cfg",
|
||||
"Specification-Title" : "oc2",
|
||||
"Specification-Vendor" : "Sangar",
|
||||
"Specification-Title" : "oc2r",
|
||||
"Specification-Vendor" : "North Western Development (Originally by Sangar)",
|
||||
"Specification-Version" : "1",
|
||||
"Implementation-Title" : project.name,
|
||||
"Implementation-Version" : "${semver}",
|
||||
"Implementation-Vendor" : "Sangar",
|
||||
"Implementation-Vendor" : "North Western Development (Originally by Sangar)",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
"MixinConfigs" : "mixins.oc2.json",
|
||||
"MixinConfigs" : "mixins.oc2r.json",
|
||||
"ContainedDeps" : "commons-collections4-4.4.jar"
|
||||
])
|
||||
}
|
||||
@@ -195,7 +195,7 @@ task apiJar(type: Jar) {
|
||||
archiveClassifier.set("api")
|
||||
from sourceSets.main.allSource
|
||||
from sourceSets.main.output
|
||||
include "li/cil/oc2/api/**"
|
||||
include "li/cil/oc2r/api/**"
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -5,6 +5,6 @@ org.gradle.daemon=false
|
||||
|
||||
forge_version=47.2.32
|
||||
|
||||
semver=0.0.0
|
||||
semver=1.0.0
|
||||
|
||||
curse_project_id=437654
|
||||
|
||||
@@ -7,7 +7,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
apply from: 'minecraft.gradle'
|
||||
rootProject.name = "oc2-${minecraft_version}-${minecraft_sdk}"
|
||||
rootProject.name = "oc2r-${minecraft_version}-${minecraft_sdk}"
|
||||
|
||||
def substituteLocal(final directoryName, final libraryName) {
|
||||
final def path = new File("../${directoryName}");
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.api.bus.device.vm.context;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.api.bus.device.vm.event;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.gui.terminal;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.gui.util;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.gui.widget;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.item;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.manual;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.model;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.renderer.blockentity;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.renderer.color;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.renderer.entity.model;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.renderer.entity;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.renderer.font;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.client.renderer;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.block;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.blockentity;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,8 +0,0 @@
|
||||
package li.cil.oc2.common.bus.device;
|
||||
|
||||
import li.cil.oc2.common.bus.AbstractDeviceBusElement;
|
||||
|
||||
|
||||
public class BlockDeviceBusElement extends AbstractDeviceBusElement {
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.data;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.provider.block;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.provider.item;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.provider;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.provider.util;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.rpc.block;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.rpc.item;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.rpc;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.util;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.vm.block;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.vm.item;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus.device.vm;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.bus;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.capabilities;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.container;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.energy;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.entity;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.entity.robot;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.ext;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.integration.jei;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.integration;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.item.crafting;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.item;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.mixin;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.network.message;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.network;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.serialization.ceres;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.serialization.gson;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.serialization;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.tags;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.util;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.vm.context.global;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.vm.context.managed;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.vm.context;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.vm.fs;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.common.vm;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,16 +1,16 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api;
|
||||
package li.cil.oc2r.api;
|
||||
|
||||
import com.google.gson.GsonBuilder;
|
||||
import li.cil.oc2.api.bus.device.object.Callback;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2.api.imc.RPCMethodParameterTypeAdapter;
|
||||
import li.cil.oc2r.api.bus.device.object.Callback;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2r.api.imc.RPCMethodParameterTypeAdapter;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
public final class API {
|
||||
public static final String MOD_ID = "oc2";
|
||||
public static final String MOD_ID = "oc2r";
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The OpenComputer II API
|
||||
|
||||
Welcome to the API of `oc2`, fellow developer! This document will hopefully provide a sufficient overview of what
|
||||
Welcome to the API of `oc2r`, fellow developer! This document will hopefully provide a sufficient overview of what
|
||||
integrations this API allows, and how to best implement them. The primary purpose of the API is to allow other mods to
|
||||
implement their own devices, to be used by the computers in this mod.
|
||||
|
||||
@@ -150,9 +150,9 @@ In this example, a device is made available for a custom `BlockEntity`.
|
||||
Using capabilities:
|
||||
|
||||
```java
|
||||
import li.cil.oc2.api.bus.device.object.Callback;
|
||||
import li.cil.oc2.api.bus.device.object.ObjectDevice;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.object.Callback;
|
||||
import li.cil.oc2r.api.bus.device.object.ObjectDevice;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
@@ -166,7 +166,7 @@ class ModBlockEntity extends BlockEntity {
|
||||
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(Capability<T> cap, @Nullable Direction side) {
|
||||
if (ModList.get().isLoaded("oc2")) {
|
||||
if (ModList.get().isLoaded("oc2r")) {
|
||||
// Note: you can also store this and invalidate the capability to remove the
|
||||
// device/trigger the device bus to scan for changes in available devices.
|
||||
LazyOptional<T> device = getDeviceCapability();
|
||||
@@ -187,7 +187,8 @@ class ModBlockEntity extends BlockEntity {
|
||||
}
|
||||
|
||||
class Integration {
|
||||
public static final Capability<Device> DEVICE_CAPABILITY = CapabilityManager.get(new CapabilityToken<>() { });
|
||||
public static final Capability<Device> DEVICE_CAPABILITY = CapabilityManager.get(new CapabilityToken<>() {
|
||||
});
|
||||
|
||||
public static RPCDevice createDevice(ModBlockEntity blockEntity) {
|
||||
return new ObjectDevice(new ModBlockEntityDevice(blockEntity));
|
||||
@@ -210,7 +211,7 @@ class Integration {
|
||||
Using the `Callback` annotation in the `BlockEntity` (hard dependency):
|
||||
|
||||
```java
|
||||
import li.cil.oc2.api.bus.device.object.Callback;
|
||||
import li.cil.oc2r.api.bus.device.object.Callback;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
||||
class ModBlockEntity extends BlockEntity {
|
||||
@@ -227,15 +228,14 @@ devices to third-party `BlockEntities`.
|
||||
### Block Device for a Third-Party `BlockEntity`
|
||||
|
||||
In this example, a simple device providing a single method, `squareRoot`, is made available for the `FurnaceBlockEntity`
|
||||
. As long as the registration of the `BlockDeviceProvider` is gated behind a check, whether `oc2` is present, this is a
|
||||
. As long as the registration of the `BlockDeviceProvider` is gated behind a check, whether `oc2r` is present, this is a
|
||||
soft dependency.
|
||||
|
||||
Using `ObjectDevice`:
|
||||
|
||||
```java
|
||||
import li.cil.oc2.api.bus.device.object.Callback;
|
||||
import li.cil.oc2.api.bus.device.object.ObjectDevice;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.object.Callback;
|
||||
import li.cil.oc2r.api.bus.device.object.ObjectDevice;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
||||
class MyCalculatorDevice {
|
||||
@@ -263,14 +263,14 @@ class ModDeviceProvider extends ForgeRegistryEntry<BlockDeviceProvider> implemen
|
||||
Using the `RPCDevice` and `RPCMethods` interfaces directly:
|
||||
|
||||
```java
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2.api.bus.device.provider.BlockDeviceProvider;
|
||||
import li.cil.oc2.api.bus.device.provider.BlockDeviceQuery;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethodGroup;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCParameter;
|
||||
import li.cil.oc2.api.util.Invalidatable;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.provider.BlockDeviceProvider;
|
||||
import li.cil.oc2r.api.bus.device.provider.BlockDeviceQuery;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethodGroup;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCParameter;
|
||||
import li.cil.oc2r.api.util.Invalidatable;
|
||||
import net.minecraft.world.level.block.entity.FurnaceBlockEntity;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -332,15 +332,15 @@ class ModDeviceProvider extends ForgeRegistryEntry<BlockDeviceProvider> implemen
|
||||
Shared device provider registration:
|
||||
|
||||
```java
|
||||
import li.cil.oc2.api.bus.device.provider.BlockDeviceProvider;
|
||||
import li.cil.oc2r.api.bus.device.provider.BlockDeviceProvider;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
|
||||
class Providers {
|
||||
static final DeferredRegister<BlockDeviceProvider> BLOCK_DEVICE_PROVIDERS =
|
||||
DeferredRegister.create(BlockDeviceProvider.class, "my_mod_id");
|
||||
DeferredRegister.create(BlockDeviceProvider.class, "my_mod_id");
|
||||
|
||||
// Called from mod initialization, if oc2 is present.
|
||||
// Called from mod initialization, if oc2r is present.
|
||||
static void initialize() {
|
||||
BLOCK_DEVICE_PROVIDERS.register("my_calculator_device", ModDeviceProvider::new);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus;
|
||||
package li.cil.oc2r.api.bus;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus;
|
||||
package li.cil.oc2r.api.bus;
|
||||
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus;
|
||||
package li.cil.oc2r.api.bus;
|
||||
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -1,9 +1,9 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus;
|
||||
package li.cil.oc2r.api.bus;
|
||||
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -1,9 +1,9 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device;
|
||||
package li.cil.oc2r.api.bus.device;
|
||||
|
||||
import li.cil.oc2.api.bus.DeviceBus;
|
||||
import li.cil.oc2.api.bus.DeviceBusController;
|
||||
import li.cil.oc2r.api.bus.DeviceBus;
|
||||
import li.cil.oc2r.api.bus.DeviceBusController;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device;
|
||||
package li.cil.oc2r.api.bus.device;
|
||||
|
||||
import li.cil.oc2.api.API;
|
||||
import li.cil.oc2r.api.API;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device;
|
||||
package li.cil.oc2r.api.bus.device;
|
||||
|
||||
import li.cil.oc2.api.API;
|
||||
import li.cil.oc2r.api.API;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
@@ -10,15 +10,15 @@ import net.minecraftforge.registries.RegistryObject;
|
||||
* Lists built-in device types for convenience.
|
||||
*/
|
||||
public final class DeviceTypes {
|
||||
public static final DeviceType MEMORY = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "memory"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType MEMORY = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "memory"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
|
||||
public static final DeviceType HARD_DRIVE = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "hard_drive"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType HARD_DRIVE = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "hard_drive"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
|
||||
public static final DeviceType FLASH_MEMORY = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "flash_memory"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType CARD = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "card"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType ROBOT_MODULE = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "robot_module"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType FLASH_MEMORY = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "flash_memory"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType CARD = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "card"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType ROBOT_MODULE = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "robot_module"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
|
||||
public static final DeviceType FLOPPY = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "floppy"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType NETWORK_TUNNEL = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "network_tunnel"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType CPU = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "cpu"), new ResourceLocation("oc2", "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType FLOPPY = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "floppy"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType NETWORK_TUNNEL = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "network_tunnel"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
public static final DeviceType CPU = (DeviceType) RegistryObject.create(new ResourceLocation(API.MOD_ID, "cpu"), new ResourceLocation(API.MOD_ID, "device_type"), API.MOD_ID).get();
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device;
|
||||
package li.cil.oc2r.api.bus.device;
|
||||
|
||||
import li.cil.oc2.api.bus.device.provider.ItemDeviceProvider;
|
||||
import li.cil.oc2r.api.bus.device.provider.ItemDeviceProvider;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.data;
|
||||
package li.cil.oc2r.api.bus.device.data;
|
||||
|
||||
import li.cil.sedna.api.device.BlockDevice;
|
||||
import net.minecraft.network.chat.Component;
|
||||
@@ -13,15 +13,15 @@ import net.minecraft.network.chat.Component;
|
||||
* This is used for the built-in Linux root file-system, for example.
|
||||
* <p>
|
||||
* To make use of registered implementations, a hard drive item with the
|
||||
* string tag {@code oc2.base} referencing the implementation's registry id
|
||||
* string tag {@code oc2r.base} referencing the implementation's registry id
|
||||
* must be created. For example, if the implementation's registry name is
|
||||
* {@code my_mod:my_block_device}:
|
||||
* <pre>
|
||||
* /give ? oc2:hard_drive{oc2:{data:"my_mod:my_block_device"}}
|
||||
* /give ? oc2r:hard_drive{oc2r:{data:"my_mod:my_block_device"}}
|
||||
* </pre>
|
||||
* The drive can be made readonly by also specifying the {@code readonly} tag:
|
||||
* <pre>
|
||||
* /give ? oc2:hard_drive{oc2:{data:"my_mod:my_block_device",readonly:true}}
|
||||
* /give ? oc2r:hard_drive{oc2r:{data:"my_mod:my_block_device",readonly:true}}
|
||||
* </pre>
|
||||
*/
|
||||
public interface BlockDeviceData {
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.data;
|
||||
package li.cil.oc2r.api.bus.device.data;
|
||||
|
||||
import li.cil.sedna.api.memory.MemoryMap;
|
||||
import net.minecraft.network.chat.Component;
|
||||
@@ -12,11 +12,11 @@ import net.minecraft.network.chat.Component;
|
||||
* This is used for the built-in OpenSBI firmware and Linux kernel, for example.
|
||||
* <p>
|
||||
* To make use of registered implementations, a flash memory item with the
|
||||
* string tag {@code oc2.firmware} referencing the implementation's registry name
|
||||
* string tag {@code oc2r.firmware} referencing the implementation's registry name
|
||||
* must be created. For example, if the implementation's registry name is
|
||||
* {@code my_mod:my_firmware}:
|
||||
* <pre>
|
||||
* /give @p oc2:flash_memory{oc2:{firmware:"my_mod:my_firmware"}}
|
||||
* /give @p oc2r:flash_memory{oc2r:{firmware:"my_mod:my_firmware"}}
|
||||
* </pre>
|
||||
*/
|
||||
public interface Firmware {
|
||||
@@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2r.api.bus.device.data;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethod;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -17,7 +17,7 @@ import java.lang.annotation.Target;
|
||||
* <p>
|
||||
* Method parameters are serialized and deserialized using Gson. When using custom
|
||||
* parameter types it may be necessary to register a custom type adapter for them
|
||||
* via {@link li.cil.oc2.api.API#IMC_ADD_RPC_METHOD_PARAMETER_TYPE_ADAPTER}.
|
||||
* via {@link li.cil.oc2r.api.API#IMC_ADD_RPC_METHOD_PARAMETER_TYPE_ADAPTER}.
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@@ -1,11 +1,11 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import li.cil.oc2.api.bus.device.rpc.AbstractRPCMethod;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethodGroup;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCParameter;
|
||||
import li.cil.oc2r.api.bus.device.rpc.AbstractRPCMethod;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethodGroup;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCParameter;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.util.Strings;
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
/**
|
||||
* This interface is used to declare callback documentation on targets of an {@link ObjectDevice}.
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
@@ -1,11 +1,11 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import li.cil.oc2.api.bus.device.ItemDevice;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCMethodGroup;
|
||||
import li.cil.oc2r.api.bus.device.ItemDevice;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethod;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCMethodGroup;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.object;
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2r.api.bus.device.object;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2r.api.bus.device;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,11 +1,11 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.provider;
|
||||
package li.cil.oc2r.api.bus.device.provider;
|
||||
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2.api.bus.device.vm.VMDevice;
|
||||
import li.cil.oc2.api.util.Invalidatable;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.vm.VMDevice;
|
||||
import li.cil.oc2r.api.util.Invalidatable;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
* previous scan.
|
||||
* <p>
|
||||
* This is also required to avoid device duplication when a device is connected to a
|
||||
* {@link li.cil.oc2.api.bus.DeviceBus} more than once. An example where this can occur are
|
||||
* {@link li.cil.oc2r.api.bus.DeviceBus} more than once. An example where this can occur are
|
||||
* blocks that expose the same device on all sides having connected cabling adjacent to more
|
||||
* than one face.
|
||||
* <p>
|
||||
@@ -39,9 +39,9 @@ import net.minecraft.nbt.CompoundTag;
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @see li.cil.oc2.api.bus.device.rpc.RPCDevice
|
||||
* @see li.cil.oc2.api.bus.device.object.ObjectDevice
|
||||
* @see li.cil.oc2.api.bus.device.vm.VMDevice
|
||||
* @see li.cil.oc2r.api.bus.device.rpc.RPCDevice
|
||||
* @see li.cil.oc2r.api.bus.device.object.ObjectDevice
|
||||
* @see li.cil.oc2r.api.bus.device.vm.VMDevice
|
||||
* @see BlockDeviceQuery
|
||||
*/
|
||||
public interface BlockDeviceProvider {
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.provider;
|
||||
package li.cil.oc2r.api.bus.device.provider;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
@@ -1,10 +1,10 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.provider;
|
||||
package li.cil.oc2r.api.bus.device.provider;
|
||||
|
||||
import li.cil.oc2.api.bus.device.ItemDevice;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2.api.bus.device.vm.VMDevice;
|
||||
import li.cil.oc2r.api.bus.device.ItemDevice;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.vm.VMDevice;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -36,9 +36,9 @@ import java.util.Optional;
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @see li.cil.oc2.api.bus.device.rpc.RPCDevice
|
||||
* @see li.cil.oc2.api.bus.device.object.ObjectDevice
|
||||
* @see li.cil.oc2.api.bus.device.vm.VMDevice
|
||||
* @see li.cil.oc2r.api.bus.device.rpc.RPCDevice
|
||||
* @see li.cil.oc2r.api.bus.device.object.ObjectDevice
|
||||
* @see li.cil.oc2r.api.bus.device.vm.VMDevice
|
||||
* @see ItemDeviceQuery
|
||||
*/
|
||||
public interface ItemDeviceProvider {
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.provider;
|
||||
package li.cil.oc2r.api.bus.device.provider;
|
||||
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2r.api.bus.device.provider;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.rpc;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.rpc;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import li.cil.oc2.api.bus.DeviceBus;
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2.api.bus.device.object.ObjectDevice;
|
||||
import li.cil.oc2r.api.bus.DeviceBus;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.object.ObjectDevice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -47,8 +47,8 @@ import java.util.List;
|
||||
* </pre>
|
||||
*
|
||||
* @see ObjectDevice
|
||||
* @see li.cil.oc2.api.bus.device.provider.BlockDeviceProvider
|
||||
* @see li.cil.oc2.api.bus.device.provider.ItemDeviceProvider
|
||||
* @see li.cil.oc2r.api.bus.device.provider.BlockDeviceProvider
|
||||
* @see li.cil.oc2r.api.bus.device.provider.ItemDeviceProvider
|
||||
*/
|
||||
public interface RPCDevice extends Device {
|
||||
/**
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.rpc;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.rpc;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import li.cil.oc2.api.bus.device.object.ObjectDevice;
|
||||
import li.cil.oc2r.api.bus.device.object.ObjectDevice;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
@@ -17,7 +17,7 @@ import java.util.Set;
|
||||
* <p>
|
||||
* Method parameters are serialized and deserialized using Gson. When using custom
|
||||
* parameter types it may be necessary to register a custom type adapter for them
|
||||
* via {@link li.cil.oc2.api.API#IMC_ADD_RPC_METHOD_PARAMETER_TYPE_ADAPTER}.
|
||||
* via {@link li.cil.oc2r.api.API#IMC_ADD_RPC_METHOD_PARAMETER_TYPE_ADAPTER}.
|
||||
*
|
||||
* @see ObjectDevice
|
||||
*/
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.rpc;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import li.cil.oc2.api.bus.DeviceBusController;
|
||||
import li.cil.oc2r.api.bus.DeviceBusController;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.rpc;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package li.cil.oc2.api.bus.device.data;
|
||||
package li.cil.oc2r.api.bus.device.rpc;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.vm;
|
||||
package li.cil.oc2r.api.bus.device.vm;
|
||||
|
||||
/**
|
||||
* This interface serves as a marker for devices that load firmware.
|
||||
@@ -1,12 +1,12 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.vm;
|
||||
package li.cil.oc2r.api.bus.device.vm;
|
||||
|
||||
import li.cil.oc2.api.bus.DeviceBus;
|
||||
import li.cil.oc2.api.bus.device.Device;
|
||||
import li.cil.oc2.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2.api.bus.device.vm.context.InterruptAllocator;
|
||||
import li.cil.oc2.api.bus.device.vm.context.VMContext;
|
||||
import li.cil.oc2r.api.bus.DeviceBus;
|
||||
import li.cil.oc2r.api.bus.device.Device;
|
||||
import li.cil.oc2r.api.bus.device.rpc.RPCDevice;
|
||||
import li.cil.oc2r.api.bus.device.vm.context.InterruptAllocator;
|
||||
import li.cil.oc2r.api.bus.device.vm.context.VMContext;
|
||||
import li.cil.sedna.api.device.MemoryMappedDevice;
|
||||
|
||||
/**
|
||||
@@ -47,8 +47,8 @@ import li.cil.sedna.api.device.MemoryMappedDevice;
|
||||
* Note that if any other {@link VMDevice} fails mounting, all mounted devices
|
||||
* will immediately unmounted and disposed.
|
||||
*
|
||||
* @see li.cil.oc2.api.bus.device.provider.BlockDeviceProvider
|
||||
* @see li.cil.oc2.api.bus.device.provider.ItemDeviceProvider
|
||||
* @see li.cil.oc2r.api.bus.device.provider.BlockDeviceProvider
|
||||
* @see li.cil.oc2r.api.bus.device.provider.ItemDeviceProvider
|
||||
*/
|
||||
public interface VMDevice extends Device {
|
||||
/**
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.vm;
|
||||
package li.cil.oc2r.api.bus.device.vm;
|
||||
|
||||
import li.cil.oc2.api.bus.device.vm.context.VMContext;
|
||||
import li.cil.oc2r.api.bus.device.vm.context.VMContext;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.vm.context;
|
||||
package li.cil.oc2r.api.bus.device.vm.context;
|
||||
|
||||
import li.cil.oc2.api.bus.device.vm.VMDevice;
|
||||
import li.cil.oc2r.api.bus.device.vm.VMDevice;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.OptionalInt;
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.vm.context;
|
||||
package li.cil.oc2r.api.bus.device.vm.context;
|
||||
|
||||
/**
|
||||
* A memory allocator used to ensure sandbox limits when loading devices.
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
package li.cil.oc2.api.bus.device.vm.context;
|
||||
package li.cil.oc2r.api.bus.device.vm.context;
|
||||
|
||||
import li.cil.oc2.api.bus.device.vm.VMDevice;
|
||||
import li.cil.oc2r.api.bus.device.vm.VMDevice;
|
||||
import li.cil.sedna.api.device.MemoryMappedDevice;
|
||||
|
||||
import java.util.OptionalLong;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user