Skip to content

remove injection.mixin.features.v1_6_1.MixinAbstractContainerScreen and add new mixins recreating shift click behavior in specific containers in certain version ranges - #1323

Open
Socketlike wants to merge 36 commits into
ViaVersion:ver/26.3from
Socketlike:ver/26.2
Open

Socketlike wants to merge 36 commits into
ViaVersion:ver/26.3from
Socketlike:ver/26.2

Conversation

@Socketlike

@Socketlike Socketlike commented Sep 14, 2026 •

Copy link
Copy Markdown

removing injection.mixin.features.v1_6_1.MixinAbstractContainerScreen readds generic item shift clicking in containers to legacy versions like 1.2.5

though in some scenarios that would cause desyncs so i have made new mixins that tries to prevent those desyncs from happening

there is one desync in the furnace menu i haven't fixed.. for example on 1.2.5 shift clicking logs into a furnace will place it in the smelting slot instead of the current modern behavior which is placing it in the fuel slot, causing a desync, though if you put the log in the fuel slot manually it works just fine.. old minecraft jank?

but how would i even go about checking the item? do i make new recipepropertysets with smeltable / fuel items on each version range? please help!!

i don't have much experience in minecraft modding so if i make any mistakes please tell me how to fix them.. thank you!

(also please squash merge)

@lowercasebtw

Copy link
Copy Markdown
Collaborator

Replace your mixin extras usage w/ normal mixins

WrapOp -> Redirect, etc


@Redirect(method = "quickMoveStack", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/inventory/Slot;hasItem()Z"))
private boolean disableShiftClickInChests(Slot instance) {
return instance.hasItem() && ViaFabricPlus.api().targetVersion().newerThanOrEqualTo(LegacyProtocolVersion.b1_5tob1_5_2);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is wrong. b1.5 allows shift clicking in chests

@Socketlike Socketlike Sep 14, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the mixin here allows for shift clicking on b1.5+
it only disables shift clicking if the target version is lower than b1.5
should i rename the function or alter the code or just move the mixin to a lower version to make it more clear?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I couldn't shift click on a b1.5 server with your PR, so something is wrong

@Socketlike Socketlike Sep 15, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

that's strange. i'll try to fix it in a couple of hours

in theory if that breaks then shift clicking in chests is broken even past b1.5

@Socketlike Socketlike Sep 16, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i tried current upstream with just the v1.6.1 container mixin removed and it still doesn't let me shift click.. which probably means some other mixin is interfering with shift clicking / cancelling shift clicking

i dug around a bit and it's this one conditional in v1_15_2.MixinMultiPlayerGameMode#removeClickActions that cancels every container click action that isn't "picking up" (i assume this is grabbing an item with the cursor?) on b1.5 and older

i removed it and shift clicking into chests work again but there's now a new desync because shift clicking out of chests on modern moves the target item to a different slot than b1.5 but it's fixable

may i ask what this specific cancel was for?

@Socketlike Socketlike Sep 18, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

is there a way to target only certain versions that is in a group of versions, or get the server's specific version?

i'm trying to disable max craft (max craft example: putting 64 logs into the crafting grid and shift clicking on the output slot will produce 4 stacks of planks) while shift clicking on b1.6.5 to below b1.8 because it's disabled in this version range (b1.6 to below b1.6.5 can still do max crafts while shift clicking)
but i can only target the whole b1.6.x group (LegacyProtocolVersion.b1_6tob1_6_6)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Beta 1.6-Beta 1.6.6 have the same protocol version, so its impossible for a server to detect which client version is actually used and its also not possible for ViaFabricPlus to know the server version. Mojang shouldn't have introduced breaking changes without changing the protocol version. The safe behaviour for VFP is to not allow max crafts while shift clicking in b1.6.x (Especially because b1.6.6 also doesn't allow it and its the latest version from that group)

@Socketlike Socketlike Sep 18, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i disabled max crafts on the client on the full b1.6.x range but the client now desyncs if you shift click the output slot on a b1.6 to below b1.6.5 server
the server just doesn't care and it just does the max craft server sided anyways..

this is completely unavoidable so it just have to be like this i assume

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shift clicking should do nothing then (not send a packet or execute any clientside window clicking logic) instead of letting a desync happen

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

alright shift clicking does nothing now

i think that's all? i've tested most versions from b1.0 up to 1.12.2 and it seems to be all fine

@florianreuth

Copy link
Copy Markdown
Member

Is there anything left now? Going to @RaphiMC one last time, but will probably delay this for after ver/26.3 if that's fine.

@Socketlike

Copy link
Copy Markdown
Author

Is there anything left now? Going to @RaphiMC one last time, but will probably delay this for after ver/26.3 if that's fine.

you can delay this yeah it's not a high priority issue after all

…ot when the ingredient slot is not empty (even if the ingredient item stack is not full)

new mixin fixing an issue with shift clicking out of the crafting output slot on 1.4.5 and below sometimes kicks the player
use .betweenInclusive for applicable checks
….6 and below and move the max craft disable up to b1.7.x
@florianreuth

Copy link
Copy Markdown
Member

Should change the target to ver/26.3 now

@Socketlike
Socketlike changed the base branch from ver/26.2 to ver/26.3 September 19, 2026 10:47
@Socketlike

Socketlike commented Sep 20, 2026 •

Copy link
Copy Markdown
Author

seems like when they updated the game to 26.3 they also changed the potion checks so that they depend on RecipePropertySets.. and those require loaded recipes.. from the server

how would i go adding a new type of recipe to the legacy recipes class?

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.

4 participants