Skip to content

Feat/26.1 support#965

Merged
AlexProgrammerDE merged 4 commits intomainfrom
feat/26.1-support
Mar 29, 2026
Merged

Feat/26.1 support#965
AlexProgrammerDE merged 4 commits intomainfrom
feat/26.1-support

Conversation

@AlexProgrammerDE
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 29, 2026 17:59
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

Updates the project for “26.1” (Minecraft + related API changes), adjusting mixins, inventory interactions, item registry lookups, and launcher/runtime behavior to match the new upstream signatures.

Changes:

  • Bump Minecraft/ViaFabricPlus versions and simplify shared dependencies.
  • Migrate inventory clicking/interactions to new APIs (ContainerInput, updated interact(...) signature) and update item ID lookup (typeHolder()).
  • Update/remove mixins and adjust launcher Minecraft download/injection behavior for the new version.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shared/build.gradle.kts Removes intermediary/tiny-remapper deps no longer needed for the new setup.
mod/build.gradle.kts Updates Minecraft dependency/version and ViaFabricPlus version.
mod/src/test/java/com/soulfiremc/test/PathfindingTest.java Updates test ItemStack creation for new component/holder APIs.
mod/src/main/resources/soulfire.mixins.json Removes headless window mixin entry.
mod/src/main/java/com/soulfiremc/server/util/MouseClickHelper.java Updates entity interaction call signature.
mod/src/main/java/com/soulfiremc/server/script/nodes/data/GetTimeNode.java Adjusts time-of-day calculation for new API surface.
mod/src/main/java/com/soulfiremc/server/script/nodes/data/GetInventoryNode.java Switches item ID lookup to typeHolder().
mod/src/main/java/com/soulfiremc/server/script/nodes/data/FindItemNode.java Switches item ID lookup to typeHolder() and filtering accordingly.
mod/src/main/java/com/soulfiremc/server/script/nodes/action/DropSlotNode.java Migrates inventory click handling to handleContainerInput + ContainerInput.
mod/src/main/java/com/soulfiremc/server/script/nodes/action/DropItemNode.java Migrates inventory click handling to handleContainerInput + ContainerInput.
mod/src/main/java/com/soulfiremc/server/script/nodes/action/ClickSlotNode.java Migrates click types to ContainerInput and updates click dispatch.
mod/src/main/java/com/soulfiremc/server/plugins/ForwardingBypass.java Updates custom query payload handling for new login custom query APIs.
mod/src/main/java/com/soulfiremc/server/plugins/AutoTotem.java Migrates inventory clicks to handleContainerInput.
mod/src/main/java/com/soulfiremc/server/plugins/AutoEat.java Migrates inventory clicks to handleContainerInput.
mod/src/main/java/com/soulfiremc/server/plugins/AutoArmor.java Migrates inventory clicks to handleContainerInput.
mod/src/main/java/com/soulfiremc/server/pathfinding/execution/ItemPlaceHelper.java Migrates inventory clicks to handleContainerInput.
mod/src/main/java/com/soulfiremc/server/grpc/BotServiceImpl.java Updates item ID lookup + click handling to new APIs.
mod/src/main/java/com/soulfiremc/server/command/builtin/InventoryCommand.java Updates item formatting + click handling to new APIs.
mod/src/main/java/com/soulfiremc/server/command/builtin/InteractCommand.java Updates entity interaction call signature.
mod/src/main/java/com/soulfiremc/mod/mixin/soulfire/optimization/MixinDataFixers.java Updates injected method signature for new upstream parameters.
mod/src/main/java/com/soulfiremc/mod/mixin/soulfire/botfixes/MixinChatComponent.java Updates GuiMessage import location.
mod/src/main/java/com/soulfiremc/mod/mixin/soulfire/api/event/MixinChatComponent.java Updates GuiMessage import location.
mod/src/main/java/com/soulfiremc/mod/mixin/soulfire/MixinMinecraft.java Updates injection target descriptor for changed constructor signature.
mod/src/main/java/com/soulfiremc/mod/mixin/headless/rendering/MixinWindow.java Removes mixin no longer referenced/needed.
mod/src/main/java/com/soulfiremc/mod/mixin/headless/rendering/MixinScreen.java Updates headless screen background hook for new method/type.
mod/src/main/java/com/soulfiremc/mod/mixin/headless/rendering/MixinBlockModelShaper.java Updates headless model shaper mixin to new classes/method names.
launcher/src/main/java/com/soulfiremc/launcher/mixin/MixinMinecraftGameProvider.java Removes launcher-side remapping mixin.
launcher/src/main/java/com/soulfiremc/launcher/mixin/MixinMappingConfiguration.java Removes launcher-side namespace override mixin.
launcher/src/main/java/com/soulfiremc/launcher/mixin/MixinFabricMixinBootstrap.java Removes launcher-side mixin bootstrap redirection.
launcher/src/main/java/com/soulfiremc/launcher/mixin/MixinFabricLoaderImpl.java Removes launcher-side dev-env redirection.
launcher/src/main/java/com/soulfiremc/launcher/SFMinecraftDownloader.java Simplifies downloader/injection flow and defaults to official namespace.
Comments suppressed due to low confidence (1)

mod/src/main/java/com/soulfiremc/server/script/nodes/data/GetTimeNode.java:68

  • dayTime is being derived from level.getLevelData().getGameTime(), which is the total game tick counter (same concept as level.getGameTime()) and not the time-of-day value that cycles every 24000 ticks and can be changed via /time set. This makes the dayTime output and isDay/isNight potentially incorrect. Use the level's day-time field instead (e.g., level.getLevelData().getDayTime() / equivalent in this version) and align the isDay range with the node metadata description (currently says 6000–18000 but code uses 0–12000).
    var gameTime = level.getGameTime();
    var dayTime = level.getLevelData().getGameTime() % 24000;
    // Day is roughly 0-12000 (6am-6pm), night is 12000-24000 (6pm-6am)
    // More precisely: 0=6am, 6000=noon, 12000=6pm, 18000=midnight
    var isDay = dayTime >= 0 && dayTime < 12000;


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

Comment on lines +159 to +163
payload.write(buf);
if (buf.readableBytes() == 1) {
requestedForwardingVersion = buf.readByte();
}
buf.release();
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The temporary FriendlyByteBuf allocated to parse requestedForwardingVersion is released only on the happy path. If payload.write(buf) or the subsequent reads throw, the underlying ByteBuf won’t be released. Use try/finally to guarantee buf.release() (or use a helper that auto-releases).

Suggested change
payload.write(buf);
if (buf.readableBytes() == 1) {
requestedForwardingVersion = buf.readByte();
}
buf.release();
try {
payload.write(buf);
if (buf.readableBytes() == 1) {
requestedForwardingVersion = buf.readByte();
}
} finally {
buf.release();
}

Copilot uses AI. Check for mistakes.
Comment on lines +177 to +184
var response = new ServerboundCustomQueryAnswerPacket(transactionId, new ByteBufCustomQueryAnswerPayload(forwardingData));
Objects.requireNonNull(connection.minecraft().getConnection()).send(response);
}

private record ByteBufCustomQueryAnswerPayload(ByteBuf data) implements CustomQueryAnswerPayload {
@Override
public void write(FriendlyByteBuf buf) {
buf.writeBytes(data.duplicate());
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

createForwardingData() builds a composite ByteBuf (wrapped around other buffers) and the new ByteBufCustomQueryAnswerPayload stores it without any clear ownership/release. Since this runs on every login query, it risks leaking ByteBufs over time. Prefer copying the buffer into a byte[] (or an unpooled, non-refcounted representation) and releasing the original ByteBuf immediately after constructing the packet, or ensure the payload/packet lifecycle releases (or retains) the underlying buffer appropriately.

Suggested change
var response = new ServerboundCustomQueryAnswerPacket(transactionId, new ByteBufCustomQueryAnswerPayload(forwardingData));
Objects.requireNonNull(connection.minecraft().getConnection()).send(response);
}
private record ByteBufCustomQueryAnswerPayload(ByteBuf data) implements CustomQueryAnswerPayload {
@Override
public void write(FriendlyByteBuf buf) {
buf.writeBytes(data.duplicate());
byte[] forwardingBytes = new byte[forwardingData.readableBytes()];
forwardingData.getBytes(forwardingData.readerIndex(), forwardingBytes);
forwardingData.release();
var response =
new ServerboundCustomQueryAnswerPacket(
transactionId, new ByteBufCustomQueryAnswerPayload(forwardingBytes));
Objects.requireNonNull(connection.minecraft().getConnection()).send(response);
}
private record ByteBufCustomQueryAnswerPayload(byte[] data) implements CustomQueryAnswerPayload {
@Override
public void write(FriendlyByteBuf buf) {
buf.writeBytes(data);

Copilot uses AI. Check for mistakes.
@AlexProgrammerDE AlexProgrammerDE merged commit 24ca5e0 into main Mar 29, 2026
7 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