Skip to content

Commit

Permalink
Initial Fabric-only alpha version
Browse files Browse the repository at this point in the history
  • Loading branch information
NotRyken committed Jun 19, 2024
1 parent b8c3942 commit a5f8945
Show file tree
Hide file tree
Showing 36 changed files with 146 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew build neoforge:githubRelease neoforge:modrinth fabric:githubRelease fabric:modrinth --stacktrace
run: ./gradlew build neoforge:githubRelease fabric:githubRelease --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
Expand Down
14 changes: 14 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright 2020-2022 Siphalor
Copyright 2024 NotRyken

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,35 @@

## ClientSort

Provides client-side inventory sorting utilities.
Standalone implementation of Siphalor's [Mouse Wheelie](https://github.com/Siphalor/mouse-wheelie) sorting algorithm.

[![Environment](https://img.shields.io/badge/Environment-Client-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AYht+malUqDnYQEclQneyiIo6likWwUNoKrTqYXPoHTRqSFBdHwbXg4M9i1cHFWVcHV0EQ/AFxdnBSdJESv0sKLWI8uLuH97735e47QGhUmGp2RQFVs4xUPCZmc6ti4BU9CKCP1jGJmXoivZiB5/i6h4/vdxGe5V335xhQ8iYDfCJxlOmGRbxBPLtp6Zz3iUOsJCnE58STBl2Q+JHrsstvnIsOCzwzZGRS88QhYrHYwXIHs5KhEs8QhxVVo3wh67LCeYuzWqmx1j35C4N5bSXNdZqjiGMJCSQhQkYNZVRgIUK7RoqJFJ3HPPwjjj9JLplcZTByLKAKFZLjB/+D3701C9NTblIwBnS/2PbHOBDYBZp12/4+tu3mCeB/Bq60tr/aAOY+Sa+3tfARMLgNXFy3NXkPuNwBhp90yZAcyU9TKBSA9zP6phwwdAv0r7l9a53j9AHIUK+Wb4CDQ2CiSNnrHu/u7ezbvzWt/v0ATphymIBZ6aQAAAAGYktHRAAKAAwAGd6C8noAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfoBgcOHRYlcgoRAAABRklEQVR42u2YMUoDQRRAX0axUzCteIZ4hKn0FDmFhalSWKkgnkHt9AQWwhzBNr2tBGNno82ACwm6EZvxvwdTzP8s7P8zu8w8EJHIDABKKfvAFXAIbP/zmt+AR2CSc54NavFPwDDY4s+BUaorPwy4+3eBy1S3fVSOUoBv/jt2UmMv/A6cAHt1TGqsb36JzcYaMM05X3Tm56UUgLOe+SVa2wE3K2LXa+Sbb8BgRWxjjXzzDRj/EBv3fOarY6WUj8Z+glPgtlPcKbDVM998A/6cVM/GUXlN9WIQlYdUDwvzgMW/AMcp5zwDRsA9sAhQ+AK4Aw5yzs8aEZHY6AR1gjpBnaBOsLHrsE6wM9cJohPUCeoE0Qn+Hp0gOkGdoE5QRMKiE9QJ6gR1gjrBxq7DOsHOXCeITlAnqBNEJ/h7dILoBHWCOkERCcsncuextWq5TzoAAAAASUVORK5CYII=)]()
[![Latest Minecraft](https://img.shields.io/modrinth/game-versions/raDGbHBr?label=Latest%20Minecraft&color=%2300AF5C&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAABhWlDQ1B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0kRdb2bxBH5uyVRD5D0MXCp+8O+IXR1wGV1cT7ARz4DQvzhLWCBryGGZ6HzZ4ClvjvNW+T9ZMj/47M8af0wK8Mjm13n38eRSmI7GvOfuMx2ItYE3NJG4jjd4sylsdcEHWCDG1uyyTXEDb4SlYC/AW0t3IQpiA17AAAAAElFTkSuQmCC)](https://modrinth.com/mod/raDGbHBr/versions)

[![Loader](https://img.shields.io/badge/Available%20for-Fabric-dbd0b4?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAcBAMAAACNPbLgAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpX5UHMwgIpihOtlFRRxLFYtgobQVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6uKk6CIl/i8ptIj14Lgf7+497t4BQr3MNKsrAmi6bSZjUSmTXZUCr+iHiADG0Cszy4inFtPoOL7u4ePrXZhndT735xhQcxYDfBJxhBmmTbxBPLtpG5z3iUVWlFXic+JJky5I/Mh1xeM3zgWXBZ4pmunkPLFILBXaWGljVjQ14hnikKrplC9kPFY5b3HWylXWvCd/YTCnr6S4TnMUMSwhjgQkKKiihDJshGnVSbGQpP1oB/+I60+QSyFXCYwcC6hAg+z6wf/gd7dWfnrKSwpGge4Xx/kYBwK7QKPmON/HjtM4AfzPwJXe8lfqwNwn6bWWFjoCBreBi+uWpuwBlzvA8JMhm7Ir+WkK+TzwfkbflAWGboG+Na+35j5OH4A0dbV8AxwcAhMFyl7v8O6e9t7+PdPs7wd+dXKrd9SjeQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+cLFAcgIbOcUjoAAAAbUExURQAAAB0tQTg0KoB6bZqSfq6mlLyynMa8pdvQtJRJT6UAAAABdFJOUwBA5thmAAAAAWJLR0QB/wIt3gAAAF5JREFUGNN10FENwCAMhOFqOQuzMAtYOAtYqGw6mkEvhL59yR9Ca5YDqyOC465eKYqQm6LoCkVwnwQOBYKdeA5l51zhFtrsnPmg6m3Z2akk15dFH1lWFQVxlUFv+2sAJlA9O7NwQRQAAAAASUVORK5CYII=)](https://fabricmc.net/)
[![Loader](https://img.shields.io/badge/Available%20for-Quilt-9115ff?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV/TiqIVBwuKOASsTnZREcdSxSJYKG2FVh1MLv2CJg1Jiouj4Fpw8GOx6uDirKuDqyAIfoC4ujgpukiJ/0sKLWI8OO7Hu3uPu3eA0Kgw1QxEAVWzjFQ8JmZzq2L3K/oQQgBjGJKYqSfSixl4jq97+Ph6F+FZ3uf+HP1K3mSATySOMt2wiDeIZzctnfM+cYiVJIX4nHjSoAsSP3JddvmNc9FhgWeGjExqnjhELBY7WO5gVjJU4hnisKJqlC9kXVY4b3FWKzXWuid/YTCvraS5TnMUcSwhgSREyKihjAosRGjVSDGRov2Yh3/E8SfJJZOrDEaOBVShQnL84H/wu1uzMD3lJgVjQNeLbX+MA927QLNu29/Htt08AfzPwJXW9lcbwNwn6fW2Fj4CBraBi+u2Ju8BlzvA8JMuGZIj+WkKhQLwfkbflAMGb4HeNbe31j5OH4AMdbV8AxwcAhNFyl73eHdPZ2//nmn19wOjxHK68ogHXgAAAAlwSFlzAAAN1wAADdcBQiibeAAAAAd0SU1FB+cLFAQjO2eVRtoAAAAGYktHRAD/AP8A/6C9p5MAAAaaSURBVGje7Zp/bBNlGMcH49c0MEgQ/kGh7Wiv3QbbukmIQha2ThcjoFL9xwSjyQwSE6J/IEjExGD0D+Mkrlv5EegVBjSZJJpoDJqJ0ZDo9A/J4qB3HcsgENBlI0Fg6/Xxed7eldvRrn2v3WjJLvnmds/uvT2fu/fH8zzvioqmj+mjcA6fDdw+K7R3WMDPqeepfX9V/0LZJX8muSJ+HsmC/J7mgz2gvGMXFT+PHAGl1d4Ji9MCttvgQLsVwIR+o/aSU3pBcspgRhfsFxavOALzHKISQwG3AtF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tMc90Nc/a2c/a2tFwMNKgjNNxMNRyMNR5NtSMatS6t9TMytXg39d0L9nCu9nl5NuWd9zY2N3Iw96+tt+wnuCCNODNzeKHNeLu7eaMN+by8efZ0+ja2Ozg3O/o5/Dn5PXu7Pn09P///+RBO4EAAAAHdFJOUwAQQEBwgJ+al5Z5AAAAAWJLR0Sjx9rvGgAAAkNJREFUGBkFwT9vG3UAANB3dz/7bNfnxO61UkAhiSBCFGWhHcqGxMrKxtfgMyCVL8HYHRbKyNCJobJYIEoqkWIwSWPHzdkX3x/ei0QxAAAAmjaIHwIAAGBeh070hN0+YFkAAD/HId/7gmEMuK0BgDezIB3OXh12M+Y/8uXe6u+XfP4e1vNsshGEuFrM0pazf/lncn11xVUf5eIuaiRZ3bSHqtvbH16Pq+bowXBxHnZOf/+UsDPwpozF404dehcXUed4pLy6Ko2OO9HFBaqyFfT2/5vlyUvj429+evH62tKTr/z50tcsiq2gLiqVxGa5bZN7I1XSbpebBNJtJMnCoLApmnxWHizDx/nuOJr4tfgkf0iazcoA4GC0eTDZT5XDZHN0A8pVIwB46t1ePog1w8vZI1NYFZUAOPYRCTC6xwYgAHr6ALroaYAAkvZE3m7LknekaSc6MY1qCFWFJl7T/JX2GliWh8laL6oTdRWvC7T16anVs+c2BZ4/Wzk9zYY7Q7frgHJVt481d21jVUqzpr1r9vwRda4RsCrWVa66aVvLa+OsbW92cy9CH5Ju+mGxTToXZx8k+dNBOp4Mw8H7+80vZ22ImFcBxObq8Bkp3L+vnsuAAGDK49G3C7vf3/wGgBgAAAAgADJTHo2+a8TWUzKAoCnLy1GXwNtJUQmDtwHc3fSGRMPeyfnlUQ7KO9BNweV5fjTdBAwmXSAAAehOBggYdvpAkgBAf5wiiuPdukliAAA0dZwsmkg8AAAAQNEAAAAA+B8LzexYIpdh2QAAAABJRU5ErkJggg==)](https://neoforged.net/)

[![Download on Modrinth](https://img.shields.io/modrinth/dt/raDGbHBr?label=Download%20on%20Modrinth&logo=modrinth&logoColor=%2300AF5C)](https://modrinth.com/mod/raDGbHBr)
[![Download on GitHub](https://img.shields.io/github/downloads/TerminalMC/ClientSort/total?label=Download%20on%20GitHub&logo=github&logoColor=white)](https://github.com/TerminalMC/ClientSort)

</center></div>

### About

Currently only an experimental project.
To sort an inventory, simply hover over it with your mouse and press the keybind (default: middle mouse button).

You can hold `Shift` or `Control` when pressing the sort button to use a different sorting order.

### Dependencies

- [Fabric API](https://modrinth.com/mod/P7dR8mSH) (required)
- [ModMenu](https://modrinth.com/mod/mOgUt4GM) (required for configuration)
- [Cloth Config API](https://modrinth.com/mod/9s6osm5g) (required for configuration)

### Credits

ClientSort uses Siphalor's sorting algorithm from Mouse Wheelie, under license.

Mouse Wheelie is available on [Modrinth](https://modrinth.com/mod/u5Ic2U1u) and
[GitHub](https://github.com/Siphalor/mouse-wheelie/releases)

### License

Expand Down
Binary file removed assets/images/banner.png
Binary file not shown.
Binary file removed assets/images/showcase/command_01.png
Binary file not shown.
Binary file removed assets/images/showcase/config_01.png
Binary file not shown.
Binary file removed assets/images/showcase/config_02.png
Binary file not shown.
41 changes: 18 additions & 23 deletions common/src/main/java/dev/terminalmc/clientsort/ClientSort.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
/*
* Copyright 2020-2022 Siphalor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied.
* See the License for the specific language governing
* permissions and limitations under the License.
* Copyright 2024 NotRyken
* SPDX-License-Identifier: Apache-2.0
*/

package dev.terminalmc.clientsort;

import com.mojang.blaze3d.platform.InputConstants;
import com.mojang.logging.LogUtils;
import dev.terminalmc.clientsort.config.Config;
import dev.terminalmc.clientsort.mixin.KeyMappingAccessor;
import dev.terminalmc.clientsort.network.InteractionManager;
import dev.terminalmc.clientsort.util.inject.IContainerScreen;
import dev.terminalmc.clientsort.util.mod.ModLogger;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.Minecraft;
import org.lwjgl.glfw.GLFW;

import static dev.terminalmc.clientsort.util.mod.Localization.translationKey;

Expand All @@ -47,14 +35,21 @@ public static void init() {

public static void onEndTick(Minecraft mc) {
if (cooldown == 0) {
if (InputConstants.isKeyDown(mc.getWindow().getWindow(),
((KeyMappingAccessor) SORT_KEY).getKey().getValue())) {
if (mc.screen instanceof IContainerScreen screen) {
LogUtils.getLogger().info("good screen");
screen.mouseWheelie_triggerSort();
cooldown = 11;
}
}
int key = ((KeyMappingAccessor) SORT_KEY).getKey().getValue();
if (key != GLFW.GLFW_KEY_UNKNOWN) {
boolean down;
if (key <= 7) {
down = GLFW.glfwGetMouseButton(mc.getWindow().getWindow(), key) == GLFW.GLFW_PRESS;
} else {
down = GLFW.glfwGetKey(mc.getWindow().getWindow(), key) == GLFW.GLFW_PRESS;
}
if (down) {
if (mc.screen instanceof IContainerScreen screen) {
screen.mouseWheelie_triggerSort();
cooldown = 11;
}
}
}
}
if (cooldown > 0) cooldown--;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2024 NotRyken
* SPDX-License-Identifier: Apache-2.0
*/

package dev.terminalmc.clientsort.config;

import com.google.gson.Gson;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +36,7 @@ public class SortContext {
AbstractContainerScreen<?> screen;
/**
* The slots that are the target of the current sort action.
* These slots are usually in the same scope (see {@link de.siphalor.mousewheelie.client.inventory.ContainerScreenHelper#getScope(Slot)}).
* These slots are usually in the same scope (see {@link dev.terminalmc.clientsort.inventory.ContainerScreenHelper.getScope(Slot)}).
*/
List<Slot> relevantSlots;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +35,7 @@

public abstract class SortMode {
public static final Map<String, SortMode> SORT_MODES = new HashMap<>();
private final String name;
public final String name;

public static final SortMode NONE;
public static final SortMode ALPHABET;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied.
* See the License for the specific language governing
* permissions and limitations under the License.
* Copyright 2024 NotRyken
* SPDX-License-Identifier: Apache-2.0
*/

package dev.terminalmc.clientsort.mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +27,6 @@
import dev.terminalmc.clientsort.util.inject.IContainerScreen;
import dev.terminalmc.clientsort.util.inject.ISlot;
import net.minecraft.client.Minecraft;
import net.minecraft.client.Options;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.network.chat.Component;
Expand All @@ -42,7 +42,6 @@

import java.util.function.Supplier;

@SuppressWarnings("WeakerAccess")
@Mixin(AbstractContainerScreen.class)
public abstract class MixinAbstractContainerScreen extends Screen implements IContainerScreen {
protected MixinAbstractContainerScreen(Component textComponent_1) {
Expand All @@ -61,7 +60,7 @@ protected MixinAbstractContainerScreen(Component textComponent_1) {

@SuppressWarnings({"ConstantConditions", "unchecked"})
@Unique
private final Supplier<ContainerScreenHelper<AbstractContainerScreen<AbstractContainerMenu>>> screenHelper = Suppliers.memoize(
private final Supplier<ContainerScreenHelper<AbstractContainerScreen<AbstractContainerMenu>>> clientSort$screenHelper = Suppliers.memoize(
() -> ContainerScreenHelper.of((AbstractContainerScreen<AbstractContainerMenu>) (Object) this, (slot, data, slotActionType) -> new InteractionManager.CallbackEvent(() -> {
slotClicked(slot, ((ISlot) slot).mouseWheelie_getIdInContainer(), data, slotActionType);
return InteractionManager.TICK_WAITER;
Expand All @@ -78,7 +77,7 @@ public boolean mouseWheelie_triggerSort() {
&& GLFW.glfwGetMouseButton(minecraft.getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_MIDDLE) != 0
&& (!hoveredSlot.getItem().isEmpty() == menu.getCarried().isEmpty()))
return false;
InventorySorter sorter = new InventorySorter(screenHelper.get(), (AbstractContainerScreen<?>) (Object) this, hoveredSlot);
InventorySorter sorter = new InventorySorter(clientSort$screenHelper.get(), (AbstractContainerScreen<?>) (Object) this, hoveredSlot);
Config.Options options = Config.get().options;
SortMode sortMode;
if (hasShiftDown()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2020-2022 Siphalor
* Copyright 2024 NotRyken
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit a5f8945

Please sign in to comment.