Fix skipped shift-clicks when dragging with Mouse Tweaks (#1439)

This commit is contained in:
Kogepan229 authored and GitHub committed 2026-07-15 17:13:37 +02:00
1 parent 71b462d8fb
commit 92a0ae59a9
2 files changed
+12

No files matched your search

+1
View File
@@ -85,6 +85,7 @@ dependencies {
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:Backhand:1.8.11:dev')
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:ForgeMultipart:1.7.10:dev') {transitive = false}
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:MouseTweaks:2.5.2-GTNH:dev')
}
// deps may transitively add Baubles, so we replace it
@@ -510,6 +510,17 @@ public abstract class AEBaseContainer extends Container {
}
@Override
@Nullable
public ItemStack slotClick(final int slotId, final int clickedButton, final int mode, final EntityPlayer player) {
final ItemStack result = super.slotClick(slotId, clickedButton, mode, player);
// Shift-click transfers are not predicted on the client. Keep the transaction result identical on both sides
// while still executing the full transfer, including Container's retry logic, on the server.
return mode == 1 ? null : result;
}
@Override
@Nullable
public ItemStack transferStackInSlot(final EntityPlayer p, final int idx) {
if (Platform.isClient()) {
return null;