File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
common/src/main/java/dev/terminalmc/clientsort Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public static void onConfigSaved(ServerConfig config) {
6969 ) {
7070 return switch (container ) {
7171 case null -> null ;
72- case ContainerSingleItem ignored -> null ;
72+ case ContainerSingleItem ignored -> menu ;
7373 case SimpleContainer ignored -> menu ;
7474 default -> container ;
7575 };
Original file line number Diff line number Diff line change 2828import net .minecraft .world .entity .player .Inventory ;
2929import net .minecraft .world .inventory .ClickType ;
3030import net .minecraft .world .inventory .Slot ;
31+ import net .minecraft .world .ticks .ContainerSingleItem ;
3132
3233import static dev .terminalmc .clientsort .client .config .Config .options ;
3334
@@ -122,6 +123,12 @@ public boolean isExtraSlot(Slot slot) {
122123 * @return the scope of the slot, or {@link Scope#INVALID} if the slot is not accessible.
123124 */
124125 public Scope getScope (Slot slot ) {
126+ //noinspection ConstantValue
127+ if (slot .container == null )
128+ return Scope .INVALID ;
129+ if (slot .container instanceof ContainerSingleItem )
130+ return Scope .INVALID ;
131+
125132 // Screen with only player inventory
126133 if (screen instanceof EffectRenderingInventoryScreen ) {
127134 // Player inventory
You can’t perform that action at this time.
0 commit comments