diff --git a/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/ComponentRegistryImplTest.java b/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/ComponentRegistryImplTest.java index d2b93a3f..6a42f76c 100644 --- a/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/ComponentRegistryImplTest.java +++ b/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/ComponentRegistryImplTest.java @@ -34,7 +34,7 @@ public class ComponentRegistryImplTest implements CardinalGameTest { @SuppressWarnings({"unchecked", "rawtypes"}) - @GameTest(structureName = FabricGameTest.EMPTY_STRUCTURE) + @GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE) public void checksRegisteredClasses() { ComponentRegistryImpl registry = ComponentRegistryImpl.INSTANCE; Assert.assertThrows("Component class must extend Component", IllegalArgumentException.class, () -> registry.getOrCreate(CcaTesting.TEST_ID_1, (Class) TestNotComponentItf.class)); @@ -42,7 +42,7 @@ public void checksRegisteredClasses() { registry.getOrCreate(CcaTesting.TEST_ID_2, TestComponentItf.class); } - @GameTest(structureName = FabricGameTest.EMPTY_STRUCTURE) + @GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE) public void doesNotDuplicateComponentTypes() { ComponentRegistryImpl registry = ComponentRegistryImpl.INSTANCE; Identifier id = CcaTesting.TEST_ID_1; diff --git a/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/QualifiedComponentFactoryTest.java b/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/QualifiedComponentFactoryTest.java index 8df2cf6b..e711053a 100644 --- a/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/QualifiedComponentFactoryTest.java +++ b/cardinal-components-base/src/testmod/java/dev/onyxstudios/cca/internal/base/QualifiedComponentFactoryTest.java @@ -44,7 +44,7 @@ public void tearDown() { } } - @GameTest(structureName = FabricGameTest.EMPTY_STRUCTURE) + @GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE) public void sortKeepsOrderByDefault() { Map, QualifiedComponentFactory> map = new LinkedHashMap<>(); var key1 = ComponentRegistry.getOrCreate(CcaTesting.TEST_ID_1, ComponentRegistryImplTest.TestComponentNotItf.class); @@ -65,7 +65,7 @@ public void sortKeepsOrderByDefault() { Assert.assertEquals(List.copyOf(map.keySet()), List.copyOf(sorted.keySet())); } - @GameTest(structureName = FabricGameTest.EMPTY_STRUCTURE) + @GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE) public void sortThrowsOnUnsatisfiedDependency() { Map, QualifiedComponentFactory> map = new LinkedHashMap<>(); var key1 = ComponentRegistry.getOrCreate(CcaTesting.TEST_ID_1, ComponentRegistryImplTest.TestComponentNotItf.class); @@ -76,7 +76,7 @@ public void sortThrowsOnUnsatisfiedDependency() { QualifiedComponentFactory.checkDependenciesSatisfied(map); } - @GameTest(structureName = FabricGameTest.EMPTY_STRUCTURE) + @GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE) public void sortThrowsOnCircularDependency() { Map, QualifiedComponentFactory> map = new LinkedHashMap<>(); var key1 = ComponentRegistry.getOrCreate(CcaTesting.TEST_ID_1, ComponentRegistryImplTest.TestComponentNotItf.class); @@ -95,7 +95,7 @@ public void sortThrowsOnCircularDependency() { QualifiedComponentFactory.sort(map); } - @GameTest(structureName = FabricGameTest.EMPTY_STRUCTURE) + @GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE) public void sortRespectsDependencyOrdering() { Map, QualifiedComponentFactory> map = new LinkedHashMap<>(); var key1 = ComponentRegistry.getOrCreate(CcaTesting.TEST_ID_1, ComponentRegistryImplTest.TestComponentNotItf.class); diff --git a/cardinal-components-chunk/src/testmod/java/dev/onyxstudios/cca/test/chunk/CcaChunkTestSuite.java b/cardinal-components-chunk/src/testmod/java/dev/onyxstudios/cca/test/chunk/CcaChunkTestSuite.java index a29edb30..0b126b1e 100644 --- a/cardinal-components-chunk/src/testmod/java/dev/onyxstudios/cca/test/chunk/CcaChunkTestSuite.java +++ b/cardinal-components-chunk/src/testmod/java/dev/onyxstudios/cca/test/chunk/CcaChunkTestSuite.java @@ -36,7 +36,7 @@ import net.minecraft.world.chunk.WorldChunk; public class CcaChunkTestSuite implements FabricGameTest { - @GameTest(structureName = EMPTY_STRUCTURE) + @GameTest(templateName = EMPTY_STRUCTURE) public void chunksSerialize(TestContext ctx) { ChunkPos pos = new ChunkPos(ctx.getAbsolutePos(new BlockPos(1, 0, 1))); Chunk c = new WorldChunk(ctx.getWorld(), pos); @@ -47,7 +47,7 @@ public void chunksSerialize(TestContext ctx) { ctx.complete(); } - @GameTest(structureName = EMPTY_STRUCTURE) + @GameTest(templateName = EMPTY_STRUCTURE) public void chunksTick(TestContext ctx) { int baseTicks = ctx.getWorld().getChunk(ctx.getAbsolutePos(BlockPos.ORIGIN)).getComponent(TickingTestComponent.KEY).serverTicks(); ctx.waitAndRun(5, () -> { diff --git a/cardinal-components-entity/src/testmod/java/dev/onyxstudios/cca/test/entity/CcaEntityTestSuite.java b/cardinal-components-entity/src/testmod/java/dev/onyxstudios/cca/test/entity/CcaEntityTestSuite.java index f62eec05..9d0de383 100644 --- a/cardinal-components-entity/src/testmod/java/dev/onyxstudios/cca/test/entity/CcaEntityTestSuite.java +++ b/cardinal-components-entity/src/testmod/java/dev/onyxstudios/cca/test/entity/CcaEntityTestSuite.java @@ -36,7 +36,7 @@ import net.minecraft.util.math.BlockPos; public class CcaEntityTestSuite implements FabricGameTest { - @GameTest(structureName = EMPTY_STRUCTURE) + @GameTest(templateName = EMPTY_STRUCTURE) public void bucketableWorks(TestContext ctx) { ServerPlayerEntity player = ctx.spawnServerPlayer(1, 0, 1); player.setStackInHand(Hand.MAIN_HAND, new ItemStack(Items.WATER_BUCKET)); @@ -48,7 +48,7 @@ public void bucketableWorks(TestContext ctx) { ctx.expectEntityWithDataEnd(pos, EntityType.AXOLOTL, a -> a.getComponent(Vita.KEY).getVitality(), 3); } - @GameTest(structureName = EMPTY_STRUCTURE) + @GameTest(templateName = EMPTY_STRUCTURE) public void moddedEntitiesWork(TestContext ctx) { ctx.spawnEntity(CcaEntityTestMod.TEST_ENTITY, 0, 0, 0); ctx.complete(); diff --git a/cardinal-components-level/src/testmod/java/dev/onyxstudios/cca/test/level/CcaLevelTestSuite.java b/cardinal-components-level/src/testmod/java/dev/onyxstudios/cca/test/level/CcaLevelTestSuite.java index e0359cb4..e07b9bb7 100644 --- a/cardinal-components-level/src/testmod/java/dev/onyxstudios/cca/test/level/CcaLevelTestSuite.java +++ b/cardinal-components-level/src/testmod/java/dev/onyxstudios/cca/test/level/CcaLevelTestSuite.java @@ -29,7 +29,7 @@ import net.minecraft.test.TestContext; public class CcaLevelTestSuite implements FabricGameTest { - @GameTest(structureName = EMPTY_STRUCTURE) + @GameTest(templateName = EMPTY_STRUCTURE) public void levelComponentsTick(TestContext ctx) { int baseTicks = ctx.getWorld().getLevelProperties().getComponent(TickingTestComponent.KEY).serverTicks(); ctx.waitAndRun(5, () -> { diff --git a/gradle.properties b/gradle.properties index c8f1018c..6fba43a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G #see https://modmuss50.me/fabric.html -minecraft_version=1.19-pre1 +minecraft_version=1.19 yarn_mappings=1 loader_version=0.14.5 #Fabric api @@ -11,10 +11,10 @@ fabric_api_version=0.52.4+1.19 elmendorf_version=0.6.0 #Publishing -mod_version = 5.0.0-beta.1 +mod_version = 5.0.0 curseforge_id = 318449 modrinth_id = K01OU20C -curseforge_versions = 1.19-Snapshot +curseforge_versions = 1.19 modrinth_versions = 1.19 changelog_url = https://github.com/OnyxStudios/Cardinal-Components-API/blob release_type = release diff --git a/src/testmod/java/dev/onyxstudios/componenttest/content/VitalityCondenser.java b/src/testmod/java/dev/onyxstudios/componenttest/content/VitalityCondenser.java index b8d6f218..a10e40c9 100644 --- a/src/testmod/java/dev/onyxstudios/componenttest/content/VitalityCondenser.java +++ b/src/testmod/java/dev/onyxstudios/componenttest/content/VitalityCondenser.java @@ -32,7 +32,7 @@ import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.random.AbstractRandom; +import net.minecraft.util.math.random.Random; import net.minecraft.world.World; import org.jetbrains.annotations.ApiStatus; @@ -46,7 +46,7 @@ public VitalityCondenser(Settings settings) { @SuppressWarnings("deprecation") @ApiStatus.OverrideOnly @Override - public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, AbstractRandom rand) { + public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { Vita.get(world).transferTo(Vita.get(world.getChunk(pos)), 1); } diff --git a/src/testmod/java/dev/onyxstudios/componenttest/tests/CcaTestSuite.java b/src/testmod/java/dev/onyxstudios/componenttest/tests/CcaTestSuite.java index 136e42a1..a0b2b1b3 100644 --- a/src/testmod/java/dev/onyxstudios/componenttest/tests/CcaTestSuite.java +++ b/src/testmod/java/dev/onyxstudios/componenttest/tests/CcaTestSuite.java @@ -35,7 +35,7 @@ import java.util.Objects; public final class CcaTestSuite implements FabricGameTest { - @GameTest(structureName = EMPTY_STRUCTURE) + @GameTest(templateName = EMPTY_STRUCTURE) public void interfacesGetInjected(TestContext context) { // CCA Block context.setBlockState(1, 0, 2, Blocks.CHEST);