Tags
Creators
Details
1.2+1.21.x-fabric
Compatibility
Required content
Changes
Added — new source packages (src/main/java/com/opticoreslib/, 71 files) core/ — Clock (monotonic + wall-clock split), SystemClock, ManagedService (start → stopAccepting → drain → close), ServiceState, ServiceRegistry (start in order, close in reverse), Diagnostics (rate-limited, pluggable sink, no SLF4J in core), FeatureState, Fallback, CachedProbe (TTL cache with age metadata), Ids core/sync/ — FrameCounter (instance-based, no global static), FrameFence (condition-variable waits, every wait takes a timeout) task/ — Task (+ Body/ValuedBody/noop factories), TaskContext (immutable, no Minecraft types), TaskDescriptor (+ Builder), TaskGroup, TaskGroupStats, TaskPriority, TaskResult (sealed: Success/Failure/Cancelled), SubmissionResult, SubmissionStatus (7 typed outcomes), CancellationToken, CancellationSource, CancellationScope, CancellationRegistration, CompletionDispatcher scheduler/ — TaskScheduler, DefaultTaskScheduler, SchedulerOptions (+ Builder), SchedulerStats, AgingPolicy (optional starvation mitigation), BackpressureSignal, BoundedPriorityQueue (custom bounded binary heap with coalescing) concurrent/ — ManagedExecutor, BoundedManagedExecutor, ManagedExecutorConfig (+ Builder), RejectionStrategy (ABORT/CALLER_RUNS/DROP/DISCARD_OLDEST), WorkerStats, WorkloadProfile, NamedThreadFactory resources/ — Measurement (value + Confidence + source; unknown ⇒ null, never 0), Confidence, ResourceSnapshot, GraphicsDeviceSnapshot, GraphicsApi, GraphicsCapability, ResourceProbe, GraphicsDeviceProbe, SystemResourceProbe (reflective, degrades to unknown), UnknownGraphicsDeviceProbe metrics/ — Counter, Gauge, Timer, Histogram, RollingHistogram (fixed ring buffer), Percentiles (p50/p95/p99), MetricRegistry (namespaced), MetricsSnapshot, MetricSnapshot (sealed), FrameBudget (correct EMA) integration/ — IntegrationProvider (+ VersionRange with numeric comparison), IntegrationRegistry, IntegrationContext, IntegrationState, CapabilityKey fabric/ — OpticoresLib (main entrypoint), OpticoresLibClient (client entrypoint), LibraryRuntime (lazy services, atomic shutdown) fabric/client/ — LwjglGraphicsDeviceProbe (3 strings + 1 int, no buffer allocation, VRAM reported unknown) Added — tests (17 files, 102 tests) core/ — ServiceRegistryTest, DiagnosticsTest, CachedProbeTest core/sync/ — FrameFenceTest task/ — CancellationTest, TaskDescriptorTest scheduler/ — DefaultTaskSchedulerTest (14), TaskGroupBehaviourTest (5), AgingPolicyTest (5) concurrent/ — BoundedManagedExecutorTest (8) metrics/ — MetricRegistryTest (9) resources/ — MeasurementTest (7), SystemResourceProbeTest (4) integration/ — IntegrationRegistryTest (5) fabric/ — LibraryRuntimeTest (6) — added after the shutdown bug boundary/ — PackageBoundaryTest (4) — scans compiled classes, fails if core references Minecraft/Fabric/LWJGL/OptiCores, if the library ships mixins, or if it depends on optional mods sample/ — IndependentConsumerTest — a consumer that compiles against the library knowing nothing about OptiCores Added — test fixtures (src/testFixtures/java/, separate source set, never packaged) FakeClock (deterministic, manually advanced) ManualExecutor (queued work, runs on demand) TestSupport (await/count helpers) Added — docs & config README.md (rewritten) — install, quick start, module map, guarantees, threading contract, test layout docs/BOUNDARY.md — dependency direction, module classification, what stays out, version targeting, enforcement table, audit of removed classes docs/API.md — lifecycle semantics, all 7 submission statuses, cancellation, scheduling, pools, resources, metrics, integrations, threading summary, known limitations CHANGELOG.md libs/Opticores-1.1.1+1.21.1.jar — the provided dependency Changed build.gradle — added modCompileOnly files("libs/Opticores-1.1.1+1.21.1.jar") (compile-only, not bundled, not required at runtime); added the testFixtures source set; added JUnit 5.12.2; unified version to come from gradle.properties gradle.properties — removed the machine-specific org.gradle.java.home (it would break every non-Windows CI run); pinned minecraft_version, yarn_mappings, loader_version, loom_version, fabric_api_version, junit_version; mod_version left at your 1.2.0+1.21.x-fabric src/main/resources/fabric.mod.json — added the main/client entrypoints (they were never registered before), added "suggests": { "opticores": "" }, Java >=21 .github/workflows/build.yml — Java 21 matrix, added Gradle cache .gitignore — added logs/ Removed com.opticores.lib.gpu.GPUResource and com.opticores.lib.client.gpu. — GPU pooling and shader-pack detection are consumer concerns (plan §12) opticoreslib.mixins.json + opticore.client.mixins.json + ExampleMixin + ExampleClientMixin — the library ships no mixins; the main config also referenced a class that didn't exist OpticoresLibDataGenerator — the library generates no data src/client/java/ — dead code under Loom 1.16 (unified source sets, no compileClientJava task) Old com.opticores.lib.* prototype classes — migrated and rewritten into com.opticoreslib.* Bugs fixed CLIENT_STOPPING only logged "releasing infrastructure" without releasing it — now actually closes the runtime SERVER_STOPPED was registered on clients too, so leaving a single-player world tore down the client runtime — now dedicated-server only fabric.mod.json declared no entrypoints, so initializers never ran VersionRange.atLeast() was implemented as "exact" — now genuinely unbounded above MetricRegistry gauge factory had an invalid method reference; Counter.increment() returned void BoundedManagedExecutor double-counted rejections (handler + caller) FrameBudget's EMA was mathematically wrong and used a DoubleAdder as a scalar FrameFence busy-waited with Thread.onSpinWait() and offered an unbounded wait IntegrationProvider.VersionRange couldn't express "no upper bound" unregisterGroup purged pending tasks after removing the group, so it purged nothing installRuntime mixed state with platform glue and broke in tests without a Fabric Loader
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:nKLdWWuR:Mt0x9KOU"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:nKLdWWuR:Mt0x9KOU"
}

