Fix enabled resource pack arrows position calculation

This commit is contained in:
MrMelon54 committed 2025-02-28 17:09:48 +00:00
1 parent 688c629bb1
commit aad478326f
1 file changed
+4 -1
@@ -52,7 +52,10 @@ public abstract class TransferableSelectionList_PackEntryMixin extends ObjectSel
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true)
public void removeMoveTowardEnd(double d, double e, int i, CallbackInfoReturnable<Boolean> cir) {
if (!DraggableLists.CONFIG.disableResourcePackArrows) return;
if (d > getRectangle().width() / 2f) return;
float screenWidth = parent.getRectangle().width() / 2f;
if (d < screenWidth) return;
double f = d - (double) parent.getRowLeft();
if (f < 16 || f > 32) return;