remove injection.mixin.features.v1_6_1.MixinAbstractContainerScreen and add new mixins recreating shift click behavior in specific containers in certain version ranges - #1323
Conversation
…e creative tab menu shift click behavior pre 1.3.2
…een_ItemPickerMenu
…able menu pre 1.3.2
|
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); |
There was a problem hiding this comment.
This is wrong. b1.5 allows shift clicking in chests
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
I couldn't shift click on a b1.5 server with your PR, so something is wrong
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Shift clicking should do nothing then (not send a packet or execute any clientside window clicking logic) instead of letting a desync happen
There was a problem hiding this comment.
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
… in b1.5-, dispensers in b1.7- reverse shift click item placement order for b1.5
…getting the registry
|
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
…on below b1.6 and b1.6.5 to below b1.8
….6 and below and move the max craft disable up to b1.7.x
|
Should change the target to ver/26.3 now |
|
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? |
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)