diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 11a99e5232f..e9511033f9f 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -44,7 +44,7 @@ dependencies { implementation("org.jgrapht:jgrapht-core:1.5.0") // for inspecting modules - implementation("org.terasology.gestalt:gestalt-module:7.2.0") + implementation("org.terasology.gestalt:gestalt-module:8.0.0-SNAPSHOT") // plugins we configure implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.2.3") diff --git a/build-logic/src/main/kotlin/org/terasology/gradology/module_build.kt b/build-logic/src/main/kotlin/org/terasology/gradology/module_build.kt index dde9bb661d2..e1bf77c91a2 100644 --- a/build-logic/src/main/kotlin/org/terasology/gradology/module_build.kt +++ b/build-logic/src/main/kotlin/org/terasology/gradology/module_build.kt @@ -66,8 +66,8 @@ class ModuleMetadataForGradle(private val moduleConfig: ModuleMetadata) { } private fun versionStringFromGestaltDependency(gestaltDependency: DependencyInfo): String { - val version = if (gestaltDependency.versionPredicate() is VersionRange) { - gestaltDependency.versionPredicate().toString() + val version = if (gestaltDependency.versionRange() is VersionRange) { + gestaltDependency.versionRange().toString() } else { // TODO: gradle-compatible version expressions for gestalt dependencies // https://github.com/MovingBlocks/gestalt/issues/114 diff --git a/build-logic/src/main/kotlin/terasology-module.gradle.kts b/build-logic/src/main/kotlin/terasology-module.gradle.kts index e8914c9091e..97617a6c3a1 100644 --- a/build-logic/src/main/kotlin/terasology-module.gradle.kts +++ b/build-logic/src/main/kotlin/terasology-module.gradle.kts @@ -54,6 +54,8 @@ dependencies { implementation(group = "org.terasology.engine", name = "engine", version = moduleMetadata.engineVersion()) testImplementation(group = "org.terasology.engine", name = "engine-tests", version = moduleMetadata.engineVersion()) + annotationProcessor("org.terasology.gestalt:gestalt-inject-java:8.0.0-SNAPSHOT") + for ((gradleDep, optional) in moduleMetadata.moduleDependencies()) { if (optional) { // `optional` module dependencies are ones it does not require for runtime @@ -144,8 +146,17 @@ tasks.named("processResources") { dependsOn("syncAssets", "syncOverrides", "syncDeltas", "syncModuleInfo") } -tasks.named("compileJava") { +tasks.named("compileJava") { + dependsOn("processResources") + // Create an asset list during compilation (needed for Gestalt 8) + inputs.files(sourceSets.main.get().resources.srcDirs) + options.compilerArgs = arrayListOf("-Aresource=${sourceSets.main.get().resources.srcDirs.joinToString(File.pathSeparator)}") +} +tasks.named("compileTestJava") { dependsOn("processResources") + // Create an asset list during compilation (needed for Gestalt 8) + inputs.files(sourceSets.test.get().resources.srcDirs) + options.compilerArgs = arrayListOf("-Aresource=${sourceSets.test.get().resources.srcDirs.joinToString(File.pathSeparator)}") } tasks.named("test") { diff --git a/engine-tests/build.gradle.kts b/engine-tests/build.gradle.kts index ce70c31ce6e..5ebee183d8c 100644 --- a/engine-tests/build.gradle.kts +++ b/engine-tests/build.gradle.kts @@ -56,6 +56,11 @@ dependencies { implementation("com.google.protobuf:protobuf-java:3.16.1") implementation("org.terasology:reflections:0.9.12-MB") + implementation("com.github.zafarkhaja:java-semver:0.10.2") + + annotationProcessor("org.terasology.gestalt:gestalt-inject-java:8.0.0-SNAPSHOT") + testAnnotationProcessor("org.terasology.gestalt:gestalt-inject-java:8.0.0-SNAPSHOT") + implementation("org.terasology.joml-ext:joml-test:0.1.0") testImplementation("ch.qos.logback:logback-classic:1.4.14") { @@ -91,8 +96,17 @@ tasks.register("copyResourcesToClasses") { into(sourceSets["main"].output.classesDirs.first()) } -tasks.named("compileJava") { +tasks.named("compileJava") { + dependsOn("copyResourcesToClasses") + // Create an asset list during compilation (needed for Gestalt 8) + inputs.files(sourceSets.main.get().resources.srcDirs) + options.compilerArgs = arrayListOf("-Aresource=${sourceSets.main.get().resources.srcDirs.joinToString(File.pathSeparator)}") +} +tasks.named("compileTestJava") { dependsOn("copyResourcesToClasses") + // Create an asset list during compilation (needed for Gestalt 8) + inputs.files(sourceSets.test.get().resources.srcDirs) + options.compilerArgs = arrayListOf("-Aresource=${sourceSets.test.get().resources.srcDirs.joinToString(File.pathSeparator)}") } tasks.withType { diff --git a/engine-tests/src/main/java/org/terasology/unittest/ExampleClass.java b/engine-tests/src/main/java/org/terasology/unittest/ExampleClass.java index a1421dc1626..20a50b9b8dc 100644 --- a/engine-tests/src/main/java/org/terasology/unittest/ExampleClass.java +++ b/engine-tests/src/main/java/org/terasology/unittest/ExampleClass.java @@ -3,7 +3,7 @@ package org.terasology.unittest; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public class ExampleClass implements ExampleInterface { diff --git a/engine-tests/src/main/java/org/terasology/unittest/ExampleInterface.java b/engine-tests/src/main/java/org/terasology/unittest/ExampleInterface.java index 64c7872f905..6c7f56d6b29 100644 --- a/engine-tests/src/main/java/org/terasology/unittest/ExampleInterface.java +++ b/engine-tests/src/main/java/org/terasology/unittest/ExampleInterface.java @@ -3,8 +3,10 @@ package org.terasology.unittest; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; +import org.terasology.context.annotation.IndexInherited; @API +@IndexInherited public interface ExampleInterface { } diff --git a/engine-tests/src/main/java/org/terasology/unittest/stubs/package-info.java b/engine-tests/src/main/java/org/terasology/unittest/stubs/package-info.java index dd313465fa0..7bae2a8971f 100644 --- a/engine-tests/src/main/java/org/terasology/unittest/stubs/package-info.java +++ b/engine-tests/src/main/java/org/terasology/unittest/stubs/package-info.java @@ -4,4 +4,4 @@ @API package org.terasology.unittest.stubs; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine-tests/src/main/java/org/terasology/unittest/worlds/package-info.java b/engine-tests/src/main/java/org/terasology/unittest/worlds/package-info.java index e873f40faf7..c425926616f 100644 --- a/engine-tests/src/main/java/org/terasology/unittest/worlds/package-info.java +++ b/engine-tests/src/main/java/org/terasology/unittest/worlds/package-info.java @@ -4,4 +4,4 @@ @API package org.terasology.unittest.worlds; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java b/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java index 85bd2e74f43..df8c071036f 100644 --- a/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java +++ b/engine-tests/src/test/java/org/terasology/documentation/ApiScraper.java @@ -10,7 +10,7 @@ import org.terasology.engine.core.module.ModuleManager; import org.terasology.engine.testUtil.ModuleManagerFactory; import org.terasology.gestalt.module.ModuleEnvironment; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.net.URL; import java.util.HashMap; diff --git a/engine-tests/src/test/java/org/terasology/documentation/apiScraper/CompleteApiScraper.java b/engine-tests/src/test/java/org/terasology/documentation/apiScraper/CompleteApiScraper.java index c2aea8f6267..0ad8412a59e 100644 --- a/engine-tests/src/test/java/org/terasology/documentation/apiScraper/CompleteApiScraper.java +++ b/engine-tests/src/test/java/org/terasology/documentation/apiScraper/CompleteApiScraper.java @@ -10,7 +10,7 @@ import org.terasology.engine.core.module.ModuleManager; import org.terasology.engine.testUtil.ModuleManagerFactory; import org.terasology.gestalt.module.ModuleEnvironment; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.lang.reflect.Constructor; import java.lang.reflect.Method; diff --git a/engine-tests/src/test/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactoryTest.java b/engine-tests/src/test/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactoryTest.java index 5e9bfaf5303..dab58d04024 100644 --- a/engine-tests/src/test/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactoryTest.java +++ b/engine-tests/src/test/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactoryTest.java @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test; import org.terasology.gestalt.module.Module; import org.terasology.gestalt.module.ModuleMetadata; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import org.terasology.gestalt.naming.Version; import org.terasology.unittest.ExampleClass; @@ -56,9 +56,13 @@ public void directoryModuleContainsClass() { public void archiveModuleContainsClass() throws IOException { Module module = factory.createArchiveModule(new File("FIXME.jar")); - Class someClassInTheModule = module.getModuleManifest().getTypesAnnotatedWith(API.class).iterator().next(); + String someClassInTheModule = module.getClassIndex().getTypesAnnotatedWith(API.class.getName()).iterator().next(); - assertTrue(module.getClassPredicate().test(someClassInTheModule)); + try { + assertTrue(module.getClassPredicate().test(Class.forName(someClassInTheModule))); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } assertFalse(module.getClassPredicate().test(SOME_CLASS_OUTSIDE_THE_MODULE)); } diff --git a/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleDownloadListGeneratorTest.java b/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleDownloadListGeneratorTest.java index 82b93db423a..f0a49537613 100644 --- a/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleDownloadListGeneratorTest.java +++ b/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleDownloadListGeneratorTest.java @@ -4,8 +4,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.reflections.Reflections; import org.terasology.engine.core.TerasologyConstants; +import org.terasology.gestalt.di.index.CompoundClassIndex; import org.terasology.gestalt.module.Module; import org.terasology.gestalt.module.ModuleMetadata; import org.terasology.gestalt.module.ModuleRegistry; @@ -86,7 +86,7 @@ private Module buildSimpleModule(String id, String version) { if (version != null) { metadata.setVersion(new Version(version)); } - return new Module(metadata, new EmptyFileSource(), Collections.emptyList(), new Reflections(), (c) -> false); + return new Module(metadata, new EmptyFileSource(), Collections.emptyList(), new CompoundClassIndex(), (c) -> false); } private Module buildEngineModule(String version) { return buildSimpleModule(TerasologyConstants.ENGINE_MODULE.toString(), version); diff --git a/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleManagerTest.java b/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleManagerTest.java index 63d9eda83e0..332bd625e9c 100644 --- a/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleManagerTest.java +++ b/engine-tests/src/test/java/org/terasology/engine/core/module/ModuleManagerTest.java @@ -9,13 +9,13 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import org.mockito.junit.jupiter.MockitoExtension; -import org.reflections.Reflections; import org.terasology.engine.config.flexible.AutoConfig; import org.terasology.engine.core.PathManager; import org.terasology.engine.core.PathManagerProvider; import org.terasology.engine.core.subsystem.EngineSubsystem; import org.terasology.engine.logic.permission.PermissionSetComponent; import org.terasology.engine.world.block.structure.AttachSupportRequiredComponent; +import org.terasology.gestalt.di.index.CompoundClassIndex; import org.terasology.gestalt.module.Module; import org.terasology.gestalt.module.ModuleEnvironment; import org.terasology.gestalt.module.ModuleMetadata; @@ -59,7 +59,7 @@ private Module getEmptyTestModule() { new ModuleMetadata(new Name("EmptyTestModule"), new Version("0.0.1")), new EmptyFileSource(), Collections.emptyList(), - new Reflections(), + new CompoundClassIndex(), (clazz) -> false ); } @@ -127,7 +127,7 @@ public void engineModuleContainsSubsystems() { environment = manager.getEnvironment(); engineModule = environment.get(ENGINE_MODULE); - assertThat(engineModule.getModuleManifest().getSubTypesOf(EngineSubsystem.class)).contains(subsystem); + assertThat(engineModule.getClassIndex().getSubtypesOf(EngineSubsystem.class.getName())).contains(subsystem.getName()); assertThat(environment.getSubtypesOf(EngineSubsystem.class)).contains(subsystem); diff --git a/engine-tests/src/test/java/org/terasology/engine/persistence/serializers/TypeSerializerTest.java b/engine-tests/src/test/java/org/terasology/engine/persistence/serializers/TypeSerializerTest.java index d90edcd0ab2..35fab36fb3b 100644 --- a/engine-tests/src/test/java/org/terasology/engine/persistence/serializers/TypeSerializerTest.java +++ b/engine-tests/src/test/java/org/terasology/engine/persistence/serializers/TypeSerializerTest.java @@ -7,6 +7,7 @@ import com.google.gson.Gson; import org.joml.Vector3f; import org.junit.jupiter.api.Test; +import org.terasology.context.annotation.IndexInherited; import org.terasology.engine.ModuleEnvironmentTest; import org.terasology.engine.core.TerasologyConstants; import org.terasology.engine.core.module.ModuleContext; @@ -31,7 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.terasology.engine.testUtil.Assertions.assertNotEmpty; -class TypeSerializerTest extends ModuleEnvironmentTest { +public class TypeSerializerTest extends ModuleEnvironmentTest { private static final SomeClass INSTANCE = new SomeClass<>(0xdeadbeef); private static final String INSTANCE_JSON = "{\"generic-t\":-559038737,\"list\":[50,51,-52,-53]," + "\"animals\":[{\"class\":\"org.terasology.engine.persistence.serializers.TypeSerializerTest$Dog\"," + @@ -155,6 +156,7 @@ public String toString() { } @SuppressWarnings("checkstyle:FinalClass") + @IndexInherited public static class Animal { public T data; @@ -178,6 +180,11 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(data); } + + @Override + public String toString() { + return "Animal(data = " + data.toString() + ")"; + } } public static final class Dog extends Animal { diff --git a/engine/build.gradle.kts b/engine/build.gradle.kts index 6891217379c..6a5a1d923c2 100644 --- a/engine/build.gradle.kts +++ b/engine/build.gradle.kts @@ -120,19 +120,25 @@ dependencies { } implementation("net.logstash.logback:logstash-logback-encoder:7.4") + // JSemVer (Semantic Versioning) - A dependency of Gestalt + implementation("com.github.zafarkhaja:java-semver:0.10.2") + // Our developed libs - api("org.terasology.gestalt:gestalt-asset-core:7.2.1-SNAPSHOT") - api("org.terasology.gestalt:gestalt-module:7.2.1-SNAPSHOT") - api("org.terasology.gestalt:gestalt-entity-system:7.2.1-SNAPSHOT") - api("org.terasology.gestalt:gestalt-util:7.2.1-SNAPSHOT") + api("org.terasology.gestalt:gestalt-asset-core:8.0.0-SNAPSHOT") + api("org.terasology.gestalt:gestalt-module:8.0.0-SNAPSHOT") + api("org.terasology.gestalt:gestalt-entity-system:8.0.0-SNAPSHOT") + api("org.terasology.gestalt:gestalt-util:8.0.0-SNAPSHOT") + api("org.terasology.gestalt:gestalt-inject:8.0.0-SNAPSHOT") + + annotationProcessor("org.terasology.gestalt:gestalt-inject-java:8.0.0-SNAPSHOT") api("org.terasology:TeraMath:1.5.0") api("org.terasology:splash-screen:1.1.1") api("org.terasology.jnlua:JNLua:0.1.0-SNAPSHOT") api("org.terasology.jnbullet:JNBullet:1.0.4") - api("org.terasology.nui:nui:3.0.0") - api("org.terasology.nui:nui-reflect:3.0.0") - api("org.terasology.nui:nui-gestalt7:3.0.0") + api("org.terasology.nui:nui:4.0.0-SNAPSHOT") + api("org.terasology.nui:nui-reflect:4.0.0-SNAPSHOT") + api("org.terasology.nui:nui-gestalt:4.0.0-SNAPSHOT") // Wildcard dependency to catch any libs provided with the project (remote repo preferred instead) @@ -206,11 +212,23 @@ tasks.register("copyResourcesToClasses") { into(sourceSets["main"].output.classesDirs.first()) } -tasks.named("compileJava") { +tasks.named("compileJava") { + dependsOn( + tasks.named("copyResourcesToClasses"), + tasks.named("createVersionInfoFile") + ) + // Create an asset list during compilation (needed for Gestalt 8) + inputs.files(sourceSets.main.get().resources.srcDirs) + options.compilerArgs = arrayListOf("-Aresource=${sourceSets.main.get().resources.srcDirs.joinToString(File.pathSeparator)}") +} +tasks.named("compileTestJava") { dependsOn( tasks.named("copyResourcesToClasses"), tasks.named("createVersionInfoFile") ) + // Create an asset list during compilation (needed for Gestalt 8) + inputs.files(sourceSets.test.get().resources.srcDirs) + options.compilerArgs = arrayListOf("-Aresource=${sourceSets.test.get().resources.srcDirs.joinToString(File.pathSeparator)}") } // Instructions for packaging a jar file for the engine diff --git a/engine/src/main/java/org/terasology/engine/audio/Sound.java b/engine/src/main/java/org/terasology/engine/audio/Sound.java index f70131f6c9f..10d264ce84c 100644 --- a/engine/src/main/java/org/terasology/engine/audio/Sound.java +++ b/engine/src/main/java/org/terasology/engine/audio/Sound.java @@ -22,7 +22,8 @@ public abstract class Sound extends Asset implements org * @param assetType The asset type this asset belongs to. */ protected Sound(ResourceUrn urn, AssetType assetType, DisposableResource resource) { - super(urn, assetType, resource); + super(urn, assetType); + setDisposableResource(resource); } /** diff --git a/engine/src/main/java/org/terasology/engine/audio/events/package-info.java b/engine/src/main/java/org/terasology/engine/audio/events/package-info.java index bd39880a610..0f9f560c3ee 100644 --- a/engine/src/main/java/org/terasology/engine/audio/events/package-info.java +++ b/engine/src/main/java/org/terasology/engine/audio/events/package-info.java @@ -17,4 +17,4 @@ */ @API package org.terasology.engine.audio.events; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/audio/package-info.java b/engine/src/main/java/org/terasology/engine/audio/package-info.java index 72dd39cde59..3dcef0521c6 100644 --- a/engine/src/main/java/org/terasology/engine/audio/package-info.java +++ b/engine/src/main/java/org/terasology/engine/audio/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.audio; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/config/Config.java b/engine/src/main/java/org/terasology/engine/config/Config.java index f5999dbce6b..8ac7b8479e1 100644 --- a/engine/src/main/java/org/terasology/engine/config/Config.java +++ b/engine/src/main/java/org/terasology/engine/config/Config.java @@ -23,7 +23,7 @@ import org.terasology.engine.utilities.gson.SetMultimapTypeAdapter; import org.terasology.engine.utilities.gson.UriTypeAdapterFactory; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import org.terasology.gestalt.naming.Version; import org.terasology.gestalt.naming.gson.NameTypeAdapter; diff --git a/engine/src/main/java/org/terasology/engine/config/RenderingConfig.java b/engine/src/main/java/org/terasology/engine/config/RenderingConfig.java index be66d555293..b9748a08e0c 100644 --- a/engine/src/main/java/org/terasology/engine/config/RenderingConfig.java +++ b/engine/src/main/java/org/terasology/engine/config/RenderingConfig.java @@ -4,7 +4,7 @@ package org.terasology.engine.config; import org.terasology.engine.core.subsystem.Resolution; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.rendering.cameras.PerspectiveCameraSettings; import org.terasology.engine.rendering.nui.layers.mainMenu.videoSettings.DisplayModeSetting; import org.terasology.engine.rendering.nui.layers.mainMenu.videoSettings.ScreenshotSize; diff --git a/engine/src/main/java/org/terasology/engine/config/RenderingDebugConfig.java b/engine/src/main/java/org/terasology/engine/config/RenderingDebugConfig.java index 8d1f90a0625..c9666dc7a98 100644 --- a/engine/src/main/java/org/terasology/engine/config/RenderingDebugConfig.java +++ b/engine/src/main/java/org/terasology/engine/config/RenderingDebugConfig.java @@ -5,7 +5,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.terasology.engine.utilities.subscribables.AbstractSubscribable; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; diff --git a/engine/src/main/java/org/terasology/engine/config/facade/TelemetryConfiguration.java b/engine/src/main/java/org/terasology/engine/config/facade/TelemetryConfiguration.java index 9ef110e428b..37a95462ea6 100644 --- a/engine/src/main/java/org/terasology/engine/config/facade/TelemetryConfiguration.java +++ b/engine/src/main/java/org/terasology/engine/config/facade/TelemetryConfiguration.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.config.facade; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * TelemetryConfiguration is a wrapper for {@link org.terasology.engine.config.TelemetryConfig}. diff --git a/engine/src/main/java/org/terasology/engine/config/flexible/AutoConfig.java b/engine/src/main/java/org/terasology/engine/config/flexible/AutoConfig.java index 0e5453bbddc..04d5ce1d1c8 100644 --- a/engine/src/main/java/org/terasology/engine/config/flexible/AutoConfig.java +++ b/engine/src/main/java/org/terasology/engine/config/flexible/AutoConfig.java @@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList; import org.reflections.ReflectionUtils; +import org.terasology.context.annotation.IndexInherited; import org.terasology.engine.config.flexible.internal.SettingBuilder; import org.terasology.engine.config.flexible.internal.SettingImplBuilder; import org.terasology.engine.core.SimpleUri; @@ -18,6 +19,7 @@ * Represents a config class that will be automatically initialized and rendered by the engine. * All settings must be contained in {@code public static} fields of type {@link Setting}. */ +@IndexInherited public abstract class AutoConfig { private SimpleUri id; diff --git a/engine/src/main/java/org/terasology/engine/config/flexible/Setting.java b/engine/src/main/java/org/terasology/engine/config/flexible/Setting.java index fb39574aeae..14cc87675b7 100644 --- a/engine/src/main/java/org/terasology/engine/config/flexible/Setting.java +++ b/engine/src/main/java/org/terasology/engine/config/flexible/Setting.java @@ -3,7 +3,7 @@ package org.terasology.engine.config.flexible; import org.terasology.engine.config.flexible.constraints.SettingConstraint; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.reflection.TypeInfo; /** diff --git a/engine/src/main/java/org/terasology/engine/config/flexible/constraints/package-info.java b/engine/src/main/java/org/terasology/engine/config/flexible/constraints/package-info.java index c35bffb928c..bf7d2631bea 100644 --- a/engine/src/main/java/org/terasology/engine/config/flexible/constraints/package-info.java +++ b/engine/src/main/java/org/terasology/engine/config/flexible/constraints/package-info.java @@ -2,4 +2,4 @@ // SPDX-License-Identifier: Apache-2.0 @API package org.terasology.engine.config.flexible.constraints; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/config/flexible/ui/ConstraintWidgetFactory.java b/engine/src/main/java/org/terasology/engine/config/flexible/ui/ConstraintWidgetFactory.java index 829d48ec151..f0a6dc6d718 100644 --- a/engine/src/main/java/org/terasology/engine/config/flexible/ui/ConstraintWidgetFactory.java +++ b/engine/src/main/java/org/terasology/engine/config/flexible/ui/ConstraintWidgetFactory.java @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.config.flexible.ui; +import org.terasology.context.annotation.IndexInherited; import org.terasology.engine.config.flexible.Setting; import org.terasology.engine.config.flexible.constraints.SettingConstraint; import org.terasology.nui.UIWidget; @@ -17,6 +18,7 @@ * @param type of setting * @param concrete type of {@link SettingConstraint} */ +@IndexInherited public abstract class ConstraintWidgetFactory> { private Setting setting; diff --git a/engine/src/main/java/org/terasology/engine/context/Context.java b/engine/src/main/java/org/terasology/engine/context/Context.java index 47e4391a162..275ec659c66 100644 --- a/engine/src/main/java/org/terasology/engine/context/Context.java +++ b/engine/src/main/java/org/terasology/engine/context/Context.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.context; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.NoSuchElementException; import java.util.Optional; diff --git a/engine/src/main/java/org/terasology/engine/core/ComponentFieldUri.java b/engine/src/main/java/org/terasology/engine/core/ComponentFieldUri.java index 98ac34e66ce..6509be0066e 100644 --- a/engine/src/main/java/org/terasology/engine/core/ComponentFieldUri.java +++ b/engine/src/main/java/org/terasology/engine/core/ComponentFieldUri.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import java.util.Objects; diff --git a/engine/src/main/java/org/terasology/engine/core/ComponentSystemManager.java b/engine/src/main/java/org/terasology/engine/core/ComponentSystemManager.java index c7faff9ee5c..603950a5dd2 100644 --- a/engine/src/main/java/org/terasology/engine/core/ComponentSystemManager.java +++ b/engine/src/main/java/org/terasology/engine/core/ComponentSystemManager.java @@ -21,7 +21,7 @@ import org.terasology.engine.registry.InjectionHelper; import org.terasology.gestalt.module.Module; import org.terasology.gestalt.module.ModuleEnvironment; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/core/GameScheduler.java b/engine/src/main/java/org/terasology/engine/core/GameScheduler.java index 607a5149b07..a2fc0d533e7 100644 --- a/engine/src/main/java/org/terasology/engine/core/GameScheduler.java +++ b/engine/src/main/java/org/terasology/engine/core/GameScheduler.java @@ -5,7 +5,7 @@ import org.terasology.engine.monitoring.ThreadActivity; import org.terasology.engine.monitoring.ThreadMonitor; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import reactor.core.Disposable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/engine/src/main/java/org/terasology/engine/core/Observer.java b/engine/src/main/java/org/terasology/engine/core/Observer.java index 21aff61dd48..31412f133aa 100644 --- a/engine/src/main/java/org/terasology/engine/core/Observer.java +++ b/engine/src/main/java/org/terasology/engine/core/Observer.java @@ -3,7 +3,7 @@ package org.terasology.engine.core; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * A general interface for observers diff --git a/engine/src/main/java/org/terasology/engine/core/SimpleUri.java b/engine/src/main/java/org/terasology/engine/core/SimpleUri.java index 2179bb550e1..94c3bb59211 100644 --- a/engine/src/main/java/org/terasology/engine/core/SimpleUri.java +++ b/engine/src/main/java/org/terasology/engine/core/SimpleUri.java @@ -4,7 +4,7 @@ import com.google.common.base.Objects; import com.google.common.base.Preconditions; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; /** diff --git a/engine/src/main/java/org/terasology/engine/core/TerasologyEngine.java b/engine/src/main/java/org/terasology/engine/core/TerasologyEngine.java index d3852f083ce..9b704e6ffb7 100644 --- a/engine/src/main/java/org/terasology/engine/core/TerasologyEngine.java +++ b/engine/src/main/java/org/terasology/engine/core/TerasologyEngine.java @@ -487,7 +487,12 @@ public boolean tick() { } if (assetTypeManager instanceof AutoReloadAssetTypeManager) { - ((AutoReloadAssetTypeManager) assetTypeManager).reloadChangedAssets(); + try { + ((AutoReloadAssetTypeManager) assetTypeManager).reloadChangedAssets(); + } catch (IllegalStateException ignore) { + // ignore: This can happen if a module environment switch is happening in a different thread. + return true; + } } processPendingState(); diff --git a/engine/src/main/java/org/terasology/engine/core/Time.java b/engine/src/main/java/org/terasology/engine/core/Time.java index 229492359cd..4ced3575730 100644 --- a/engine/src/main/java/org/terasology/engine/core/Time.java +++ b/engine/src/main/java/org/terasology/engine/core/Time.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * The timer manages all time in the game. diff --git a/engine/src/main/java/org/terasology/engine/core/Uri.java b/engine/src/main/java/org/terasology/engine/core/Uri.java index ff2b9c5e071..05a12cd79cb 100644 --- a/engine/src/main/java/org/terasology/engine/core/Uri.java +++ b/engine/src/main/java/org/terasology/engine/core/Uri.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; /** diff --git a/engine/src/main/java/org/terasology/engine/core/bootstrap/ClassMetaLibrary.java b/engine/src/main/java/org/terasology/engine/core/bootstrap/ClassMetaLibrary.java index 8d8a904c6f2..8e878ff9bcc 100644 --- a/engine/src/main/java/org/terasology/engine/core/bootstrap/ClassMetaLibrary.java +++ b/engine/src/main/java/org/terasology/engine/core/bootstrap/ClassMetaLibrary.java @@ -3,7 +3,7 @@ package org.terasology.engine.core.bootstrap; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import java.lang.annotation.Annotation; diff --git a/engine/src/main/java/org/terasology/engine/core/modes/loadProcesses/AwaitedLocalCharacterSpawnEvent.java b/engine/src/main/java/org/terasology/engine/core/modes/loadProcesses/AwaitedLocalCharacterSpawnEvent.java index 68b80c024ba..a5dc4292488 100644 --- a/engine/src/main/java/org/terasology/engine/core/modes/loadProcesses/AwaitedLocalCharacterSpawnEvent.java +++ b/engine/src/main/java/org/terasology/engine/core/modes/loadProcesses/AwaitedLocalCharacterSpawnEvent.java @@ -4,7 +4,7 @@ import org.terasology.engine.entitySystem.systems.BaseComponentSystem; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Event which is triggered when LocalPlayer is setup with a character entity. Allows for detection of when LocalPlayer is diff --git a/engine/src/main/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactory.java b/engine/src/main/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactory.java index a84c5501429..fb87059e863 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactory.java +++ b/engine/src/main/java/org/terasology/engine/core/module/ClasspathCompromisingModuleFactory.java @@ -50,7 +50,7 @@ public Module createDirectoryModule(ModuleMetadata metadata, File directory) { Module module = super.createDirectoryModule(metadata, directory); return new Module( module.getMetadata(), module.getResources(), - module.getClasspaths(), module.getModuleManifest(), + module.getClasspaths(), module.getClassIndex(), new ClassesInModule(module)); } @@ -59,7 +59,7 @@ public Module createArchiveModule(ModuleMetadata metadata, File archive) throws Module module = super.createArchiveModule(metadata, archive); return new Module( module.getMetadata(), module.getResources(), - module.getClasspaths(), module.getModuleManifest(), + module.getClasspaths(), module.getClassIndex(), new ClassesInModule(module)); } @@ -158,7 +158,6 @@ private static Path fromUrl(URL url) { static class ClassesInModule implements Predicate> { private final Set classpaths; - private final ClassLoader[] classLoaders; private final String name; ClassesInModule(Module module) { @@ -174,13 +173,12 @@ static class ClassesInModule implements Predicate> { throw new RuntimeException(e); } }).collect(ImmutableSet.toImmutableSet()); - classLoaders = module.getModuleManifest().getConfiguration().getClassLoaders(); name = module.getId().toString(); } @Override public boolean test(Class aClass) { - URL classUrl = ClasspathHelper.forClass(aClass, classLoaders); + URL classUrl = ClasspathHelper.forClass(aClass); return classpaths.contains(classUrl); } diff --git a/engine/src/main/java/org/terasology/engine/core/module/ModuleInputStream.java b/engine/src/main/java/org/terasology/engine/core/module/ModuleInputStream.java index 7533f921f3e..13e1fbdc3a2 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/ModuleInputStream.java +++ b/engine/src/main/java/org/terasology/engine/core/module/ModuleInputStream.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core.module; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.io.IOException; import java.io.InputStream; diff --git a/engine/src/main/java/org/terasology/engine/core/module/ModuleListDownloader.java b/engine/src/main/java/org/terasology/engine/core/module/ModuleListDownloader.java index e5bcce91c70..8a5c9e057cb 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/ModuleListDownloader.java +++ b/engine/src/main/java/org/terasology/engine/core/module/ModuleListDownloader.java @@ -6,10 +6,10 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import org.reflections.Reflections; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.terasology.engine.core.TerasologyConstants; +import org.terasology.gestalt.di.index.CompoundClassIndex; import org.terasology.gestalt.module.Module; import org.terasology.gestalt.module.ModuleMetadata; import org.terasology.gestalt.module.ModuleMetadataJsonAdapter; @@ -60,7 +60,7 @@ public ModuleRegistry call() throws IOException { ModuleMetadata meta = metaReader.read(new StringReader(json)); logger.debug("Read module {} - {}", meta.getId(), meta.getVersion()); //NOPMD - modules.add(new Module(meta, new EmptyFileSource(), Collections.emptyList(), new Reflections(), + modules.add(new Module(meta, new EmptyFileSource(), Collections.emptyList(), new CompoundClassIndex(), (c) -> false)); } diff --git a/engine/src/main/java/org/terasology/engine/core/module/ModuleManager.java b/engine/src/main/java/org/terasology/engine/core/module/ModuleManager.java index 77d0dc23593..997d5382453 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/ModuleManager.java +++ b/engine/src/main/java/org/terasology/engine/core/module/ModuleManager.java @@ -15,6 +15,9 @@ import org.terasology.engine.core.PathManager; import org.terasology.engine.core.TerasologyConstants; import org.terasology.engine.utilities.Jvm; +import org.terasology.gestalt.di.DefaultBeanContext; +import org.terasology.gestalt.di.index.CompoundClassIndex; +import org.terasology.gestalt.di.index.UrlClassIndex; import org.terasology.gestalt.module.Module; import org.terasology.gestalt.module.ModuleEnvironment; import org.terasology.gestalt.module.ModuleFactory; @@ -198,7 +201,10 @@ static Module loadAndConfigureEngineModule(ModuleFactory moduleFactory, List classPaths = new HashSet<>(packageModule.getClasspaths()); @@ -206,6 +212,7 @@ static Module loadAndConfigureEngineModule(ModuleFactory moduleFactory, List packageModule.getClassPredicate().test(clazz) || config.getUrls().contains(ClasspathHelper.forClass(clazz)) @@ -253,7 +260,9 @@ private void setupSandbox() { ExternalApiWhitelist.PACKAGES.forEach(permissionSet::addAPIPackage); APIScanner apiScanner = new APIScanner(permissionProviderFactory); - registry.stream().map(Module::getModuleManifest).forEach(apiScanner::scan); + for (Module module : registry) { + apiScanner.scan(module.getClassIndex()); + } permissionSet.grantPermission("com.google.gson", ReflectPermission.class); permissionSet.grantPermission("com.google.gson.internal", ReflectPermission.class); @@ -366,9 +375,9 @@ public ModuleEnvironment loadEnvironment(Set modules, boolean asPrimary) ModuleEnvironment newEnvironment; boolean permissiveSecurityEnabled = Boolean.parseBoolean(System.getProperty(SystemConfig.PERMISSIVE_SECURITY_ENABLED_PROPERTY)); if (permissiveSecurityEnabled) { - newEnvironment = new ModuleEnvironment(finalModules, wrappingPermissionProviderFactory); + newEnvironment = new ModuleEnvironment(new DefaultBeanContext(), finalModules, wrappingPermissionProviderFactory); } else { - newEnvironment = new ModuleEnvironment(finalModules, permissionProviderFactory); + newEnvironment = new ModuleEnvironment(new DefaultBeanContext(), finalModules, permissionProviderFactory); } if (asPrimary) { environment = newEnvironment; diff --git a/engine/src/main/java/org/terasology/engine/core/module/ModuleOutputStream.java b/engine/src/main/java/org/terasology/engine/core/module/ModuleOutputStream.java index 3667eb24386..924c93a4a0b 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/ModuleOutputStream.java +++ b/engine/src/main/java/org/terasology/engine/core/module/ModuleOutputStream.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core.module; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.io.IOException; import java.io.OutputStream; diff --git a/engine/src/main/java/org/terasology/engine/core/module/SandboxFileManager.java b/engine/src/main/java/org/terasology/engine/core/module/SandboxFileManager.java index 5ca0bf8acd3..d2669c04b61 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/SandboxFileManager.java +++ b/engine/src/main/java/org/terasology/engine/core/module/SandboxFileManager.java @@ -5,7 +5,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.terasology.engine.core.PathManager; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/engine/src/main/java/org/terasology/engine/core/module/rendering/RenderingModuleRegistry.java b/engine/src/main/java/org/terasology/engine/core/module/rendering/RenderingModuleRegistry.java index c5bffcddc51..8400c0110dc 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/rendering/RenderingModuleRegistry.java +++ b/engine/src/main/java/org/terasology/engine/core/module/rendering/RenderingModuleRegistry.java @@ -5,7 +5,7 @@ import org.terasology.engine.context.Context; import org.terasology.engine.rendering.dag.ModuleRendering; import org.terasology.gestalt.module.ModuleEnvironment; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import javax.annotation.Nullable; diff --git a/engine/src/main/java/org/terasology/engine/core/module/rendering/package-info.java b/engine/src/main/java/org/terasology/engine/core/module/rendering/package-info.java index 97bb7303e97..6ea48b9914b 100644 --- a/engine/src/main/java/org/terasology/engine/core/module/rendering/package-info.java +++ b/engine/src/main/java/org/terasology/engine/core/module/rendering/package-info.java @@ -4,4 +4,4 @@ @API package org.terasology.engine.core.module.rendering; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/core/subsystem/DisplayDevice.java b/engine/src/main/java/org/terasology/engine/core/subsystem/DisplayDevice.java index 26c2c659838..a5ab02fd633 100644 --- a/engine/src/main/java/org/terasology/engine/core/subsystem/DisplayDevice.java +++ b/engine/src/main/java/org/terasology/engine/core/subsystem/DisplayDevice.java @@ -4,7 +4,7 @@ import org.terasology.engine.rendering.nui.layers.mainMenu.videoSettings.DisplayModeSetting; import org.terasology.engine.utilities.subscribables.Subscribable; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/core/subsystem/EngineSubsystem.java b/engine/src/main/java/org/terasology/engine/core/subsystem/EngineSubsystem.java index d4e1c494551..91353ade9d2 100644 --- a/engine/src/main/java/org/terasology/engine/core/subsystem/EngineSubsystem.java +++ b/engine/src/main/java/org/terasology/engine/core/subsystem/EngineSubsystem.java @@ -2,12 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core.subsystem; +import org.terasology.context.annotation.IndexInherited; import org.terasology.engine.context.Context; import org.terasology.engine.core.ComponentSystemManager; import org.terasology.engine.core.GameEngine; import org.terasology.engine.core.modes.GameState; import org.terasology.gestalt.assets.module.ModuleAwareAssetTypeManager; +@IndexInherited public interface EngineSubsystem { /** diff --git a/engine/src/main/java/org/terasology/engine/core/subsystem/common/hibernation/HibernationManager.java b/engine/src/main/java/org/terasology/engine/core/subsystem/common/hibernation/HibernationManager.java index fc6909ecffb..47e36186f9e 100644 --- a/engine/src/main/java/org/terasology/engine/core/subsystem/common/hibernation/HibernationManager.java +++ b/engine/src/main/java/org/terasology/engine/core/subsystem/common/hibernation/HibernationManager.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.core.subsystem.common.hibernation; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/entity/internal/EntityScope.java b/engine/src/main/java/org/terasology/engine/entitySystem/entity/internal/EntityScope.java index e723c2a0e3f..ea16f5fd944 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/entity/internal/EntityScope.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/entity/internal/EntityScope.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.entitySystem.entity.internal; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public enum EntityScope { diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/entity/lifecycleEvents/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/entity/lifecycleEvents/package-info.java index a922e5f8635..946cdd1e000 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/entity/lifecycleEvents/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/entity/lifecycleEvents/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.entitySystem.entity.lifecycleEvents; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/entity/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/entity/package-info.java index b46b310f368..b7fe3740321 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/entity/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/entity/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.entitySystem.entity; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/event/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/event/package-info.java index f8aeba57dca..c644d2a12f0 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/event/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/event/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.entitySystem.event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/metadata/ComponentLibrary.java b/engine/src/main/java/org/terasology/engine/entitySystem/metadata/ComponentLibrary.java index 4dad928a94a..2dcfafef3c0 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/metadata/ComponentLibrary.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/metadata/ComponentLibrary.java @@ -24,7 +24,7 @@ public class ComponentLibrary extends ModuleClassLibrary { private static final Logger logger = LoggerFactory.getLogger(ComponentLibrary.class); public ComponentLibrary(ModuleEnvironment environment, ReflectFactory reflectFactory, CopyStrategyLibrary copyStrategyLibrary) { - super(environment, reflectFactory, copyStrategyLibrary); + super(() -> environment, reflectFactory, copyStrategyLibrary); } private ComponentLibrary(ComponentLibrary componentLibrary, CopyStrategyLibrary newCopyStrategies) { diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/metadata/EventLibrary.java b/engine/src/main/java/org/terasology/engine/entitySystem/metadata/EventLibrary.java index 91a0f8e83a8..a4ce121e764 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/metadata/EventLibrary.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/metadata/EventLibrary.java @@ -21,7 +21,7 @@ public class EventLibrary extends ModuleClassLibrary { private static final Logger logger = LoggerFactory.getLogger(EventLibrary.class); public EventLibrary(ModuleEnvironment environment, ReflectFactory reflectFactory, CopyStrategyLibrary copyStrategyLibrary) { - super(environment, reflectFactory, copyStrategyLibrary); + super(() -> environment, reflectFactory, copyStrategyLibrary); } @Override diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/metadata/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/metadata/package-info.java index b44505b9a90..65ebeddfc20 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/metadata/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/metadata/package-info.java @@ -8,4 +8,4 @@ @API package org.terasology.engine.entitySystem.metadata; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/package-info.java index 98d1a14a792..8de17fb2a1a 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.entitySystem; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/prefab/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/prefab/package-info.java index 49b680cb7aa..a9f5c82baec 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/prefab/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/prefab/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.entitySystem.prefab; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/LoadedSectorUpdateEvent.java b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/LoadedSectorUpdateEvent.java index 008a9d7267c..964d5551ac8 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/LoadedSectorUpdateEvent.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/LoadedSectorUpdateEvent.java @@ -4,7 +4,7 @@ import org.joml.Vector3i; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.Set; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorRegionComponent.java b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorRegionComponent.java index d321db6499d..f7aa0db93cf 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorRegionComponent.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorRegionComponent.java @@ -5,7 +5,7 @@ import org.joml.Vector3i; import org.terasology.engine.world.chunks.Chunk; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.HashSet; import java.util.Set; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationComponent.java b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationComponent.java index f5ca7d2c511..592f1072533 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationComponent.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationComponent.java @@ -6,7 +6,7 @@ import org.terasology.engine.entitySystem.entity.internal.BaseEntityRef; import org.terasology.engine.entitySystem.entity.internal.EntityScope; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * The component that allows the {@link SectorSimulationSystem} to send simulation events to a sector-scope entity. diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationEvent.java b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationEvent.java index 005bda9000d..f24d37364e3 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationEvent.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorSimulationEvent.java @@ -4,7 +4,7 @@ import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This is the event sent to all sector-level entities by the {@link SectorSimulationSystem}, allowing them to do simulation. It diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorUtil.java b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorUtil.java index c780adef24d..57367e29115 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorUtil.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/sectors/SectorUtil.java @@ -7,7 +7,7 @@ import org.joml.Vector3ic; import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.engine.logic.location.LocationComponent; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.world.chunks.Chunk; import org.terasology.engine.world.chunks.ChunkProvider; import org.terasology.engine.world.chunks.Chunks; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/systems/RegisterSystem.java b/engine/src/main/java/org/terasology/engine/entitySystem/systems/RegisterSystem.java index 8fcef4192de..21061e71b3d 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/systems/RegisterSystem.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/systems/RegisterSystem.java @@ -3,6 +3,8 @@ package org.terasology.engine.entitySystem.systems; +import org.terasology.context.annotation.Index; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -22,6 +24,7 @@ */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterSystem { String[] requiresOptional() default {}; diff --git a/engine/src/main/java/org/terasology/engine/entitySystem/systems/package-info.java b/engine/src/main/java/org/terasology/engine/entitySystem/systems/package-info.java index f9ad9cdfd5f..16966a1a580 100644 --- a/engine/src/main/java/org/terasology/engine/entitySystem/systems/package-info.java +++ b/engine/src/main/java/org/terasology/engine/entitySystem/systems/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.entitySystem.systems; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/i18n/TranslationSystem.java b/engine/src/main/java/org/terasology/engine/i18n/TranslationSystem.java index 9797a0cc12d..f5ee29b2255 100644 --- a/engine/src/main/java/org/terasology/engine/i18n/TranslationSystem.java +++ b/engine/src/main/java/org/terasology/engine/i18n/TranslationSystem.java @@ -4,7 +4,7 @@ package org.terasology.engine.i18n; import org.terasology.gestalt.assets.ResourceUrn; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.translate.Translator; import java.util.Locale; diff --git a/engine/src/main/java/org/terasology/engine/i18n/assets/Translation.java b/engine/src/main/java/org/terasology/engine/i18n/assets/Translation.java index b5ff5f46154..8b45a804ef9 100644 --- a/engine/src/main/java/org/terasology/engine/i18n/assets/Translation.java +++ b/engine/src/main/java/org/terasology/engine/i18n/assets/Translation.java @@ -36,7 +36,8 @@ public class Translation extends Asset { * @param data The actual translation data. Never null. */ public Translation(ResourceUrn urn, AssetType assetType, TranslationData data, Translation.DisposalAction disposalAction) { - super(urn, assetType, disposalAction); + super(urn, assetType); + setDisposableResource(disposalAction); this.disposalAction = disposalAction; this.disposalAction.setAsset(this); reload(data); diff --git a/engine/src/main/java/org/terasology/engine/i18n/assets/package-info.java b/engine/src/main/java/org/terasology/engine/i18n/assets/package-info.java index c6ffc21565a..9e37841c851 100644 --- a/engine/src/main/java/org/terasology/engine/i18n/assets/package-info.java +++ b/engine/src/main/java/org/terasology/engine/i18n/assets/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.i18n.assets; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/input/RegisterBindAxis.java b/engine/src/main/java/org/terasology/engine/input/RegisterBindAxis.java index bbf4c5b6409..455f257f943 100644 --- a/engine/src/main/java/org/terasology/engine/input/RegisterBindAxis.java +++ b/engine/src/main/java/org/terasology/engine/input/RegisterBindAxis.java @@ -3,6 +3,8 @@ package org.terasology.engine.input; +import org.terasology.context.annotation.Index; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -10,6 +12,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterBindAxis { String id(); diff --git a/engine/src/main/java/org/terasology/engine/input/RegisterBindButton.java b/engine/src/main/java/org/terasology/engine/input/RegisterBindButton.java index f800bc4b4f0..777a1014e5e 100644 --- a/engine/src/main/java/org/terasology/engine/input/RegisterBindButton.java +++ b/engine/src/main/java/org/terasology/engine/input/RegisterBindButton.java @@ -3,6 +3,7 @@ package org.terasology.engine.input; +import org.terasology.context.annotation.Index; import org.terasology.input.ActivateMode; import java.lang.annotation.ElementType; @@ -12,6 +13,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterBindButton { String id(); diff --git a/engine/src/main/java/org/terasology/engine/input/RegisterRealBindAxis.java b/engine/src/main/java/org/terasology/engine/input/RegisterRealBindAxis.java index ca283164852..22b530f5c44 100644 --- a/engine/src/main/java/org/terasology/engine/input/RegisterRealBindAxis.java +++ b/engine/src/main/java/org/terasology/engine/input/RegisterRealBindAxis.java @@ -3,6 +3,8 @@ package org.terasology.engine.input; +import org.terasology.context.annotation.Index; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -10,6 +12,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterRealBindAxis { String id(); diff --git a/engine/src/main/java/org/terasology/engine/input/binds/general/package-info.java b/engine/src/main/java/org/terasology/engine/input/binds/general/package-info.java index f039df4753b..86c1df73679 100644 --- a/engine/src/main/java/org/terasology/engine/input/binds/general/package-info.java +++ b/engine/src/main/java/org/terasology/engine/input/binds/general/package-info.java @@ -7,5 +7,5 @@ displayName = "${engine:menu#category-general}" ) package org.terasology.engine.input.binds.general; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.input.InputCategory; diff --git a/engine/src/main/java/org/terasology/engine/input/binds/interaction/package-info.java b/engine/src/main/java/org/terasology/engine/input/binds/interaction/package-info.java index 0b82d3cc2cb..1497a4ca1fe 100644 --- a/engine/src/main/java/org/terasology/engine/input/binds/interaction/package-info.java +++ b/engine/src/main/java/org/terasology/engine/input/binds/interaction/package-info.java @@ -10,5 +10,5 @@ "engine:frob" }) package org.terasology.engine.input.binds.interaction; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.input.InputCategory; diff --git a/engine/src/main/java/org/terasology/engine/input/binds/inventory/UseItemButton.java b/engine/src/main/java/org/terasology/engine/input/binds/inventory/UseItemButton.java index 4929f90fb0e..368e9da9e79 100644 --- a/engine/src/main/java/org/terasology/engine/input/binds/inventory/UseItemButton.java +++ b/engine/src/main/java/org/terasology/engine/input/binds/inventory/UseItemButton.java @@ -6,7 +6,7 @@ import org.terasology.engine.input.BindButtonEvent; import org.terasology.engine.input.DefaultBinding; import org.terasology.engine.input.RegisterBindButton; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.input.ControllerId; import org.terasology.input.InputType; diff --git a/engine/src/main/java/org/terasology/engine/input/binds/movement/package-info.java b/engine/src/main/java/org/terasology/engine/input/binds/movement/package-info.java index 7bc87772582..256bdaba8cd 100644 --- a/engine/src/main/java/org/terasology/engine/input/binds/movement/package-info.java +++ b/engine/src/main/java/org/terasology/engine/input/binds/movement/package-info.java @@ -18,5 +18,5 @@ "engine:crouch" }) package org.terasology.engine.input.binds.movement; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.input.InputCategory; diff --git a/engine/src/main/java/org/terasology/engine/input/cameraTarget/package-info.java b/engine/src/main/java/org/terasology/engine/input/cameraTarget/package-info.java index e719e54cedd..331e480925b 100644 --- a/engine/src/main/java/org/terasology/engine/input/cameraTarget/package-info.java +++ b/engine/src/main/java/org/terasology/engine/input/cameraTarget/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.input.cameraTarget; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/input/events/package-info.java b/engine/src/main/java/org/terasology/engine/input/events/package-info.java index bc07ea79358..450590c8e95 100644 --- a/engine/src/main/java/org/terasology/engine/input/events/package-info.java +++ b/engine/src/main/java/org/terasology/engine/input/events/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.input.events; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/input/package-info.java b/engine/src/main/java/org/terasology/engine/input/package-info.java index 487b1ea7f11..1f8af538f16 100644 --- a/engine/src/main/java/org/terasology/engine/input/package-info.java +++ b/engine/src/main/java/org/terasology/engine/input/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.input; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/actions/package-info.java b/engine/src/main/java/org/terasology/engine/logic/actions/package-info.java index 10e698325ca..d9b2347f161 100644 --- a/engine/src/main/java/org/terasology/engine/logic/actions/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/actions/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.actions; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/autoCreate/AutoCreateComponent.java b/engine/src/main/java/org/terasology/engine/logic/autoCreate/AutoCreateComponent.java index a483019869e..1eb06724979 100644 --- a/engine/src/main/java/org/terasology/engine/logic/autoCreate/AutoCreateComponent.java +++ b/engine/src/main/java/org/terasology/engine/logic/autoCreate/AutoCreateComponent.java @@ -3,7 +3,7 @@ package org.terasology.engine.logic.autoCreate; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This component is used to mark prefabs that should automatically created when a game begins or is loaded, if one does not already exist. diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorAction.java index 356332ce294..d96a6f9f7d4 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorAction.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.logic.behavior; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorComponent.java b/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorComponent.java index 4c25a44ed4c..65468496f1b 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorComponent.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/BehaviorComponent.java @@ -4,7 +4,7 @@ import org.terasology.engine.logic.behavior.asset.BehaviorTree; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Entities with this component are handled by a behavior tree. Default tree to fetch may be set. diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveBehaviorComponent.java b/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveBehaviorComponent.java index 8d8b07ce1b5..028aae00512 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveBehaviorComponent.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveBehaviorComponent.java @@ -4,7 +4,7 @@ import org.terasology.engine.logic.behavior.asset.BehaviorTree; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Entities with this component are handled by a behavior tree. Default tree to fetch may be set. diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveInterpreter.java b/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveInterpreter.java index eed28f929b9..86074cf21bb 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveInterpreter.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/CollectiveInterpreter.java @@ -6,7 +6,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.CollectiveBehaviorTreeRunner; import org.terasology.engine.logic.common.DisplayNameComponent; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.Set; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/Interpreter.java b/engine/src/main/java/org/terasology/engine/logic/behavior/Interpreter.java index 848df2fba86..33048ee6200 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/Interpreter.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/Interpreter.java @@ -6,7 +6,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.BehaviorTreeRunner; import org.terasology.engine.logic.common.DisplayNameComponent; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * An interpreter evaluates a behavior tree. Uses BehaviorTreeRunner to actually evaluate the tree. The runner diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/CounterAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/CounterAction.java index c9fb23f167e..2390031ed48 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/CounterAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/CounterAction.java @@ -6,7 +6,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.BaseAction; import org.terasology.engine.logic.behavior.core.BehaviorState; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.properties.Range; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/InvertAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/InvertAction.java index 5846287ebee..0b8e4759baa 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/InvertAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/InvertAction.java @@ -6,7 +6,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.BaseAction; import org.terasology.engine.logic.behavior.core.BehaviorState; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Inverts the child's return value. Doesn't change RUNNING. diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LookupAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LookupAction.java index 7d7001357c7..4a186916275 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LookupAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LookupAction.java @@ -8,7 +8,7 @@ import org.terasology.engine.logic.behavior.core.BaseAction; import org.terasology.engine.logic.behavior.core.BehaviorNode; import org.terasology.engine.logic.behavior.core.BehaviorState; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.properties.OneOf; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LoopAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LoopAction.java index e5bdd81bb66..e4d19c93937 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LoopAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/LoopAction.java @@ -6,7 +6,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.BaseAction; import org.terasology.engine.logic.behavior.core.BehaviorState; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Node, that loops its child forever diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/SleepAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/SleepAction.java index 05a25650e2e..9f6adbb3445 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/SleepAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/SleepAction.java @@ -6,7 +6,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.BaseAction; import org.terasology.engine.logic.behavior.core.BehaviorState; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.properties.Range; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/TimeoutAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/TimeoutAction.java index 332bce5df38..b6cb6bdd6d2 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/TimeoutAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/TimeoutAction.java @@ -8,7 +8,7 @@ import org.terasology.engine.logic.behavior.core.Actor; import org.terasology.engine.logic.behavior.core.BaseAction; import org.terasology.engine.logic.behavior.core.BehaviorState; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.properties.Range; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/package-info.java b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/package-info.java index 9dcc4acf620..aceafdd4790 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/actions/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/actions/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.behavior.actions; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/asset/BehaviorTree.java b/engine/src/main/java/org/terasology/engine/logic/behavior/asset/BehaviorTree.java index cc47b90d8e8..fffcd6141c7 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/asset/BehaviorTree.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/asset/BehaviorTree.java @@ -6,7 +6,7 @@ import org.terasology.gestalt.assets.AssetType; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.engine.logic.behavior.core.BehaviorNode; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Behavior tree asset. Can be loaded and saved into json. Actors should never run the nodes behind a asset directly. diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/asset/GroupBuilder.java b/engine/src/main/java/org/terasology/engine/logic/behavior/asset/GroupBuilder.java index 70f5366ad90..f8b455d6a89 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/asset/GroupBuilder.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/asset/GroupBuilder.java @@ -5,7 +5,7 @@ import com.google.gson.Gson; import com.google.gson.JsonIOException; import com.google.gson.JsonSyntaxException; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.registry.In; import java.io.InputStream; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/asset/package-info.java b/engine/src/main/java/org/terasology/engine/logic/behavior/asset/package-info.java index 14438185b6d..78c887b37f9 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/asset/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/asset/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.behavior.asset; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/core/Action.java b/engine/src/main/java/org/terasology/engine/logic/behavior/core/Action.java index 68942e39321..72a6ed3498a 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/core/Action.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/core/Action.java @@ -2,7 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.logic.behavior.core; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; +import org.terasology.context.annotation.IndexInherited; /** * The action that is used by an action or decorator node. Every action node of a behavior tree has its own action @@ -12,6 +13,7 @@ * Action instances are shown in the property panel of the behavior editor. */ @API +@IndexInherited public interface Action { /** diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/core/Actor.java b/engine/src/main/java/org/terasology/engine/logic/behavior/core/Actor.java index 847ccd1a20f..3de09a18474 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/core/Actor.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/core/Actor.java @@ -13,7 +13,7 @@ import org.terasology.engine.registry.CoreRegistry; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.reflection.metadata.FieldMetadata; import java.lang.reflect.Field; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/core/BaseAction.java b/engine/src/main/java/org/terasology/engine/logic/behavior/core/BaseAction.java index 06ead408228..4b8d74f4500 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/core/BaseAction.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/core/BaseAction.java @@ -3,7 +3,7 @@ package org.terasology.engine.logic.behavior.core; import org.terasology.engine.logic.behavior.BehaviorAction; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * BaseAction that uses BehaviorAction annotation as its name. diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/core/package-info.java b/engine/src/main/java/org/terasology/engine/logic/behavior/core/package-info.java index 987f21fa31b..564dffb4094 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/core/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/core/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.behavior.core; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/nui/BehaviorNodeComponent.java b/engine/src/main/java/org/terasology/engine/logic/behavior/nui/BehaviorNodeComponent.java index 8ecabfb483b..612a80a0345 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/nui/BehaviorNodeComponent.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/nui/BehaviorNodeComponent.java @@ -3,7 +3,7 @@ package org.terasology.engine.logic.behavior.nui; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.Color; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/nui/package-info.java b/engine/src/main/java/org/terasology/engine/logic/behavior/nui/package-info.java index e23ba73a7e9..ea5f776ee4f 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/nui/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/nui/package-info.java @@ -6,5 +6,5 @@ displayName = "${engine:menu#category-behavior}" ) package org.terasology.engine.logic.behavior.nui; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.input.InputCategory; diff --git a/engine/src/main/java/org/terasology/engine/logic/behavior/package-info.java b/engine/src/main/java/org/terasology/engine/logic/behavior/package-info.java index 9e0d426973e..08c5c925b02 100644 --- a/engine/src/main/java/org/terasology/engine/logic/behavior/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/behavior/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.behavior; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/characters/events/package-info.java b/engine/src/main/java/org/terasology/engine/logic/characters/events/package-info.java index 1b6b10cefff..117d9e89c2f 100644 --- a/engine/src/main/java/org/terasology/engine/logic/characters/events/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/characters/events/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.characters.events; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionEndPredicted.java b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionEndPredicted.java index 6d4bd1c89aa..72bb12f3697 100644 --- a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionEndPredicted.java +++ b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionEndPredicted.java @@ -4,7 +4,7 @@ import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * diff --git a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionScreenComponent.java b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionScreenComponent.java index 1b659dcb038..15b2f839fd9 100644 --- a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionScreenComponent.java +++ b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionScreenComponent.java @@ -3,7 +3,7 @@ package org.terasology.engine.logic.characters.interactions; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Entities with this component will show an UI during interactions. diff --git a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionStartPredicted.java b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionStartPredicted.java index c70845f5e90..755f454095e 100644 --- a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionStartPredicted.java +++ b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionStartPredicted.java @@ -4,7 +4,7 @@ import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Sent to the client by itself at the start of an interaction between a character and a target. diff --git a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionUtil.java b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionUtil.java index 028c31c134e..ca5193fd0a3 100644 --- a/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionUtil.java +++ b/engine/src/main/java/org/terasology/engine/logic/characters/interactions/InteractionUtil.java @@ -8,7 +8,7 @@ import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.engine.logic.characters.CharacterComponent; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Utility class for entities with the {@link CharacterComponent}. diff --git a/engine/src/main/java/org/terasology/engine/logic/characters/package-info.java b/engine/src/main/java/org/terasology/engine/logic/characters/package-info.java index e2e6f727604..0fa1f6d7799 100644 --- a/engine/src/main/java/org/terasology/engine/logic/characters/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/characters/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.characters; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/chat/package-info.java b/engine/src/main/java/org/terasology/engine/logic/chat/package-info.java index f409e7e7e6a..288eeafecfb 100644 --- a/engine/src/main/java/org/terasology/engine/logic/chat/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/chat/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.chat; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/clipboard/ClipboardManager.java b/engine/src/main/java/org/terasology/engine/logic/clipboard/ClipboardManager.java index 83a6e609e37..37e3e644a39 100644 --- a/engine/src/main/java/org/terasology/engine/logic/clipboard/ClipboardManager.java +++ b/engine/src/main/java/org/terasology/engine/logic/clipboard/ClipboardManager.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.logic.clipboard; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API // Temporarily in base permission set, until fixed - (permissionSet = "clipboard") public interface ClipboardManager { diff --git a/engine/src/main/java/org/terasology/engine/logic/common/lifespan/package-info.java b/engine/src/main/java/org/terasology/engine/logic/common/lifespan/package-info.java index 31cf6e37305..7a6ef5e968f 100644 --- a/engine/src/main/java/org/terasology/engine/logic/common/lifespan/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/common/lifespan/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.common.lifespan; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/common/package-info.java b/engine/src/main/java/org/terasology/engine/logic/common/package-info.java index 9b73e16c5dd..4340eae4ab4 100644 --- a/engine/src/main/java/org/terasology/engine/logic/common/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/common/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.common; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/config/ModuleConfigManager.java b/engine/src/main/java/org/terasology/engine/logic/config/ModuleConfigManager.java index dfb1a51b327..c6b944de54c 100644 --- a/engine/src/main/java/org/terasology/engine/logic/config/ModuleConfigManager.java +++ b/engine/src/main/java/org/terasology/engine/logic/config/ModuleConfigManager.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.logic.config; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public interface ModuleConfigManager { diff --git a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/CommandParameterSuggester.java b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/CommandParameterSuggester.java index a864aa6bb45..fb1fe22adad 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/CommandParameterSuggester.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/CommandParameterSuggester.java @@ -3,7 +3,7 @@ package org.terasology.engine.logic.console.commandSystem; import org.terasology.engine.entitySystem.entity.EntityRef; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.Set; diff --git a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/ConsoleCommand.java b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/ConsoleCommand.java index a8052121afe..6ce2c1639a3 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/ConsoleCommand.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/ConsoleCommand.java @@ -7,7 +7,7 @@ import org.terasology.engine.logic.console.Console; import org.terasology.engine.logic.console.commandSystem.exceptions.CommandExecutionException; import org.terasology.engine.logic.console.commandSystem.exceptions.CommandSuggestionException; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import java.util.Comparator; diff --git a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapter.java b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapter.java index 75e11983b97..e75886a4fc8 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapter.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapter.java @@ -3,7 +3,7 @@ package org.terasology.engine.logic.console.commandSystem.adapter; import org.terasology.engine.logic.console.commandSystem.AbstractCommand; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Used for providing parameters to {@code execute} and {@code suggest} methods of {@link AbstractCommand} diff --git a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapterManager.java b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapterManager.java index a01919f3288..f0502a46941 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapterManager.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/adapter/ParameterAdapterManager.java @@ -5,7 +5,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.Maps; import org.terasology.engine.entitySystem.prefab.Prefab; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import org.terasology.engine.world.block.family.BlockFamily; diff --git a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/annotations/package-info.java b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/annotations/package-info.java index 75a348a2a07..7e9fa37995e 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/annotations/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/commandSystem/annotations/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.console.commandSystem.annotations; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/console/package-info.java b/engine/src/main/java/org/terasology/engine/logic/console/package-info.java index 6336394652e..ec54bb9897b 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.console; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/console/suggesters/package-info.java b/engine/src/main/java/org/terasology/engine/logic/console/suggesters/package-info.java index 0917995b4d3..a3065cf26d6 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/suggesters/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/suggesters/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.console.suggesters; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/delay/package-info.java b/engine/src/main/java/org/terasology/engine/logic/delay/package-info.java index cac41d224af..c71d022ebe2 100644 --- a/engine/src/main/java/org/terasology/engine/logic/delay/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/delay/package-info.java @@ -2,4 +2,4 @@ // SPDX-License-Identifier: Apache-2.0 @API package org.terasology.engine.logic.delay; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/health/package-info.java b/engine/src/main/java/org/terasology/engine/logic/health/package-info.java index cb9bdf71d40..0cc153342e9 100644 --- a/engine/src/main/java/org/terasology/engine/logic/health/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/health/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.health; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/inventory/events/package-info.java b/engine/src/main/java/org/terasology/engine/logic/inventory/events/package-info.java index 856707bcbd9..6d1a9fce20c 100644 --- a/engine/src/main/java/org/terasology/engine/logic/inventory/events/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/inventory/events/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.inventory.events; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/inventory/package-info.java b/engine/src/main/java/org/terasology/engine/logic/inventory/package-info.java index e6cc4f76a6a..588fb1a99e9 100644 --- a/engine/src/main/java/org/terasology/engine/logic/inventory/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/inventory/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.inventory; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/location/package-info.java b/engine/src/main/java/org/terasology/engine/logic/location/package-info.java index ea4fcf1ea0e..e01e478227a 100644 --- a/engine/src/main/java/org/terasology/engine/logic/location/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/location/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.location; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/nameTags/NameTagComponent.java b/engine/src/main/java/org/terasology/engine/logic/nameTags/NameTagComponent.java index 4593d1006d2..8889762fb85 100644 --- a/engine/src/main/java/org/terasology/engine/logic/nameTags/NameTagComponent.java +++ b/engine/src/main/java/org/terasology/engine/logic/nameTags/NameTagComponent.java @@ -5,7 +5,7 @@ import org.terasology.engine.logic.common.DisplayNameComponent; import org.terasology.engine.network.Replicate; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.Color; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/notifications/NotificationMessageEvent.java b/engine/src/main/java/org/terasology/engine/logic/notifications/NotificationMessageEvent.java index 2cac9da1511..c67d4a626b2 100644 --- a/engine/src/main/java/org/terasology/engine/logic/notifications/NotificationMessageEvent.java +++ b/engine/src/main/java/org/terasology/engine/logic/notifications/NotificationMessageEvent.java @@ -8,7 +8,7 @@ import org.terasology.engine.logic.console.Message; import org.terasology.engine.logic.console.MessageEvent; import org.terasology.engine.logic.players.PlayerUtil; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.network.OwnerEvent; /** diff --git a/engine/src/main/java/org/terasology/engine/logic/permission/PermissionManager.java b/engine/src/main/java/org/terasology/engine/logic/permission/PermissionManager.java index 9047a26451d..05897da00ad 100644 --- a/engine/src/main/java/org/terasology/engine/logic/permission/PermissionManager.java +++ b/engine/src/main/java/org/terasology/engine/logic/permission/PermissionManager.java @@ -4,7 +4,7 @@ import com.google.common.base.Predicate; import org.terasology.engine.entitySystem.entity.EntityRef; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public interface PermissionManager { diff --git a/engine/src/main/java/org/terasology/engine/logic/players/event/package-info.java b/engine/src/main/java/org/terasology/engine/logic/players/event/package-info.java index 1e4be5a9832..4ba0f9abaa8 100644 --- a/engine/src/main/java/org/terasology/engine/logic/players/event/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/players/event/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.players.event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/players/package-info.java b/engine/src/main/java/org/terasology/engine/logic/players/package-info.java index 35f7e19a8b9..01a81c0b329 100644 --- a/engine/src/main/java/org/terasology/engine/logic/players/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/players/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.players; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/logic/selection/ApplyBlockSelectionEvent.java b/engine/src/main/java/org/terasology/engine/logic/selection/ApplyBlockSelectionEvent.java index ed115906205..4f204444245 100644 --- a/engine/src/main/java/org/terasology/engine/logic/selection/ApplyBlockSelectionEvent.java +++ b/engine/src/main/java/org/terasology/engine/logic/selection/ApplyBlockSelectionEvent.java @@ -5,7 +5,7 @@ import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.engine.world.block.BlockRegion; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This event is fired once a player finished a selection using an item with a BlockSelectionComponent. The item used diff --git a/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionEndEvent.java b/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionEndEvent.java index 1ba66534217..cf7c74f69a4 100644 --- a/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionEndEvent.java +++ b/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionEndEvent.java @@ -4,7 +4,7 @@ import org.terasology.engine.world.block.BlockRegion; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This event is sent when the player finalizes the position of a moving selection by clicking the left mouse button. diff --git a/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionStartEvent.java b/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionStartEvent.java index 34c85d6c232..ef9f190b82d 100644 --- a/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionStartEvent.java +++ b/engine/src/main/java/org/terasology/engine/logic/selection/MovableSelectionStartEvent.java @@ -4,7 +4,7 @@ import org.terasology.engine.world.selection.BlockSelectionComponent; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This event should be sent by a system after it receives a {@link ApplyBlockSelectionEvent} which marks the end of a diff --git a/engine/src/main/java/org/terasology/engine/logic/spawner/package-info.java b/engine/src/main/java/org/terasology/engine/logic/spawner/package-info.java index 7793ac2e0ca..b69ff64bd4c 100644 --- a/engine/src/main/java/org/terasology/engine/logic/spawner/package-info.java +++ b/engine/src/main/java/org/terasology/engine/logic/spawner/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.logic.spawner; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/math/package-info.java b/engine/src/main/java/org/terasology/engine/math/package-info.java index 2529c52c079..5a9030b4351 100644 --- a/engine/src/main/java/org/terasology/engine/math/package-info.java +++ b/engine/src/main/java/org/terasology/engine/math/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.math; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/monitoring/package-info.java b/engine/src/main/java/org/terasology/engine/monitoring/package-info.java index 025146f8b51..9afc459de2e 100644 --- a/engine/src/main/java/org/terasology/engine/monitoring/package-info.java +++ b/engine/src/main/java/org/terasology/engine/monitoring/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.monitoring; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/network/events/package-info.java b/engine/src/main/java/org/terasology/engine/network/events/package-info.java index f5333c7c9cb..b978f02c741 100644 --- a/engine/src/main/java/org/terasology/engine/network/events/package-info.java +++ b/engine/src/main/java/org/terasology/engine/network/events/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.network.events; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/network/package-info.java b/engine/src/main/java/org/terasology/engine/network/package-info.java index 7190c3934ba..f0d67c9253f 100644 --- a/engine/src/main/java/org/terasology/engine/network/package-info.java +++ b/engine/src/main/java/org/terasology/engine/network/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.network; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/particles/ParticleData.java b/engine/src/main/java/org/terasology/engine/particles/ParticleData.java index 70a6a9f3c78..c494e78d997 100644 --- a/engine/src/main/java/org/terasology/engine/particles/ParticleData.java +++ b/engine/src/main/java/org/terasology/engine/particles/ParticleData.java @@ -5,7 +5,7 @@ import org.joml.Vector2f; import org.joml.Vector3f; import org.joml.Vector4f; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Data object to store the data of a single particle. diff --git a/engine/src/main/java/org/terasology/engine/particles/ParticleDataMask.java b/engine/src/main/java/org/terasology/engine/particles/ParticleDataMask.java index 8cdcbdcdc1f..dcbffe9a2ed 100644 --- a/engine/src/main/java/org/terasology/engine/particles/ParticleDataMask.java +++ b/engine/src/main/java/org/terasology/engine/particles/ParticleDataMask.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.particles; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Data mask used internally by the particle system. diff --git a/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManager.java b/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManager.java index 7a49ab29399..84ab7b3c29c 100644 --- a/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManager.java +++ b/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManager.java @@ -4,7 +4,7 @@ import org.terasology.engine.particles.rendering.ParticleRenderingData; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.stream.Stream; diff --git a/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManagerImpl.java b/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManagerImpl.java index 556f212799a..2848c0fafd4 100644 --- a/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManagerImpl.java +++ b/engine/src/main/java/org/terasology/engine/particles/ParticleSystemManagerImpl.java @@ -21,7 +21,7 @@ import org.terasology.engine.registry.Share; import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.gestalt.entitysystem.event.ReceiveEvent; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; diff --git a/engine/src/main/java/org/terasology/engine/particles/components/ParticleDataSpriteComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/ParticleDataSpriteComponent.java index 0214cb782ed..21fe2a533fa 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/ParticleDataSpriteComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/ParticleDataSpriteComponent.java @@ -5,7 +5,7 @@ import org.joml.Vector2f; import org.terasology.engine.rendering.assets.texture.Texture; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/particles/components/ParticleEmitterComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/ParticleEmitterComponent.java index e157be8f280..70dc042f073 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/ParticleEmitterComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/ParticleEmitterComponent.java @@ -8,7 +8,7 @@ import org.terasology.engine.particles.functions.affectors.AffectorFunction; import org.terasology.engine.particles.functions.generators.GeneratorFunction; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.LinkedHashMap; import java.util.Map; diff --git a/engine/src/main/java/org/terasology/engine/particles/components/affectors/AccelerationAffectorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/affectors/AccelerationAffectorComponent.java index d6930331b1d..8a0710a2d22 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/affectors/AccelerationAffectorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/affectors/AccelerationAffectorComponent.java @@ -5,7 +5,7 @@ import org.joml.Vector3f; import org.terasology.engine.network.Replicate; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/particles/components/affectors/VelocityAffectorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/affectors/VelocityAffectorComponent.java index e113b4962c1..ab2c815f3f6 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/affectors/VelocityAffectorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/affectors/VelocityAffectorComponent.java @@ -3,7 +3,7 @@ package org.terasology.engine.particles.components.affectors; import org.terasology.gestalt.entitysystem.component.EmptyComponent; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public class VelocityAffectorComponent extends EmptyComponent { diff --git a/engine/src/main/java/org/terasology/engine/particles/components/generators/ColorRangeGeneratorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/generators/ColorRangeGeneratorComponent.java index 53777b4d5a6..db9ac93c4e3 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/generators/ColorRangeGeneratorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/generators/ColorRangeGeneratorComponent.java @@ -4,7 +4,7 @@ import org.joml.Vector4f; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/particles/components/generators/EnergyRangeGeneratorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/generators/EnergyRangeGeneratorComponent.java index 4e327f5d945..d927d9462fe 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/generators/EnergyRangeGeneratorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/generators/EnergyRangeGeneratorComponent.java @@ -3,7 +3,7 @@ package org.terasology.engine.particles.components.generators; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/particles/components/generators/PositionRangeGeneratorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/generators/PositionRangeGeneratorComponent.java index 66a209a10b3..e362e57a47a 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/generators/PositionRangeGeneratorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/generators/PositionRangeGeneratorComponent.java @@ -4,7 +4,7 @@ import org.joml.Vector3f; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/particles/components/generators/ScaleRangeGeneratorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/generators/ScaleRangeGeneratorComponent.java index 7bfea470338..ee8beba160d 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/generators/ScaleRangeGeneratorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/generators/ScaleRangeGeneratorComponent.java @@ -4,7 +4,7 @@ import org.joml.Vector3f; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/particles/components/generators/TextureOffsetGeneratorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/generators/TextureOffsetGeneratorComponent.java index 5e37ff80007..6da29495bf2 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/generators/TextureOffsetGeneratorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/generators/TextureOffsetGeneratorComponent.java @@ -6,7 +6,7 @@ import org.joml.Vector2i; import org.terasology.engine.rendering.assets.texture.Texture; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.LinkedList; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/particles/components/generators/VelocityRangeGeneratorComponent.java b/engine/src/main/java/org/terasology/engine/particles/components/generators/VelocityRangeGeneratorComponent.java index e479f3cb02f..bd82a746e28 100644 --- a/engine/src/main/java/org/terasology/engine/particles/components/generators/VelocityRangeGeneratorComponent.java +++ b/engine/src/main/java/org/terasology/engine/particles/components/generators/VelocityRangeGeneratorComponent.java @@ -4,7 +4,7 @@ import org.joml.Vector3f; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Generator for a particle's velocity. diff --git a/engine/src/main/java/org/terasology/engine/particles/events/ParticleSystemUpdateEvent.java b/engine/src/main/java/org/terasology/engine/particles/events/ParticleSystemUpdateEvent.java index dc9ff2d835f..e6416291ac8 100644 --- a/engine/src/main/java/org/terasology/engine/particles/events/ParticleSystemUpdateEvent.java +++ b/engine/src/main/java/org/terasology/engine/particles/events/ParticleSystemUpdateEvent.java @@ -3,7 +3,7 @@ package org.terasology.engine.particles.events; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Fired to notify the ParticleSystemManager that a system needs to be reconfigured. diff --git a/engine/src/main/java/org/terasology/engine/particles/functions/RegisterParticleSystemFunction.java b/engine/src/main/java/org/terasology/engine/particles/functions/RegisterParticleSystemFunction.java index 6098268640e..c43f7704e06 100644 --- a/engine/src/main/java/org/terasology/engine/particles/functions/RegisterParticleSystemFunction.java +++ b/engine/src/main/java/org/terasology/engine/particles/functions/RegisterParticleSystemFunction.java @@ -2,7 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.particles.functions; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; +import org.terasology.context.annotation.Index; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -16,4 +17,5 @@ @API @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterParticleSystemFunction { } diff --git a/engine/src/main/java/org/terasology/engine/particles/functions/affectors/AffectorFunction.java b/engine/src/main/java/org/terasology/engine/particles/functions/affectors/AffectorFunction.java index bc78f12043f..d98a038eac5 100644 --- a/engine/src/main/java/org/terasology/engine/particles/functions/affectors/AffectorFunction.java +++ b/engine/src/main/java/org/terasology/engine/particles/functions/affectors/AffectorFunction.java @@ -7,7 +7,7 @@ import org.terasology.engine.particles.functions.ParticleSystemFunction; import org.terasology.engine.utilities.random.Random; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * A affector function is called on a particle's data when it is updated to set its fields (Ex. Apply a force to a particle). diff --git a/engine/src/main/java/org/terasology/engine/particles/functions/generators/GeneratorFunction.java b/engine/src/main/java/org/terasology/engine/particles/functions/generators/GeneratorFunction.java index 71a4fbd97d9..9e6fc1cda24 100644 --- a/engine/src/main/java/org/terasology/engine/particles/functions/generators/GeneratorFunction.java +++ b/engine/src/main/java/org/terasology/engine/particles/functions/generators/GeneratorFunction.java @@ -7,7 +7,7 @@ import org.terasology.engine.particles.functions.ParticleSystemFunction; import org.terasology.engine.utilities.random.Random; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * A generator function is called on a particle's data when it is created to set its fields. diff --git a/engine/src/main/java/org/terasology/engine/particles/rendering/ParticleRenderingData.java b/engine/src/main/java/org/terasology/engine/particles/rendering/ParticleRenderingData.java index 0e0aada9923..5681509c5c5 100644 --- a/engine/src/main/java/org/terasology/engine/particles/rendering/ParticleRenderingData.java +++ b/engine/src/main/java/org/terasology/engine/particles/rendering/ParticleRenderingData.java @@ -4,7 +4,7 @@ import org.terasology.engine.particles.ParticlePool; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API diff --git a/engine/src/main/java/org/terasology/engine/persistence/TemplateEngine.java b/engine/src/main/java/org/terasology/engine/persistence/TemplateEngine.java index 6e332f7d7c9..e08530be56c 100644 --- a/engine/src/main/java/org/terasology/engine/persistence/TemplateEngine.java +++ b/engine/src/main/java/org/terasology/engine/persistence/TemplateEngine.java @@ -3,7 +3,7 @@ package org.terasology.engine.persistence; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Transforms the input text that contains markers (e.g. ${text} expressions). diff --git a/engine/src/main/java/org/terasology/engine/persistence/TemplateEngineImpl.java b/engine/src/main/java/org/terasology/engine/persistence/TemplateEngineImpl.java index 78a40708958..52590ae539b 100644 --- a/engine/src/main/java/org/terasology/engine/persistence/TemplateEngineImpl.java +++ b/engine/src/main/java/org/terasology/engine/persistence/TemplateEngineImpl.java @@ -7,7 +7,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * A simple template engine that replaces ${text} expressions diff --git a/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandler.java b/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandler.java index b1faf267434..9f9f321ac61 100644 --- a/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandler.java +++ b/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandler.java @@ -3,7 +3,7 @@ package org.terasology.engine.persistence.typeHandling; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandlerFactory.java b/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandlerFactory.java index 2ac4c11fede..26785690f25 100644 --- a/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandlerFactory.java +++ b/engine/src/main/java/org/terasology/engine/persistence/typeHandling/RegisterTypeHandlerFactory.java @@ -3,7 +3,7 @@ package org.terasology.engine.persistence.typeHandling; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/engine/src/main/java/org/terasology/engine/physics/components/package-info.java b/engine/src/main/java/org/terasology/engine/physics/components/package-info.java index 3b1fbd9be85..ec5b191fd13 100644 --- a/engine/src/main/java/org/terasology/engine/physics/components/package-info.java +++ b/engine/src/main/java/org/terasology/engine/physics/components/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.physics.components; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/physics/components/shapes/package-info.java b/engine/src/main/java/org/terasology/engine/physics/components/shapes/package-info.java index 5cef5b6c0a3..77e41c8ecca 100644 --- a/engine/src/main/java/org/terasology/engine/physics/components/shapes/package-info.java +++ b/engine/src/main/java/org/terasology/engine/physics/components/shapes/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.physics.components.shapes; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/physics/events/package-info.java b/engine/src/main/java/org/terasology/engine/physics/events/package-info.java index 69557910a90..04dd6b5145f 100644 --- a/engine/src/main/java/org/terasology/engine/physics/events/package-info.java +++ b/engine/src/main/java/org/terasology/engine/physics/events/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.physics.events; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/physics/package-info.java b/engine/src/main/java/org/terasology/engine/physics/package-info.java index 3d2b1166223..730a01c1c8b 100644 --- a/engine/src/main/java/org/terasology/engine/physics/package-info.java +++ b/engine/src/main/java/org/terasology/engine/physics/package-info.java @@ -31,4 +31,4 @@ */ @API package org.terasology.engine.physics; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/physics/shapes/package-info.java b/engine/src/main/java/org/terasology/engine/physics/shapes/package-info.java index dbfde465b58..6a1c75b7e76 100644 --- a/engine/src/main/java/org/terasology/engine/physics/shapes/package-info.java +++ b/engine/src/main/java/org/terasology/engine/physics/shapes/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.physics.shapes; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/registry/package-info.java b/engine/src/main/java/org/terasology/engine/registry/package-info.java index 78935b3b4c4..10c80ad6858 100644 --- a/engine/src/main/java/org/terasology/engine/registry/package-info.java +++ b/engine/src/main/java/org/terasology/engine/registry/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.registry; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/AABBRenderer.java b/engine/src/main/java/org/terasology/engine/rendering/AABBRenderer.java index 686e582578f..68009c586aa 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/AABBRenderer.java +++ b/engine/src/main/java/org/terasology/engine/rendering/AABBRenderer.java @@ -19,7 +19,7 @@ import org.terasology.engine.rendering.cameras.Camera; import org.terasology.engine.rendering.world.WorldRenderer; import org.terasology.engine.utilities.Assets; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.joml.geom.AABBf; import org.terasology.joml.geom.AABBfc; import org.terasology.nui.Color; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/animation/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/animation/package-info.java index 4ab058af621..a941823495e 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/animation/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/animation/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.animation; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/font/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/font/package-info.java index 44af06691e2..c57d6b48edc 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/font/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/font/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.font; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/material/Material.java b/engine/src/main/java/org/terasology/engine/rendering/assets/material/Material.java index 43cc32693df..0efb87bae42 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/material/Material.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/material/Material.java @@ -21,7 +21,8 @@ public abstract class Material extends Asset { protected Material(ResourceUrn urn, AssetType assetType, DisposableResource resource) { - super(urn, assetType, resource); + super(urn, assetType); + setDisposableResource(resource); } protected Material(ResourceUrn urn, AssetType assetType) { diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/material/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/material/package-info.java index b98f8e35fd3..2ad07e9b5ee 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/material/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/material/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.material; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/Mesh.java b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/Mesh.java index d095e1ddd28..9538735c9cf 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/Mesh.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/Mesh.java @@ -19,7 +19,8 @@ protected Mesh(ResourceUrn urn, AssetType assetType) { } protected Mesh(ResourceUrn urn, AssetType assetType, DisposableResource resource) { - super(urn, assetType, resource); + super(urn, assetType); + setDisposableResource(resource); } public abstract AABBfc getAABB(); diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/MeshBuilder.java b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/MeshBuilder.java index fc82564c29d..9b72f735f7c 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/MeshBuilder.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/MeshBuilder.java @@ -7,7 +7,7 @@ import org.joml.Vector3f; import org.joml.Vector3fc; import org.terasology.gestalt.assets.ResourceUrn; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.Colorc; import org.terasology.engine.utilities.Assets; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/ScreenQuadMeshProducer.java b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/ScreenQuadMeshProducer.java index 656e9d37f53..5f6c0981417 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/ScreenQuadMeshProducer.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/ScreenQuadMeshProducer.java @@ -10,7 +10,7 @@ import org.terasology.gestalt.assets.AssetDataProducer; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.gestalt.assets.module.annotations.RegisterAssetDataProducer; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import java.io.IOException; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/package-info.java index f7223de5562..dd56f8b3e85 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/mesh/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.mesh; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/shader/Shader.java b/engine/src/main/java/org/terasology/engine/rendering/assets/shader/Shader.java index 33e5f614c35..f080cadac42 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/shader/Shader.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/shader/Shader.java @@ -11,7 +11,8 @@ public abstract class Shader extends Asset { protected Shader(ResourceUrn urn, AssetType assetType, DisposableResource resource) { - super(urn, assetType, resource); + super(urn, assetType); + setDisposableResource(resource); } protected Shader(ResourceUrn urn, AssetType assetType) { diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/shader/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/shader/package-info.java index 013ec216b2d..908eee31447 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/shader/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/shader/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.shader; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/SkeletalMesh.java b/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/SkeletalMesh.java index 9a742530f04..b7c7084f06c 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/SkeletalMesh.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/SkeletalMesh.java @@ -14,7 +14,8 @@ public abstract class SkeletalMesh extends Asset { protected SkeletalMesh(ResourceUrn urn, AssetType assetType, DisposableResource disposableResource) { - super(urn, assetType, disposableResource); + super(urn, assetType); + setDisposableResource(disposableResource); } protected SkeletalMesh(ResourceUrn urn, AssetType assetType) { diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/package-info.java index 210326e910d..1524625b6d8 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/skeletalmesh/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.skeletalmesh; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/texture/TextureRegionAsset.java b/engine/src/main/java/org/terasology/engine/rendering/assets/texture/TextureRegionAsset.java index 194fc661f0f..8c438677753 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/texture/TextureRegionAsset.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/texture/TextureRegionAsset.java @@ -15,6 +15,7 @@ protected TextureRegionAsset(ResourceUrn urn, AssetType assetType) { } protected TextureRegionAsset(ResourceUrn urn, AssetType assetType, DisposableResource disposableResource) { - super(urn, assetType, disposableResource); + super(urn, assetType); + setDisposableResource(disposableResource); } } diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/texture/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/texture/package-info.java index 2891cb7a287..e829f355266 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/texture/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/texture/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.texture; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/assets/texture/subtexture/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/assets/texture/subtexture/package-info.java index 7352d5838f3..91b0dfdb4fa 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/assets/texture/subtexture/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/assets/texture/subtexture/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.assets.texture.subtexture; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/backdrop/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/backdrop/package-info.java index f815bcbf902..4bb0884c202 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/backdrop/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/backdrop/package-info.java @@ -4,4 +4,4 @@ @API package org.terasology.engine.rendering.backdrop; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/cameras/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/cameras/package-info.java index fce825770c6..4d1aa3d1050 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/cameras/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/cameras/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.cameras; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/dag/ModuleRendering.java b/engine/src/main/java/org/terasology/engine/rendering/dag/ModuleRendering.java index fa0cf557a67..c755f724f6f 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/dag/ModuleRendering.java +++ b/engine/src/main/java/org/terasology/engine/rendering/dag/ModuleRendering.java @@ -4,6 +4,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.terasology.context.annotation.IndexInherited; import org.terasology.engine.context.Context; import org.terasology.engine.core.SimpleUri; import org.terasology.engine.core.module.ModuleManager; @@ -17,6 +18,7 @@ import org.terasology.nui.properties.Range; @RegisterSystem +@IndexInherited public abstract class ModuleRendering { protected static final Logger logger = LoggerFactory.getLogger(ModuleRendering.class); diff --git a/engine/src/main/java/org/terasology/engine/rendering/dag/dependencyConnections/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/dag/dependencyConnections/package-info.java index 8156ea661d2..6cea3e243fd 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/dag/dependencyConnections/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/dag/dependencyConnections/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.dag.dependencyConnections; - import org.terasology.gestalt.module.sandbox.API; + import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/dag/nodes/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/dag/nodes/package-info.java index 4c240ada941..89f41669e31 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/dag/nodes/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/dag/nodes/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.dag.nodes; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/dag/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/dag/package-info.java index f40f7875d38..dad9943922b 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/dag/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/dag/package-info.java @@ -21,4 +21,4 @@ @API package org.terasology.engine.rendering.dag; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/dag/stateChanges/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/dag/stateChanges/package-info.java index 5f9420c835f..24f2fac5156 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/dag/stateChanges/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/dag/stateChanges/package-info.java @@ -11,4 +11,4 @@ @API package org.terasology.engine.rendering.dag.stateChanges; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/iconmesh/IconMeshFactory.java b/engine/src/main/java/org/terasology/engine/rendering/iconmesh/IconMeshFactory.java index bd019ff70ea..0eec16fb928 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/iconmesh/IconMeshFactory.java +++ b/engine/src/main/java/org/terasology/engine/rendering/iconmesh/IconMeshFactory.java @@ -13,7 +13,7 @@ import org.terasology.engine.utilities.Assets; import org.terasology.gestalt.assets.Asset; import org.terasology.gestalt.assets.ResourceUrn; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import org.terasology.joml.geom.Rectanglei; import org.terasology.nui.Color; diff --git a/engine/src/main/java/org/terasology/engine/rendering/logic/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/logic/package-info.java index 81de14d6493..0a6e581f824 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/logic/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/logic/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.logic; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/ScreenLayerClosedEvent.java b/engine/src/main/java/org/terasology/engine/rendering/nui/ScreenLayerClosedEvent.java index 4c082e98f13..849cef6775a 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/ScreenLayerClosedEvent.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/ScreenLayerClosedEvent.java @@ -5,7 +5,7 @@ import org.terasology.engine.network.OwnerEvent; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.gestalt.entitysystem.event.Event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * The event is sent to the UI layer diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/UIScreenLayer.java b/engine/src/main/java/org/terasology/engine/rendering/nui/UIScreenLayer.java index 7bcf27baa9e..aa35082b278 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/UIScreenLayer.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/UIScreenLayer.java @@ -2,8 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.rendering.nui; +import org.terasology.context.annotation.IndexInherited; import org.terasology.nui.ControlWidget; +@IndexInherited public interface UIScreenLayer extends ControlWidget { boolean isLowerLayerVisible(); diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/ContextMenuUtils.java b/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/ContextMenuUtils.java index 1f93adc1cd2..019bce8fe11 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/ContextMenuUtils.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/ContextMenuUtils.java @@ -4,7 +4,7 @@ import com.google.common.collect.Lists; import org.joml.Vector2i; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.databinding.Binding; import org.terasology.nui.databinding.ReadOnlyBinding; import org.terasology.nui.widgets.UIList; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/MenuTree.java b/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/MenuTree.java index b663aaf7758..43d56c4802f 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/MenuTree.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/contextMenu/MenuTree.java @@ -3,7 +3,7 @@ package org.terasology.engine.rendering.nui.contextMenu; import com.google.common.collect.Lists; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.List; import java.util.function.Consumer; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/editor/binds/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/editor/binds/package-info.java index 0c429dfe274..d7128768c3e 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/editor/binds/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/editor/binds/package-info.java @@ -5,4 +5,4 @@ package org.terasology.engine.rendering.nui.editor.binds; import org.terasology.input.InputCategory; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/internal/NUIManagerInternal.java b/engine/src/main/java/org/terasology/engine/rendering/nui/internal/NUIManagerInternal.java index 579e1f90b35..8164cecbc96 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/internal/NUIManagerInternal.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/internal/NUIManagerInternal.java @@ -189,13 +189,16 @@ public void setScreens(Deque toSet) { } public void refreshWidgetsLibrary() { - widgetsLibrary = new WidgetLibrary(context.get(ModuleManager.class).getEnvironment(), + widgetsLibrary = new WidgetLibrary(() -> context.get(ModuleManager.class).getEnvironment(), context.get(ReflectFactory.class), context.get(CopyStrategyLibrary.class)); ModuleEnvironment environment = context.get(ModuleManager.class).getEnvironment(); for (Class type : environment.getSubtypesOf(UIWidget.class)) { Name module = verifyNotNull(environment.getModuleProviding(type), "No module provides %s", type); widgetsLibrary.register(new ResourceUrn(module.toString(), type.getSimpleName()), type); } + // Interfaces are not instantiatable and so are not usually stored in the widget library. + // We make a special exception in this case since all Terasology UI screens inherit from this base interface to use common styles. + widgetsLibrary.register(new ResourceUrn("engine", UIScreenLayer.class.getSimpleName()), UIScreenLayer.class); } @Override diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/hud/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/hud/package-info.java index 2c286a9aa8a..ab53aa15ab2 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/hud/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/hud/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.nui.layers.hud; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/DebugMetricsSystem.java b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/DebugMetricsSystem.java index 4f96b8afe2a..ab791a32adf 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/DebugMetricsSystem.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/DebugMetricsSystem.java @@ -5,7 +5,7 @@ import com.google.common.base.Preconditions; import org.terasology.engine.entitySystem.systems.BaseComponentSystem; import org.terasology.engine.entitySystem.systems.RegisterSystem; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.registry.Share; import java.util.ArrayList; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/MetricsMode.java b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/MetricsMode.java index 0d1c570f5e0..1bebd83afdf 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/MetricsMode.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/metrics/MetricsMode.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.rendering.nui.layers.ingame.metrics; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * A metrics mode is a named entry in the {@link DebugOverlay}. diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/package-info.java index aed51ddb9f0..41f776c01f4 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/ingame/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.nui.layers.ingame; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/MessagePopup.java b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/MessagePopup.java index 4325cee98ed..c6f75092ed3 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/MessagePopup.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/MessagePopup.java @@ -3,7 +3,7 @@ package org.terasology.engine.rendering.nui.layers.mainMenu; import org.terasology.gestalt.assets.ResourceUrn; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.WidgetUtil; import org.terasology.nui.widgets.ActivateEventListener; import org.terasology.nui.widgets.UILabel; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/moduleDetailsScreen/ModuleDetailsScreen.java b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/moduleDetailsScreen/ModuleDetailsScreen.java index 0f3a9b67907..2d4219f9824 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/moduleDetailsScreen/ModuleDetailsScreen.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/layers/mainMenu/moduleDetailsScreen/ModuleDetailsScreen.java @@ -306,7 +306,7 @@ private String getString(DependencyInfo value) { public void draw(DependencyInfo value, Canvas canvas) { Module module = moduleManager.getRegistry().getLatestModuleVersion(value.getId()); - if (module == null || !(value.versionPredicate().test(module.getVersion()))) { + if (module == null || !value.versionRange().contains(module.getVersion())) { canvas.setMode("invalid"); } else { canvas.setMode("available"); diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/package-info.java index 10c55f52574..23e6d05d076 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/package-info.java @@ -16,4 +16,4 @@ */ @API package org.terasology.engine.rendering.nui; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/skin/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/skin/package-info.java index a798ca5e84d..8962ad8b59a 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/skin/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/skin/package-info.java @@ -7,4 +7,4 @@ */ @API package org.terasology.engine.rendering.nui.skin; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/flow/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/flow/package-info.java index cc61d7cbd9b..5fd6e0c7963 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/flow/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/flow/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.data.basic.flow; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/package-info.java index 55a988127d8..837b41dfd71 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/basic/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.data.basic; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/list/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/list/package-info.java index 7a28c65130f..8e5bc7caad5 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/list/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/list/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.data.html.basic.list; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/package-info.java index 74dac4c8c85..44076f82453 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/basic/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.data.html.basic; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/package-info.java index 972bc93f407..64e3f9d1b76 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/html/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.data.html; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/package-info.java index 4c07730fbf2..8fe92c4cdb4 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/data/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.data; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/package-info.java index d7a2624fa1d..b184f366ee5 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.ui; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/style/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/style/package-info.java index 3f502999319..1c74774eb2a 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/style/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/browser/ui/style/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets.browser.ui.style; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/package-info.java index d0f497af672..0d6a316a08e 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/nui/widgets/package-info.java @@ -6,4 +6,4 @@ */ @API package org.terasology.engine.rendering.nui.widgets; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/opengl/fbms/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/opengl/fbms/package-info.java index 7c8f0350a7f..f36365a12ac 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/opengl/fbms/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/opengl/fbms/package-info.java @@ -16,4 +16,4 @@ @API package org.terasology.engine.rendering.opengl.fbms; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/opengl/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/opengl/package-info.java index 70911100b7e..a8c5844c647 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/opengl/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/opengl/package-info.java @@ -4,4 +4,4 @@ @API package org.terasology.engine.rendering.opengl; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/primitives/BlockMeshGenerator.java b/engine/src/main/java/org/terasology/engine/rendering/primitives/BlockMeshGenerator.java index 12425cbee9d..8e0390d5c44 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/primitives/BlockMeshGenerator.java +++ b/engine/src/main/java/org/terasology/engine/rendering/primitives/BlockMeshGenerator.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.rendering.primitives; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.rendering.assets.mesh.Mesh; import org.terasology.engine.world.ChunkView; diff --git a/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkMesh.java b/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkMesh.java index c4a36c154af..7e22503617e 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkMesh.java +++ b/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkMesh.java @@ -14,7 +14,7 @@ import org.terasology.engine.rendering.assets.mesh.resource.VertexFloatAttributeBinding; import org.terasology.engine.rendering.assets.mesh.resource.VertexResource; import org.terasology.engine.rendering.assets.mesh.resource.VertexResourceBuilder; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.nui.Color; import org.terasology.nui.Colorc; diff --git a/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkVertexFlag.java b/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkVertexFlag.java index 38cf00dd364..d09fa73c9f8 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkVertexFlag.java +++ b/engine/src/main/java/org/terasology/engine/rendering/primitives/ChunkVertexFlag.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.rendering.primitives; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public enum ChunkVertexFlag { diff --git a/engine/src/main/java/org/terasology/engine/rendering/primitives/Tessellator.java b/engine/src/main/java/org/terasology/engine/rendering/primitives/Tessellator.java index 6d3dde87b94..376820ea00c 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/primitives/Tessellator.java +++ b/engine/src/main/java/org/terasology/engine/rendering/primitives/Tessellator.java @@ -9,7 +9,7 @@ import org.joml.Vector4f; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.engine.rendering.assets.mesh.StandardMeshData; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.rendering.assets.mesh.Mesh; import org.terasology.engine.rendering.assets.mesh.MeshData; import org.terasology.engine.utilities.Assets; diff --git a/engine/src/main/java/org/terasology/engine/rendering/primitives/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/primitives/package-info.java index b00a0084d40..e6405336666 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/primitives/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/primitives/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.primitives; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/world/WorldRenderer.java b/engine/src/main/java/org/terasology/engine/rendering/world/WorldRenderer.java index d9bbe75af62..5b29f26959e 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/world/WorldRenderer.java +++ b/engine/src/main/java/org/terasology/engine/rendering/world/WorldRenderer.java @@ -8,7 +8,7 @@ import org.terasology.engine.rendering.cameras.Camera; import org.terasology.engine.rendering.world.viewDistance.ViewDistance; import org.terasology.engine.rendering.dag.RenderGraph; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Implementations of this class are responsible for rendering the whole 3D world, diff --git a/engine/src/main/java/org/terasology/engine/rendering/world/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/world/package-info.java index 3b7a15eaf9d..a1bd9c3774e 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/world/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/world/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.world; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/rendering/world/selection/BlockSelectionRenderer.java b/engine/src/main/java/org/terasology/engine/rendering/world/selection/BlockSelectionRenderer.java index dca0d75263b..820df65da9a 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/world/selection/BlockSelectionRenderer.java +++ b/engine/src/main/java/org/terasology/engine/rendering/world/selection/BlockSelectionRenderer.java @@ -17,7 +17,7 @@ import org.terasology.engine.rendering.cameras.Camera; import org.terasology.engine.rendering.world.WorldRenderer; import org.terasology.engine.utilities.Assets; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.joml.geom.Rectanglef; import org.terasology.nui.Color; import org.terasology.nui.Colorc; diff --git a/engine/src/main/java/org/terasology/engine/rendering/world/viewDistance/package-info.java b/engine/src/main/java/org/terasology/engine/rendering/world/viewDistance/package-info.java index 26cd93ad2ad..a0af308a615 100644 --- a/engine/src/main/java/org/terasology/engine/rendering/world/viewDistance/package-info.java +++ b/engine/src/main/java/org/terasology/engine/rendering/world/viewDistance/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.rendering.world.viewDistance; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/telemetry/Metrics.java b/engine/src/main/java/org/terasology/engine/telemetry/Metrics.java index e0161d2fe1f..7aea0117e76 100644 --- a/engine/src/main/java/org/terasology/engine/telemetry/Metrics.java +++ b/engine/src/main/java/org/terasology/engine/telemetry/Metrics.java @@ -7,7 +7,7 @@ import org.terasology.engine.context.Context; import org.terasology.engine.core.module.ModuleManager; import org.terasology.gestalt.module.ModuleEnvironment; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.telemetry.metrics.Metric; import java.lang.reflect.Constructor; diff --git a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryCategory.java b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryCategory.java index f5b7fa70c88..d1f42ded2c5 100644 --- a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryCategory.java +++ b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryCategory.java @@ -2,7 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.telemetry; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; +import org.terasology.context.annotation.Index; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -16,6 +17,7 @@ @API @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface TelemetryCategory { /** * @return The id of the category. diff --git a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryField.java b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryField.java index db283c4089b..b854ed1376f 100644 --- a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryField.java +++ b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryField.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.telemetry; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryParams.java b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryParams.java index f71d3b6bd2b..dc1d2e279b8 100644 --- a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryParams.java +++ b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryParams.java @@ -5,7 +5,7 @@ import com.snowplowanalytics.snowplow.tracker.DevicePlatform; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.net.InetAddress; import java.net.NetworkInterface; diff --git a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryUtils.java b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryUtils.java index ba11312e2a4..726a44ef79b 100644 --- a/engine/src/main/java/org/terasology/engine/telemetry/TelemetryUtils.java +++ b/engine/src/main/java/org/terasology/engine/telemetry/TelemetryUtils.java @@ -12,7 +12,7 @@ import org.terasology.engine.config.facade.TelemetryConfiguration; import org.terasology.engine.context.Context; import org.terasology.engine.core.subsystem.DisplayDevice; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.registry.CoreRegistry; import org.terasology.engine.telemetry.logstash.TelemetryLogstashAppender; import org.terasology.engine.telemetry.metrics.Metric; diff --git a/engine/src/main/java/org/terasology/engine/telemetry/metrics/Metric.java b/engine/src/main/java/org/terasology/engine/telemetry/metrics/Metric.java index 466ffe94232..5f1c9db1747 100644 --- a/engine/src/main/java/org/terasology/engine/telemetry/metrics/Metric.java +++ b/engine/src/main/java/org/terasology/engine/telemetry/metrics/Metric.java @@ -10,7 +10,7 @@ import org.terasology.engine.config.facade.TelemetryConfiguration; import org.terasology.engine.context.Context; import org.terasology.engine.core.subsystem.DisplayDevice; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.registry.CoreRegistry; import org.terasology.engine.telemetry.Metrics; import org.terasology.engine.telemetry.TelemetryCategory; diff --git a/engine/src/main/java/org/terasology/engine/utilities/Assets.java b/engine/src/main/java/org/terasology/engine/utilities/Assets.java index 67a2b22100d..9900bc4da17 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/Assets.java +++ b/engine/src/main/java/org/terasology/engine/utilities/Assets.java @@ -13,7 +13,7 @@ import org.terasology.engine.audio.StaticSound; import org.terasology.engine.audio.StreamingSound; import org.terasology.engine.entitySystem.prefab.Prefab; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.gestalt.naming.Name; import org.terasology.nui.asset.UIElement; import org.terasology.engine.registry.CoreRegistry; diff --git a/engine/src/main/java/org/terasology/engine/utilities/collection/package-info.java b/engine/src/main/java/org/terasology/engine/utilities/collection/package-info.java index 1235abe09ec..e63a82c9b0c 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/collection/package-info.java +++ b/engine/src/main/java/org/terasology/engine/utilities/collection/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.utilities.collection; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/utilities/concurrency/package-info.java b/engine/src/main/java/org/terasology/engine/utilities/concurrency/package-info.java index bf54dda3866..54cee8ea146 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/concurrency/package-info.java +++ b/engine/src/main/java/org/terasology/engine/utilities/concurrency/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.utilities.concurrency; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/utilities/modifiable/ModifiableValue.java b/engine/src/main/java/org/terasology/engine/utilities/modifiable/ModifiableValue.java index 9308500b775..c566851927d 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/modifiable/ModifiableValue.java +++ b/engine/src/main/java/org/terasology/engine/utilities/modifiable/ModifiableValue.java @@ -3,7 +3,7 @@ package org.terasology.engine.utilities.modifiable; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * A helper type to get and modify the value of a component without changing its actual value. diff --git a/engine/src/main/java/org/terasology/engine/utilities/procedural/package-info.java b/engine/src/main/java/org/terasology/engine/utilities/procedural/package-info.java index 05a3d626de8..a1c70b5a6a3 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/procedural/package-info.java +++ b/engine/src/main/java/org/terasology/engine/utilities/procedural/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.utilities.procedural; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/utilities/random/DiscreteDistribution.java b/engine/src/main/java/org/terasology/engine/utilities/random/DiscreteDistribution.java index 4b77fe1301f..b16605e1b0e 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/random/DiscreteDistribution.java +++ b/engine/src/main/java/org/terasology/engine/utilities/random/DiscreteDistribution.java @@ -3,7 +3,7 @@ package org.terasology.engine.utilities.random; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.ArrayList; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/utilities/random/FastRandom.java b/engine/src/main/java/org/terasology/engine/utilities/random/FastRandom.java index 4a8ca0fbdf1..6b91faaae96 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/random/FastRandom.java +++ b/engine/src/main/java/org/terasology/engine/utilities/random/FastRandom.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.utilities.random; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Random number generator based on the Xorshift generator by George Marsaglia. diff --git a/engine/src/main/java/org/terasology/engine/utilities/random/MersenneRandom.java b/engine/src/main/java/org/terasology/engine/utilities/random/MersenneRandom.java index 05687b81b02..071e00366c9 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/random/MersenneRandom.java +++ b/engine/src/main/java/org/terasology/engine/utilities/random/MersenneRandom.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.utilities.random; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import ec.util.MersenneTwisterFast; diff --git a/engine/src/main/java/org/terasology/engine/utilities/random/PDist.java b/engine/src/main/java/org/terasology/engine/utilities/random/PDist.java index 9b7c1e0e029..799f892eb89 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/random/PDist.java +++ b/engine/src/main/java/org/terasology/engine/utilities/random/PDist.java @@ -3,7 +3,7 @@ package org.terasology.engine.utilities.random; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public class PDist { diff --git a/engine/src/main/java/org/terasology/engine/utilities/random/Random.java b/engine/src/main/java/org/terasology/engine/utilities/random/Random.java index 806d8acc196..b25e0ab94b6 100644 --- a/engine/src/main/java/org/terasology/engine/utilities/random/Random.java +++ b/engine/src/main/java/org/terasology/engine/utilities/random/Random.java @@ -5,7 +5,7 @@ import org.joml.Vector3f; import org.terasology.math.TeraMath; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/world/block/Blocks.java b/engine/src/main/java/org/terasology/engine/world/block/Blocks.java index dbcdf9e8b86..8b156d72ce8 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/Blocks.java +++ b/engine/src/main/java/org/terasology/engine/world/block/Blocks.java @@ -6,7 +6,7 @@ import org.joml.Vector3fc; import org.joml.Vector3i; import org.terasology.math.TeraMath; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * Utility class for common block-related operations. diff --git a/engine/src/main/java/org/terasology/engine/world/block/entity/damage/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/entity/damage/package-info.java index 2adef5036ff..dd3ca32236c 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/entity/damage/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/entity/damage/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.entity.damage; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/entity/neighbourUpdate/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/entity/neighbourUpdate/package-info.java index 026e5dd9c54..65348787a1b 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/entity/neighbourUpdate/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/entity/neighbourUpdate/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.entity.neighbourUpdate; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/entity/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/entity/package-info.java index fba92d9d0d3..4b418d5f85c 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/entity/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/entity/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.entity; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/entity/placement/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/entity/placement/package-info.java index 7e51d8a9519..0fbe6e32fb9 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/entity/placement/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/entity/placement/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.entity.placement; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamily.java b/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamily.java index 51ede9a36e5..236e7409e9a 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamily.java +++ b/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamily.java @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.block.family; +import org.terasology.context.annotation.IndexInherited; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.engine.world.block.Block; import org.terasology.engine.world.block.BlockUri; @@ -11,6 +12,7 @@ * This will enable such effects as players picking up a block with one orientation and it grouping * with the same block with different orientations, and placing it in different directions. */ +@IndexInherited public interface BlockFamily { ResourceUrn CUBE_SHAPE_URN = new ResourceUrn("engine:cube"); diff --git a/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamilyLibrary.java b/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamilyLibrary.java index c088902376d..c3df11579e9 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamilyLibrary.java +++ b/engine/src/main/java/org/terasology/engine/world/block/family/BlockFamilyLibrary.java @@ -33,7 +33,7 @@ public class BlockFamilyLibrary { private ClassLibrary library; public BlockFamilyLibrary(ModuleEnvironment moduleEnvironment, Context context) { - library = new DefaultModuleClassLibrary<>(moduleEnvironment, context.get(ReflectFactory.class), context.get(CopyStrategyLibrary.class)); + library = new DefaultModuleClassLibrary<>(() -> moduleEnvironment, context.get(ReflectFactory.class), context.get(CopyStrategyLibrary.class)); for (Class entry : moduleEnvironment.getTypesAnnotatedWith(RegisterBlockFamily.class)) { if (!BlockFamily.class.isAssignableFrom(entry)) { diff --git a/engine/src/main/java/org/terasology/engine/world/block/family/RegisterBlockFamily.java b/engine/src/main/java/org/terasology/engine/world/block/family/RegisterBlockFamily.java index b9ef9a8a8c2..cd95ccd8f5c 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/family/RegisterBlockFamily.java +++ b/engine/src/main/java/org/terasology/engine/world/block/family/RegisterBlockFamily.java @@ -3,6 +3,8 @@ package org.terasology.engine.world.block.family; +import org.terasology.context.annotation.Index; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -20,6 +22,7 @@ */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterBlockFamily { String value(); } diff --git a/engine/src/main/java/org/terasology/engine/world/block/family/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/family/package-info.java index 9e1b82a3e54..d2563b6a50c 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/family/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/family/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.family; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/items/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/items/package-info.java index d1e85d8136b..08ccab16e86 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/items/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/items/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.items; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinition.java b/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinition.java index 3cb463a6927..ab9cc9aaf34 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinition.java +++ b/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinition.java @@ -7,7 +7,7 @@ import org.terasology.gestalt.assets.AssetType; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.engine.world.block.shapes.BlockShape; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.world.block.BlockBuilderHelper; import org.terasology.engine.world.block.family.BlockFamily; import org.terasology.engine.world.block.family.BlockFamilyLibrary; diff --git a/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinitionData.java b/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinitionData.java index 38e63e6a4e4..8bb3e1bb9c2 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinitionData.java +++ b/engine/src/main/java/org/terasology/engine/world/block/loader/BlockFamilyDefinitionData.java @@ -6,7 +6,7 @@ import com.google.common.collect.Maps; import org.terasology.engine.world.block.family.AbstractBlockFamily; import org.terasology.gestalt.assets.AssetData; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.List; import java.util.Map; diff --git a/engine/src/main/java/org/terasology/engine/world/block/loader/EntityData.java b/engine/src/main/java/org/terasology/engine/world/block/loader/EntityData.java index f1b44e65ad2..b961b325f41 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/loader/EntityData.java +++ b/engine/src/main/java/org/terasology/engine/world/block/loader/EntityData.java @@ -3,7 +3,7 @@ package org.terasology.engine.world.block.loader; import org.terasology.engine.entitySystem.prefab.Prefab; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public class EntityData { diff --git a/engine/src/main/java/org/terasology/engine/world/block/loader/InventoryData.java b/engine/src/main/java/org/terasology/engine/world/block/loader/InventoryData.java index 18c867b805c..a66fed918c1 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/loader/InventoryData.java +++ b/engine/src/main/java/org/terasology/engine/world/block/loader/InventoryData.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.block.loader; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public class InventoryData { diff --git a/engine/src/main/java/org/terasology/engine/world/block/loader/SectionDefinitionData.java b/engine/src/main/java/org/terasology/engine/world/block/loader/SectionDefinitionData.java index 8a343d3eaf3..29b1df2b2ab 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/loader/SectionDefinitionData.java +++ b/engine/src/main/java/org/terasology/engine/world/block/loader/SectionDefinitionData.java @@ -8,7 +8,7 @@ import org.terasology.engine.world.block.DefaultColorSource; import org.terasology.engine.world.block.shapes.BlockShape; import org.terasology.engine.world.block.sounds.BlockSounds; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.world.block.BlockPart; import org.terasology.engine.world.block.tiles.BlockTile; diff --git a/engine/src/main/java/org/terasology/engine/world/block/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/package-info.java index 0a9525d8431..93d2f7e4b9c 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/regions/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/regions/package-info.java index 20c5d7d091f..5efb9da0631 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/regions/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/regions/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.regions; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/shapes/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/shapes/package-info.java index 95dbee7ab4e..77a382d23ef 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/shapes/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/shapes/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.shapes; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSounds.java b/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSounds.java index be9c8c80c67..25406607a39 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSounds.java +++ b/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSounds.java @@ -6,7 +6,7 @@ import org.terasology.gestalt.assets.AssetType; import org.terasology.gestalt.assets.ResourceUrn; import org.terasology.engine.audio.StaticSound; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.ArrayList; import java.util.Collections; diff --git a/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSoundsData.java b/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSoundsData.java index e7c5d58d918..cf26433e358 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSoundsData.java +++ b/engine/src/main/java/org/terasology/engine/world/block/sounds/BlockSoundsData.java @@ -4,7 +4,7 @@ import org.terasology.gestalt.assets.AssetData; import org.terasology.engine.audio.StaticSound; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.ArrayList; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/world/block/tiles/BlockTile.java b/engine/src/main/java/org/terasology/engine/world/block/tiles/BlockTile.java index 63c3c4f8458..27236284d05 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/tiles/BlockTile.java +++ b/engine/src/main/java/org/terasology/engine/world/block/tiles/BlockTile.java @@ -6,7 +6,7 @@ import org.terasology.gestalt.assets.Asset; import org.terasology.gestalt.assets.AssetType; import org.terasology.gestalt.assets.ResourceUrn; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.awt.image.BufferedImage; import java.util.Collections; diff --git a/engine/src/main/java/org/terasology/engine/world/block/tiles/WorldAtlas.java b/engine/src/main/java/org/terasology/engine/world/block/tiles/WorldAtlas.java index dcb212d5788..b0839788453 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/tiles/WorldAtlas.java +++ b/engine/src/main/java/org/terasology/engine/world/block/tiles/WorldAtlas.java @@ -5,7 +5,7 @@ import org.joml.Vector2f; import org.terasology.gestalt.assets.ResourceUrn; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public interface WorldAtlas { diff --git a/engine/src/main/java/org/terasology/engine/world/block/typeEntity/package-info.java b/engine/src/main/java/org/terasology/engine/world/block/typeEntity/package-info.java index 3c517815d0e..9e4de7286e9 100644 --- a/engine/src/main/java/org/terasology/engine/world/block/typeEntity/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/block/typeEntity/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.block.typeEntity; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/Chunk.java b/engine/src/main/java/org/terasology/engine/world/chunks/Chunk.java index e173844eef8..92b98ad4c97 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/Chunk.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/Chunk.java @@ -7,7 +7,7 @@ import org.joml.Vector3ic; import org.terasology.engine.world.block.Block; import org.terasology.engine.world.block.BlockRegionc; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.protobuf.EntityData; /** diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/ChunkBlockIterator.java b/engine/src/main/java/org/terasology/engine/world/chunks/ChunkBlockIterator.java index eac115c7ec0..58968d1d67a 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/ChunkBlockIterator.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/ChunkBlockIterator.java @@ -3,7 +3,7 @@ package org.terasology.engine.world.chunks; import org.joml.Vector3ic; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.world.block.Block; @API diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/Chunks.java b/engine/src/main/java/org/terasology/engine/world/chunks/Chunks.java index e4fb26954ea..043e92901e1 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/Chunks.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/Chunks.java @@ -8,7 +8,7 @@ import org.joml.Vector3fc; import org.joml.Vector3i; import org.joml.Vector3ic; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.world.block.BlockRegion; import org.terasology.engine.world.block.BlockRegionc; diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/RenderableChunk.java b/engine/src/main/java/org/terasology/engine/world/chunks/RenderableChunk.java index 0391d6f0556..b93fdd4c71f 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/RenderableChunk.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/RenderableChunk.java @@ -4,7 +4,7 @@ import org.joml.Vector3f; import org.terasology.joml.geom.AABBfc; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.rendering.primitives.ChunkMesh; /** diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraBlockDataManager.java b/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraBlockDataManager.java index c6b843984e1..3049f45b7f0 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraBlockDataManager.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraBlockDataManager.java @@ -8,7 +8,7 @@ import org.terasology.engine.context.Context; import org.terasology.engine.core.module.ModuleManager; import org.terasology.gestalt.module.ModuleEnvironment; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.world.block.Block; import org.terasology.engine.world.block.BlockManager; diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraDataSystem.java b/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraDataSystem.java index 3d2ed2024c7..cf5f7bcbd31 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraDataSystem.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/ExtraDataSystem.java @@ -3,7 +3,8 @@ package org.terasology.engine.world.chunks.blockdata; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; +import org.terasology.context.annotation.Index; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -17,5 +18,6 @@ @API @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface ExtraDataSystem { } diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/RegisterExtraData.java b/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/RegisterExtraData.java index 91034e8bc46..7d4e923733a 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/RegisterExtraData.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/blockdata/RegisterExtraData.java @@ -3,7 +3,7 @@ package org.terasology.engine.world.chunks.blockdata; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/engine/src/main/java/org/terasology/engine/world/chunks/event/package-info.java b/engine/src/main/java/org/terasology/engine/world/chunks/event/package-info.java index 1663c200805..c79b21fe958 100644 --- a/engine/src/main/java/org/terasology/engine/world/chunks/event/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/chunks/event/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.chunks.event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/generation/facets/base/package-info.java b/engine/src/main/java/org/terasology/engine/world/generation/facets/base/package-info.java index 5efb0955df7..18db9c893b9 100644 --- a/engine/src/main/java/org/terasology/engine/world/generation/facets/base/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/generation/facets/base/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.generation.facets.base; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/generation/facets/package-info.java b/engine/src/main/java/org/terasology/engine/world/generation/facets/package-info.java index 651f52311e6..046371a9b52 100644 --- a/engine/src/main/java/org/terasology/engine/world/generation/facets/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/generation/facets/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.generation.facets; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/generation/package-info.java b/engine/src/main/java/org/terasology/engine/world/generation/package-info.java index 7bb422aa5c3..cdc376f4668 100644 --- a/engine/src/main/java/org/terasology/engine/world/generation/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/generation/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.generation; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/generator/RegisterWorldGenerator.java b/engine/src/main/java/org/terasology/engine/world/generator/RegisterWorldGenerator.java index 50295a1e430..86ba8f9635d 100644 --- a/engine/src/main/java/org/terasology/engine/world/generator/RegisterWorldGenerator.java +++ b/engine/src/main/java/org/terasology/engine/world/generator/RegisterWorldGenerator.java @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.generator; +import org.terasology.context.annotation.Index; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -13,6 +15,7 @@ */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterWorldGenerator { String id(); diff --git a/engine/src/main/java/org/terasology/engine/world/generator/package-info.java b/engine/src/main/java/org/terasology/engine/world/generator/package-info.java index d942cdf8467..10860f2d7a2 100644 --- a/engine/src/main/java/org/terasology/engine/world/generator/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/generator/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.generator; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/generator/plugin/DefaultWorldGeneratorPluginLibrary.java b/engine/src/main/java/org/terasology/engine/world/generator/plugin/DefaultWorldGeneratorPluginLibrary.java index 9dfbd4d5865..9037d09b5a0 100644 --- a/engine/src/main/java/org/terasology/engine/world/generator/plugin/DefaultWorldGeneratorPluginLibrary.java +++ b/engine/src/main/java/org/terasology/engine/world/generator/plugin/DefaultWorldGeneratorPluginLibrary.java @@ -19,7 +19,7 @@ public class DefaultWorldGeneratorPluginLibrary implements WorldGeneratorPluginL private final ClassLibrary library; public DefaultWorldGeneratorPluginLibrary(ModuleEnvironment moduleEnvironment, Context context) { - library = new DefaultModuleClassLibrary<>(moduleEnvironment, context.get(ReflectFactory.class), context.get(CopyStrategyLibrary.class)); + library = new DefaultModuleClassLibrary<>(() -> moduleEnvironment, context.get(ReflectFactory.class), context.get(CopyStrategyLibrary.class)); for (Class entry : moduleEnvironment.getTypesAnnotatedWith(RegisterPlugin.class)) { if (WorldGeneratorPlugin.class.isAssignableFrom(entry)) { ResourceUrn resourceUrn = new ResourceUrn(moduleEnvironment.getModuleProviding(entry).toString(), entry.getSimpleName()); diff --git a/engine/src/main/java/org/terasology/engine/world/generator/plugin/RegisterPlugin.java b/engine/src/main/java/org/terasology/engine/world/generator/plugin/RegisterPlugin.java index 6b31dad89d7..e50a16550bc 100644 --- a/engine/src/main/java/org/terasology/engine/world/generator/plugin/RegisterPlugin.java +++ b/engine/src/main/java/org/terasology/engine/world/generator/plugin/RegisterPlugin.java @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.generator.plugin; +import org.terasology.context.annotation.Index; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -9,5 +11,6 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Index public @interface RegisterPlugin { } diff --git a/engine/src/main/java/org/terasology/engine/world/generator/plugin/package-info.java b/engine/src/main/java/org/terasology/engine/world/generator/plugin/package-info.java index da073ff36cf..43ec5b79aa6 100644 --- a/engine/src/main/java/org/terasology/engine/world/generator/plugin/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/generator/plugin/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.generator.plugin; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/package-info.java b/engine/src/main/java/org/terasology/engine/world/package-info.java index 83df44b6af1..c8e5ffc38a9 100644 --- a/engine/src/main/java/org/terasology/engine/world/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/selection/BlockSelectionComponent.java b/engine/src/main/java/org/terasology/engine/world/selection/BlockSelectionComponent.java index d4035030478..6d09b5c110c 100644 --- a/engine/src/main/java/org/terasology/engine/world/selection/BlockSelectionComponent.java +++ b/engine/src/main/java/org/terasology/engine/world/selection/BlockSelectionComponent.java @@ -7,7 +7,7 @@ import org.terasology.engine.rendering.assets.texture.Texture; import org.terasology.engine.world.block.BlockRegion; import org.terasology.gestalt.entitysystem.component.Component; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** *

diff --git a/engine/src/main/java/org/terasology/engine/world/selection/event/package-info.java b/engine/src/main/java/org/terasology/engine/world/selection/event/package-info.java index cddf691e75f..4ab769a88a3 100644 --- a/engine/src/main/java/org/terasology/engine/world/selection/event/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/selection/event/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.selection.event; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/sun/package-info.java b/engine/src/main/java/org/terasology/engine/world/sun/package-info.java index f13614ef44b..d2eb1deb1dd 100644 --- a/engine/src/main/java/org/terasology/engine/world/sun/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/sun/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.sun; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/time/package-info.java b/engine/src/main/java/org/terasology/engine/world/time/package-info.java index 34f81b4336f..bf0d2d752a4 100644 --- a/engine/src/main/java/org/terasology/engine/world/time/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/time/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.time; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/viewer/color/package-info.java b/engine/src/main/java/org/terasology/engine/world/viewer/color/package-info.java index 0c9f795a4f4..c5894c6d4bd 100644 --- a/engine/src/main/java/org/terasology/engine/world/viewer/color/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/viewer/color/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.viewer.color; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayer.java b/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayer.java index 4a9059d4274..b7637b81b61 100644 --- a/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayer.java +++ b/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayer.java @@ -3,6 +3,7 @@ package org.terasology.engine.world.viewer.layers; +import org.terasology.context.annotation.IndexInherited; import org.terasology.engine.core.Observer; import org.terasology.engine.world.generation.Region; import org.terasology.nui.Color; @@ -12,6 +13,7 @@ /** * A visual representation of a facet class */ +@IndexInherited public interface FacetLayer { /** diff --git a/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayerConfig.java b/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayerConfig.java index d1d803a873e..54b77b1b5c3 100644 --- a/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayerConfig.java +++ b/engine/src/main/java/org/terasology/engine/world/viewer/layers/FacetLayerConfig.java @@ -3,7 +3,7 @@ package org.terasology.engine.world.viewer.layers; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; @API public interface FacetLayerConfig { diff --git a/engine/src/main/java/org/terasology/engine/world/viewer/layers/engine/package-info.java b/engine/src/main/java/org/terasology/engine/world/viewer/layers/engine/package-info.java index f616cb92f96..d9a1f228bf8 100644 --- a/engine/src/main/java/org/terasology/engine/world/viewer/layers/engine/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/viewer/layers/engine/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.viewer.layers.engine; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/viewer/layers/package-info.java b/engine/src/main/java/org/terasology/engine/world/viewer/layers/package-info.java index f33be3df83f..89f3ce105e6 100644 --- a/engine/src/main/java/org/terasology/engine/world/viewer/layers/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/viewer/layers/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.viewer.layers; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/viewer/picker/package-info.java b/engine/src/main/java/org/terasology/engine/world/viewer/picker/package-info.java index 75b76f13e97..3dbb1d27dd7 100644 --- a/engine/src/main/java/org/terasology/engine/world/viewer/picker/package-info.java +++ b/engine/src/main/java/org/terasology/engine/world/viewer/picker/package-info.java @@ -3,4 +3,4 @@ @API package org.terasology.engine.world.viewer.picker; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/ConstantLayerThickness.java b/engine/src/main/java/org/terasology/engine/world/zones/ConstantLayerThickness.java index 6eab0c92798..d8887205aa8 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/ConstantLayerThickness.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/ConstantLayerThickness.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.zones; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This is a {@link LayerThickness} for a layer that has a constant, predetermined thickness at all paints. diff --git a/engine/src/main/java/org/terasology/engine/world/zones/LayerThickness.java b/engine/src/main/java/org/terasology/engine/world/zones/LayerThickness.java index 664b9dc50a0..862e35fb55e 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/LayerThickness.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/LayerThickness.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.zones; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * This function is used to determine the thickness of a {@link LayeredZoneRegionFunction} at each point on the layer. diff --git a/engine/src/main/java/org/terasology/engine/world/zones/LayeredZoneRegionFunction.java b/engine/src/main/java/org/terasology/engine/world/zones/LayeredZoneRegionFunction.java index 4f5cac177d2..ee751e09477 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/LayeredZoneRegionFunction.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/LayeredZoneRegionFunction.java @@ -6,7 +6,7 @@ import org.terasology.engine.world.chunks.Chunks; import org.terasology.engine.world.generation.Region; import org.terasology.engine.world.generation.facets.ElevationFacet; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.Comparator; import java.util.List; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/MinMaxLayerThickness.java b/engine/src/main/java/org/terasology/engine/world/zones/MinMaxLayerThickness.java index 6876ca09002..eda158330c7 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/MinMaxLayerThickness.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/MinMaxLayerThickness.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.zones; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.utilities.procedural.BrownianNoise; import org.terasology.engine.utilities.procedural.SimplexNoise; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/SeededNoiseLayerThickness.java b/engine/src/main/java/org/terasology/engine/world/zones/SeededNoiseLayerThickness.java index 9913ca784f6..da8b1b67312 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/SeededNoiseLayerThickness.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/SeededNoiseLayerThickness.java @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.engine.world.zones; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.utilities.procedural.Noise; import java.util.function.LongFunction; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/SingleBlockRasterizer.java b/engine/src/main/java/org/terasology/engine/world/zones/SingleBlockRasterizer.java index a14fbd10109..1aae3868560 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/SingleBlockRasterizer.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/SingleBlockRasterizer.java @@ -5,7 +5,7 @@ import org.terasology.engine.world.chunks.Chunk; import org.terasology.engine.world.generation.Region; import org.terasology.engine.world.generation.WorldRasterizer; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.registry.CoreRegistry; import org.terasology.engine.world.block.Block; import org.terasology.engine.world.block.BlockManager; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/Zone.java b/engine/src/main/java/org/terasology/engine/world/zones/Zone.java index 4c75742c498..fb5282f4ccf 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/Zone.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/Zone.java @@ -14,7 +14,7 @@ import org.terasology.engine.world.generation.WorldRasterizer; import org.terasology.engine.world.generator.WorldGenerator; import org.terasology.engine.world.viewer.layers.FacetLayer; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import org.terasology.engine.rendering.nui.layers.mainMenu.preview.FacetLayerPreview; import org.terasology.engine.rendering.nui.layers.mainMenu.preview.PreviewGenerator; import org.terasology.engine.world.block.Block; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/ZonePlugin.java b/engine/src/main/java/org/terasology/engine/world/zones/ZonePlugin.java index ddec7ff1628..6514d095d04 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/ZonePlugin.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/ZonePlugin.java @@ -5,7 +5,7 @@ import org.joml.Vector3ic; import org.terasology.engine.world.generation.Region; import org.terasology.engine.world.generator.plugin.WorldGeneratorPlugin; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; import java.util.function.BiPredicate; import java.util.function.BooleanSupplier; diff --git a/engine/src/main/java/org/terasology/engine/world/zones/ZoneRegionFunction.java b/engine/src/main/java/org/terasology/engine/world/zones/ZoneRegionFunction.java index 74feb535dd3..975f0888f18 100644 --- a/engine/src/main/java/org/terasology/engine/world/zones/ZoneRegionFunction.java +++ b/engine/src/main/java/org/terasology/engine/world/zones/ZoneRegionFunction.java @@ -3,7 +3,7 @@ package org.terasology.engine.world.zones; import org.terasology.engine.world.generation.Region; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API; /** * The ZoneRegionFunction determines which blocks are part of a given region. diff --git a/subsystems/DiscordRPC/build.gradle.kts b/subsystems/DiscordRPC/build.gradle.kts index 2d870a3efb8..31eb89bc173 100644 --- a/subsystems/DiscordRPC/build.gradle.kts +++ b/subsystems/DiscordRPC/build.gradle.kts @@ -17,6 +17,9 @@ configure { dependencies { implementation(project(":engine")) + + annotationProcessor("org.terasology.gestalt:gestalt-inject-java:8.0.0-SNAPSHOT") + api("com.jagrosh:DiscordIPC:0.4") constraints { diff --git a/subsystems/TypeHandlerLibrary/build.gradle.kts b/subsystems/TypeHandlerLibrary/build.gradle.kts index 9bffc3e59bc..7e376f647c7 100644 --- a/subsystems/TypeHandlerLibrary/build.gradle.kts +++ b/subsystems/TypeHandlerLibrary/build.gradle.kts @@ -23,9 +23,11 @@ dependencies { implementation("net.sf.trove4j:trove4j:3.0.3") implementation("org.terasology:reflections:0.9.12-MB") - implementation("org.terasology.nui:nui-reflect:3.0.0") - implementation("org.terasology.gestalt:gestalt-module:7.2.0") - implementation("org.terasology.gestalt:gestalt-asset-core:7.2.0") + implementation("org.terasology.nui:nui-reflect:4.0.0-SNAPSHOT") + implementation("org.terasology.gestalt:gestalt-module:8.0.0-SNAPSHOT") + implementation("org.terasology.gestalt:gestalt-asset-core:8.0.0-SNAPSHOT") + + annotationProcessor("org.terasology.gestalt:gestalt-inject-java:8.0.0-SNAPSHOT") testRuntimeOnly("org.slf4j:slf4j-simple:2.0.11") { because("log output during tests") diff --git a/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandler.java b/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandler.java index ac165f48ee8..28126bcbe79 100644 --- a/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandler.java +++ b/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandler.java @@ -2,12 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.persistence.typeHandling; +import org.terasology.context.annotation.IndexInherited; + import java.util.Optional; import java.util.function.Supplier; /** * Serializes objects of type {@link T} to and from a {@link PersistedData}. */ +@IndexInherited public abstract class TypeHandler { /** * Serializes a single non-null value. diff --git a/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandlerFactory.java b/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandlerFactory.java index e339b4edc29..cba42a0c179 100644 --- a/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandlerFactory.java +++ b/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/TypeHandlerFactory.java @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 package org.terasology.persistence.typeHandling; +import org.terasology.context.annotation.IndexInherited; import org.terasology.reflection.TypeInfo; import java.util.Optional; @@ -10,6 +11,7 @@ * Creates type handlers for a set of types. Type handler factories are generally used when a set of types * are similar in serialization structure. */ +@IndexInherited public interface TypeHandlerFactory { /** * Creates a {@link TypeHandler} for the given type {@link T}. If the type is not supported by diff --git a/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/package-info.java b/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/package-info.java index 8712133300f..86db1357b7b 100644 --- a/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/package-info.java +++ b/subsystems/TypeHandlerLibrary/src/main/java/org/terasology/persistence/typeHandling/package-info.java @@ -9,4 +9,4 @@ @API package org.terasology.persistence.typeHandling; -import org.terasology.gestalt.module.sandbox.API; +import org.terasology.context.annotation.API;