Skip to content

JamLib 2#30

Merged
Jamalam360 merged 16 commits into
mainfrom
feat/jamlib-2
Apr 26, 2026
Merged

JamLib 2#30
Jamalam360 merged 16 commits into
mainfrom
feat/jamlib-2

Conversation

@Jamalam360
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a major “JamLib 2” refactor intended to remove the Architectury API dependency by introducing JamLib-owned platform abstractions, events, and networking, while reorganizing packages into api vs impl and adding deprecated shims for compatibility.

Changes:

  • Removes Architectury dependency declarations from mod metadata and Gradle build files.
  • Adds new JamLib APIs for platform detection (Platform/ModInfo), events (Event, CancellableEvent, InteractionEvent), and networking (Network + payload types).
  • Repackages implementation code under *.impl.* and adds a deprecated source set to keep legacy APIs compiling.

Reviewed changes

Copilot reviewed 93 out of 93 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
testmod-neoforge/src/main/resources/META-INF/neoforge.mods.toml Removes Architectury dependency
testmod-neoforge/build.gradle Drops Architectury NeoForge dependency
testmod-fabric/src/main/resources/fabric.mod.json Adds client entrypoint; removes Architectury dep
testmod-fabric/src/main/java/io/github/jamalam360/testmod/fabric/TestModClientFabric.java New Fabric client initializer
testmod-fabric/build.gradle Drops Architectury Fabric dependency
testmod-common/src/main/java/io/github/jamalam360/testmod/network/PotatoPacket.java Adds demo payload type
testmod-common/src/main/java/io/github/jamalam360/testmod/item/PacketPotatoItem.java Adds demo item sending packet
testmod-common/src/main/java/io/github/jamalam360/testmod/config/TestConfig.java Migrates imports to new config API
testmod-common/src/main/java/io/github/jamalam360/testmod/config/QuickerConnectButtonTestConfig.java Migrates imports to new config API
testmod-common/src/main/java/io/github/jamalam360/testmod/TestModClient.java Adds demo client-side packet handler
testmod-common/src/main/java/io/github/jamalam360/testmod/TestMod.java Switches to new Platform/events/network APIs
testmod-common/build.gradle Drops Architectury common dependency
neoforge/src/main/resources/META-INF/neoforge.mods.toml Removes Architectury dependency block
neoforge/src/main/java/io/github/jamalam360/jamlib/impl/neoforge/JamLibNeoForgeClient.java Updates packages/imports for new API/impl layout
neoforge/src/main/java/io/github/jamalam360/jamlib/impl/neoforge/JamLibNeoForge.java Updates package to impl.neoforge
neoforge/src/main/java/io/github/jamalam360/jamlib/api/platform/neoforge/PlatformImpl.java Adds NeoForge platform hooks (location TBD)
neoforge/build.gradle Drops Architectury dep + publishing relations + token substitution
libs.versions.toml Removes Architectury Fabric/NeoForge library entries
gradle.properties Bumps version to 2.0.0; removes min Architectury property
fabric/src/main/resources/fabric.mod.json Updates entrypoints; removes Architectury dep
fabric/src/main/java/io/github/jamalam360/jamlib/impl/fabric/network/fabric/PlatformNetworkImpl.java Adds Fabric networking send impl
fabric/src/main/java/io/github/jamalam360/jamlib/impl/fabric/config/ModMenuCompatibility.java Moves ModMenu integration under impl
fabric/src/main/java/io/github/jamalam360/jamlib/impl/fabric/JamLibFabric.java New Fabric entrypoint wiring networking
fabric/src/main/java/io/github/jamalam360/jamlib/impl/fabric/JamLibClientFabric.java New Fabric client entrypoint wiring networking
fabric/src/main/java/io/github/jamalam360/jamlib/fabric/JamLibFabric.java Removes old Fabric entrypoint class
fabric/src/main/java/io/github/jamalam360/jamlib/fabric/JamLibClientFabric.java Removes old Fabric client entrypoint class
fabric/src/main/java/io/github/jamalam360/jamlib/api/platform/fabric/PlatformImpl.java Adds Fabric platform hooks (location TBD)
fabric/build.gradle Drops Architectury dep + token substitution
common/src/main/resources/jamlib.mixins.json Updates mixin base package; adds server interaction mixin
common/src/main/java/io/github/jamalam360/jamlib/impl/package-info.java Marks impl as @ApiStatus.Internal
common/src/main/java/io/github/jamalam360/jamlib/impl/mixin/event/ServerPlayerGameModeMixin.java Adds server-side interaction event injection
common/src/main/java/io/github/jamalam360/jamlib/impl/fabric/network/PlatformNetwork.java Introduces ExpectPlatform-based networking bridge
common/src/main/java/io/github/jamalam360/jamlib/impl/fabric/network/JamLibPacket.java Adds internal multiplexing packet + codec
common/src/main/java/io/github/jamalam360/jamlib/impl/JarRenamingChecker.java Moves jar checker into impl
common/src/main/java/io/github/jamalam360/jamlib/api/platform/Platform.java New platform API (ExpectPlatform + mod loader detection)
common/src/main/java/io/github/jamalam360/jamlib/api/platform/ModLoader.java New mod loader enum
common/src/main/java/io/github/jamalam360/jamlib/api/platform/ModInfo.java New mod metadata record
common/src/main/java/io/github/jamalam360/jamlib/api/network/StreamCodecNetworkPayloadType.java Adds StreamCodec-backed payload type helper
common/src/main/java/io/github/jamalam360/jamlib/api/network/PayloadType.java Adds payload identifier wrapper
common/src/main/java/io/github/jamalam360/jamlib/api/network/NetworkPayloadType.java Adds payload type serializer/deserializer contract
common/src/main/java/io/github/jamalam360/jamlib/api/network/NetworkPayloadHandler.java Adds handler functional interface
common/src/main/java/io/github/jamalam360/jamlib/api/network/NetworkContext.java Adds network context record
common/src/main/java/io/github/jamalam360/jamlib/api/network/Network.java Adds high-level network registration/send/receive
common/src/main/java/io/github/jamalam360/jamlib/api/events/core/EventResult.java Adds core event result type
common/src/main/java/io/github/jamalam360/jamlib/api/events/core/Event.java Adds prioritized event base
common/src/main/java/io/github/jamalam360/jamlib/api/events/core/CancellableEvent.java Adds cancellable event type
common/src/main/java/io/github/jamalam360/jamlib/api/events/InteractionEvent.java Adds interaction event definitions
common/src/main/java/io/github/jamalam360/jamlib/api/events/EventResult.java Adds duplicate EventResult in different package
common/src/main/java/io/github/jamalam360/jamlib/api/config/WithinRange.java Moves annotation into api.config
common/src/main/java/io/github/jamalam360/jamlib/api/config/Slider.java Moves annotation into api.config
common/src/main/java/io/github/jamalam360/jamlib/api/config/RequiresRestart.java Moves annotation into api.config
common/src/main/java/io/github/jamalam360/jamlib/api/config/MatchesRegex.java Moves annotation into api.config
common/src/main/java/io/github/jamalam360/jamlib/api/config/HiddenInGui.java Moves annotation into api.config + doc tweak
common/src/main/java/io/github/jamalam360/jamlib/api/config/ConfigManager.java Migrates ConfigManager to new Platform API
common/src/main/java/io/github/jamalam360/jamlib/api/config/ConfigExtensions.java Moves extensions interface into api.config
common/src/main/java/io/github/jamalam360/jamlib/JamLib.java Switches init logging + adds expectPlatform() helper
common/src/deprecated/java/io/github/jamalam360/jamlib/events/client/ClientPlayLifecycleEvents.java Deprecates old events + bridges to new ones
common/src/deprecated/java/io/github/jamalam360/jamlib/config/WithinRange.java Adds deprecated compatibility annotation
common/src/deprecated/java/io/github/jamalam360/jamlib/config/Slider.java Adds deprecated compatibility annotation
common/src/deprecated/java/io/github/jamalam360/jamlib/config/RequiresRestart.java Adds deprecated compatibility annotation
common/src/deprecated/java/io/github/jamalam360/jamlib/config/MatchesRegex.java Adds deprecated compatibility annotation
common/src/deprecated/java/io/github/jamalam360/jamlib/config/HiddenInGui.java Adds deprecated compatibility annotation
common/src/deprecated/java/io/github/jamalam360/jamlib/config/ConfigManager.java Adds deprecated wrapper around new ConfigManager
common/src/deprecated/java/io/github/jamalam360/jamlib/config/ConfigExtensions.java Adds deprecated wrapper around new ConfigExtensions
common/src/deprecated/java/io/github/jamalam360/jamlib/JamLibPlatform.java Deprecates old platform API and bridges to new
common/src/client/resources/jamlib.client.mixins.json Updates client mixin base package; adds interaction mixin
common/src/client/java/io/github/jamalam360/jamlib/client/impl/mixinsupport/MutableSpriteImageWidget$Sprite.java Moves mixin support package to client.impl
common/src/client/java/io/github/jamalam360/jamlib/client/impl/mixin/event/MultiPlayerGameModeMixin.java Adds client-side interaction event injection
common/src/client/java/io/github/jamalam360/jamlib/client/impl/mixin/event/ConnectionMixin.java Updates to new event API + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/mixin/event/ClientPacketListenerMixin.java Updates to new event API + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/mixin/ImageWidget$SpriteMixin.java Moves mixin package to client.impl
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/StringConfigEntry.java Package move for config GUI
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/SliderButton.java Package move for config GUI
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/NumberConfigEntry.java Updates imports to new config annotations
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/ListMemberConfigField.java Updates ConfigManager import + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/ListConfigEntry.java Updates WidgetList/ConfigExtensions imports + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/FieldConfigField.java Updates ConfigManager import + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/EnumConfigEntry.java Updates ConfigScreen import + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/EnumButton.java Package move for config GUI
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/ConfigField.java Updates ConfigManager import + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/ConfigEntry.java Updates config/gui imports + package move
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/entry/BooleanConfigEntry.java Package move for config GUI
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/SelectionListEntry.java Package move for config GUI
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/SelectionList.java Package move for config GUI
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/SelectConfigScreen.java Uses new Platform/ModInfo API for titles
common/src/client/java/io/github/jamalam360/jamlib/client/impl/config/ConfigScreen.java Uses new Platform/ModInfo API for titles
common/src/client/java/io/github/jamalam360/jamlib/client/impl/JamLibClient.java Switches to new client lifecycle event API
common/src/client/java/io/github/jamalam360/jamlib/client/config/gui/entry/package-info.java Removes old internal package-info
common/src/client/java/io/github/jamalam360/jamlib/client/api/gui/WidgetList.java Moves WidgetList to client.api.gui
common/src/client/java/io/github/jamalam360/jamlib/client/api/events/ClientPlayLifecycleEvents.java Adds new client lifecycle event API
common/build.gradle Adds deprecated source set + jars it
README.md Mentions Events + Networking
CHANGELOG.md Updates changelog for Architectury removal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread common/build.gradle
Comment thread common/src/main/java/io/github/jamalam360/jamlib/api/events/EventResult.java Outdated
@Jamalam360 Jamalam360 merged commit d4139b2 into main Apr 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants