Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import kotlin.reflect.KClass

/**
* Client-side mirror of a [DataSpec], built lazily as [DataSpec.client]. Every `boolean`/
* `int`/... method here is called by its [DataSpec] counterpart (via [DataSpec.onClient])
* `int`/... method here is called by its [DataSpec] counterpart (via [net.kernelpanicsoft.archie.util.onClient])
* with matching parameters, and queues a [ConfigEntryBuilder]-based entry that reads from and
* writes back into the same backing maps on [spec]. [buildRoot]/[buildSub] then turn the queued
* entries into an actual Cloth Config [ConfigCategory]/[SubCategoryListEntry]. None of this is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ abstract class DataSpec(val title: Component, val id: String = title.string.toSn
*/
open val isEnabled: Boolean = true

/** Registers [subcategories] as fields on this category, recursively. */
/** Registers [CategorySpec.subcategories] as fields on this category, recursively. */
internal open fun init()
{
SerializationManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.nio.file.StandardCopyOption
* implementations live in `net.kernelpanicsoft.archie.config.serializer`; [ConfigSpec.fileSerializer]
* picks one per-platform by default.
*
* [configPath], [load], and [save] all take a [configFolder] that defaults to the platform's shared
* [configPath], [load], and [save] all take a `configFolder` that defaults to the platform's shared
* config folder ([Platform.getConfigFolder]); [ConfigSpec] passes its own [ConfigSpec.configFolder]
* instead, which a [ConfigSpec.Server] repoints at the current world's per-save `serverconfig/` folder.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface LayerManagerProvider
* (`compileOnly` in `common`, `runtimeLibrary` - present for local runs, never bundled - in the
* loader modules; see `common/build.gradle.kts`). [ComposeScreen] is loaded by every screen in
* the mod, so its own class file must never reference a symbol that isn't resolvable in a real
* player's game; only [AClientGameTestHarness]'s method bodies (never invoked outside
* player's game; only `AClientGameTestHarness`'s method bodies (never invoked outside
* `AGameTestPlatform.isGameTest`) construct the actual `StandardTestDispatcher`/
* `TestCoroutineScheduler` instances installed here.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fun Modifier.hoverable(
}

/**
* Emits [PressInteraction] and invokes [onPress]/[onRelease] across a press - the
* Emits [PressInteraction] and invokes [onPress] across a press - the
* `net.kernelpanicsoft.archie` equivalent of the press-recognition half of Compose
* Foundation's `Modifier.clickable`. Observe release via
* [net.kernelpanicsoft.archie.gui.interaction.collectIsPressedAsState] rather than a callback -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ data class SimpleThemeState(
data class StatefulTheme(val states: Map<String, ThemeState>)

/**
* Inner spacing a composable using a theme should reserve around its own [content], so e.g. a
* Inner spacing a composable using a theme should reserve around its own content, so e.g. a
* button's label never renders flush against the button's edges once it grows past
* [ComposableTheme.minSize] to fit a longer label.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import net.minecraft.resources.ResourceLocation
*/
object AConditionBuilder
{
/** [AAndCondition] of `this` and [other]. */


fun and(vararg values: IACondition): IACondition = AAndCondition(*values)
fun or(vararg values: IACondition): IACondition = AOrCondition(*values)
fun xor(vararg values: IACondition): IACondition = AXorCondition(*values)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal object ADataGeneratorPlatformInternal
* Appends one [EntrypointContainer] per mod in [ADatagenEvents.MODS] to
* [dataGeneratorInitializers], each of which fires [ADatagenEvents.GATHER_DATA] with an
* [ADataGeneratorFabric] for that mod. No-op outside a datagen run
* ([ADataGeneratorPlatform.isDataGen] false).
* ([net.kernelpanicsoft.archie.data.platform.ADataGeneratorPlatform.isDataGen] false).
*/
@JvmStatic
@JvmName("addEntrypoints")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ interface TestInput {
/**
* Builds a test world from [ClientGameTestContext.worldBuilder]: either a singleplayer world via
* [create]/[withSingleplayer], or a same-JVM dedicated server via [createServer]/[withServer] for
* tests that need a real client鈫攕erver boundary (e.g. exercising [ConfigSpec.Server] sync or
* tests that need a real client鈫攕erver boundary (e.g. exercising [net.kernelpanicsoft.archie.config.ConfigSpec.Server] sync or
* other multiplayer-only codepaths) rather than the integrated server a singleplayer world uses.
*/
@Suppress("unused")
Expand Down Expand Up @@ -1493,13 +1493,13 @@ data class AClientGameTestSummary(
val failedDetails: List<AClientGameTestFailure> = emptyList(),
)

/**
* Runs every [ClientGameTest]-annotated method across [modToClasses] (as collected by
* [AGameTestPlatform.register] via [AGameTestEventObject]/`AGametestEvents.ArchieGameTestBuilder`'s
* `client { }` block) sequentially on the client thread, then returns to the title screen.
* No-ops (returning an all-zero summary) unless [side] is [AGameTestSide.CLIENT].
*/
object AClientGameTestHarness {
/**
* Runs every [ClientGameTest]-annotated method across [modToClasses] (as collected by
* [AGameTestPlatform.register] via [AGameTestEventObject]/`AGametestEvents.ArchieGameTestBuilder`'s
* `client { }` block) sequentially on the client thread, then returns to the title screen.
* No-ops (returning an all-zero summary) unless [side] is [AGameTestSide.CLIENT].
*/
@OptIn(ExperimentalCoroutinesApi::class)
fun run(modToClasses: Map<Mod, List<Class<*>>>, side: AGameTestSide?): AClientGameTestSummary {
if (side != AGameTestSide.CLIENT) return AClientGameTestSummary(passed = 0, failed = 0, skipped = 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestNodeScope(
) {
/**
* Waits for compose to settle before reading [node]'s on-screen bounds - without this, a
* node's very first interaction (right after [ComposeScreenTestContext.waitForScreen]/
* node's very first interaction (right after [waitForScreen]/
* [ComposeScreenTestContext.node] finds it) can read a transient pre-layout-settle position
* (e.g. before a wrapping Scrollable's initial measure has stabilized), computing a click/
* hover target that no longer matches the node's real bounds one frame later - silently
Expand All @@ -51,7 +51,7 @@ class TestNodeScope(
context.getInput().click(x, y, button)
}

/** Moves the cursor to the center of this node's on-screen bounds, without clicking - e.g. to assert a [TextureStates.FOCUSED] visual state. */
/** Moves the cursor to the center of this node's on-screen bounds, without clicking - e.g. to assert a [net.kernelpanicsoft.archie.gui.composables.theme.TextureStates.FOCUSED] visual state. */
fun hover() {
val (x, y) = centerCoords()
context.getInput().setCursor(x, y)
Expand Down Expand Up @@ -79,7 +79,7 @@ class TestNodeScope(
}

/**
* The [TextureStates] key this node's [net.kernelpanicsoft.archie.gui.layout.Renderer] most
* The [net.kernelpanicsoft.archie.gui.composables.theme.TextureStates] key this node's [net.kernelpanicsoft.archie.gui.layout.Renderer] most
* recently selected to draw (e.g. `"hovered"`), or `null` if this node doesn't render a
* theme-state-driven visual. See [net.kernelpanicsoft.archie.gui.nodes.UINode.renderState].
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import net.minecraft.gametest.framework.GameTest
import net.minecraft.gametest.framework.GameTestHelper

/**
* A trivially-succeeding placeholder, registered by [AGameTestPlatformInternal] on each loader
* A trivially-succeeding placeholder, registered by `AGameTestPlatformInternal` on each loader
* when a mod's [net.kernelpanicsoft.archie.gametest.platform.AGameTestModFilter]-selected suite has no real test functions for the current
* [net.kernelpanicsoft.archie.gametest.platform.AGameTestSide] - e.g. a mod with only client-side coverage (like Archie-Test, whose own suite
* registers just [net.kernelpanicsoft.archie.test.gametest.TestScreenGameTest]) running its
* registers just `net.kernelpanicsoft.archie.test.gametest.TestScreenGameTest`) running its
* server invocation. Vanilla's `GameTestServer` refuses to boot with zero registered test
* functions at all (`IllegalArgumentException: No test functions were given!`); this keeps that
* boot trivially satisfied instead of crashing the whole invocation.
Expand Down
Loading