Skip to content

Commit

Permalink
Merge pull request #9 from telvarost/8-port-in-mousetweak-configs
Browse files Browse the repository at this point in the history
8 port in mousetweak configs
  • Loading branch information
telvarost authored Jan 27, 2024
2 parents 1c12e65 + 04ada8f commit 3d99247
Show file tree
Hide file tree
Showing 5 changed files with 729 additions and 258 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,26 @@ This mod is currently incompatible with the regular version of MojangFix. If you

## List of Changes:

* Note that all changes can be enabled/disabled in the config menu if you have ModMenu and GlassConfigAPI.

### Modern Minecraft Changes
* Adds `Left-Click + Drag` mechanic to evenly distribute held items over empty slots/slots with the same item as in modern Minecraft.
* Adds `Right-Click + Drag` mechanic to distribute one item from held items over empty slots/slots with the same item as in modern Minecraft.
* `LCtrl + DROP_KEY` to drop a whole stack of items.
* Move items from player inventory to the hotbar by pressing the number key corresponding to the desired hotbar slot while hovering the cursor over the item to move.

### MouseTweaks Changes
* MouseTweaks `Right-Click + Drag`
* Very similar to the standard RMB dragging mechanic, with one difference: if you drag over a slot multiple times, an item will be put there multiple times. Replaces the standard mechanic if enabled.
* MouseTweaks `Left-Click + Drag` (with item)
* Lets you quickly pick up or move items of the same type.
* Move items to another inventory if holding `Shift`
* MouseTweaks `Left-Click + Drag + Shift` (without item)
* Quickly move items into another inventory.
* Original take on the scroll wheel
* Scroll to move items between the cursor and the hovered slot
* Note: MouseTweaks scroll will eventually be added as well if I can figure it out

## Installation using Prism Launcher

1. Download an instance of Babric for Prism Launcher: https://github.com/babric/prism-instance
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=b1.7.3-build.2
loader_version=0.14.24-babric.1

# Mod Properties
mod_version=1.1.2
mod_version=2.0.0
maven_group=com.github.telvarost
archives_base_name=InventoryTweaks

Expand Down
94 changes: 89 additions & 5 deletions src/main/java/com/github/telvarost/inventorytweaks/Config.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,100 @@
package com.github.telvarost.inventorytweaks;

import blue.endless.jankson.Comment;
import net.glasslauncher.mods.api.gcapi.api.ConfigCategory;
import net.glasslauncher.mods.api.gcapi.api.ConfigName;
import net.glasslauncher.mods.api.gcapi.api.GConfig;

public class Config {

@GConfig(value = "config", visibleName = "InventoryTweaks Config")
public static ConfigFields config = new ConfigFields();
@GConfig(value = "inventoryTweaks", visibleName = "InventoryTweaks Config", primary = true)
public static InventoryTweaksConfig INVENTORY_TWEAKS_CONFIG = new InventoryTweaksConfig();

public static class ConfigFields {
public static class InventoryTweaksConfig {

// @ConfigName("Fix double doors")
// public static Boolean FIX_DOUBLE_DOORS = true;
@ConfigCategory("Modern Minecraft Config")
public static ModernMinecraftConfig MODERN_MINECRAFT_CONFIG = new ModernMinecraftConfig();

@ConfigCategory("MouseTweaks Config")
public static final MouseTweaksConfig MOUSE_TWEAKS_CONFIG = new MouseTweaksConfig();
}

public static class ModernMinecraftConfig {

@ConfigName("Enable [Click + Drag] graphics")
public static Boolean EnableDragGraphics = true;

@ConfigName("Enable [Left-Click + Drag]")
public static Boolean EnableLeftClickDrag = true;

@ConfigName("Enable [Right-Click + Drag]")
public static Boolean EnableRightClickDrag = true;

@ConfigName("Prefer [Shift-Click] over [Left-Click + Drag]")
public static Boolean LMBPreferShiftClick = true;

@ConfigName("Prefer [Shift-Click] over [Right-Click + Drag]")
public static Boolean RMBPreferShiftClick = true;

@ConfigName("Use [DROP_KEY] to drop inventory items")
@Comment("Cursor must not be holding any items")
public static Boolean UseDropKeyInInventory = true;

@ConfigName("Use [LCtrl + DROP_KEY] to drop entire stack")
public static Boolean LCtrlStackDrop = true;

@ConfigName("Use [NUMBER_KEYS] to swap items to hotbar")
@Comment("Hover over the slot or swap cursor item")
public static Boolean NumKeyHotbarSwap = true;
}

public static class MouseTweaksConfig {

@ConfigCategory("Scroll Wheel Config")
public static final ScrollWheelConfig SCROLL_WHEEL_CONFIG = new ScrollWheelConfig();

@ConfigName("Empty cursor [Shift + Left-Click + Drag]")
@Comment("[Shift-Click] items of any type")
public static Boolean LMBTweakShiftClickAny = true;

@ConfigName("Item in cursor [Shift + Left-Click + Drag]")
@Comment("[Shift-Click] items of the held type")
public static Boolean LMBTweakShiftClick = true;

@ConfigName("[Right-Click + Drag] over existing slots")
public static Boolean RMBTweak = true;

@ConfigName("[Left-Click + Drag] to pick up items")
public static Boolean LMBTweakPickUp = true;
}

public static class ScrollWheelConfig {

@ConfigName("Enable Scroll Wheel Tweaks")
public static Boolean enableScrollWheelTweaks = true;

@ConfigName("Invert scroll direction: cursor/slot")
@Comment("For cursor/slot item transfer")
public static Boolean invertScrollCursorSlotDirection = false;

// @ConfigName("Invert scroll direction: inventories")
// @Comment("For item transfer between inventories")
// public static Boolean invertScrollInventoryDirection = false;
//
// @ConfigName("Position aware scrolling inventory transfer")
// @Comment("Slot position will determine scroll direction")
// public static Boolean positionAwareScrolling = false;
//
// @ConfigName("Wheel slot search order (see comment)")
// @Comment("true = first to last, false = last to first")
// public static Boolean wheelSearchOrder = true;
//
// @ConfigName("[ScrollWheel] transfer (see comment)")
// @Comment("true = cursor/slot, false = inventories")
// public static Boolean scrollWheelBehavior = true;
//
// @ConfigName("[Shift + ScrollWheel] transfer (see comment)")
// @Comment("true = inventories, false = cursor/slot")
// public static Boolean shiftScrollWheelBehavior = true;
}
}
Loading

0 comments on commit 3d99247

Please sign in to comment.