diff options
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/config/MooConfig.java | 4 | ||||
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java | 24 | ||||
-rw-r--r-- | src/main/resources/assets/cowlection/lang/en_US.lang | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 263ecf2..d331c11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added data for Enderman slayer, Voidling minions, and Hard Stone minions - New keybindings to... 1) run `/moo waila` command (disabled by default; MC Options > Controls > `Cowlection`) - 2) copy a single item to clipboard as JSON with <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>C</kbd> + 2) copy a single item to clipboard as JSON with <kbd>CTRL</kbd> + <kbd>C</kbd> - must be enabled in `/moo config > General > Copy inventories with CTRL + C` first - - *reminder:* <kbd>CTRL</kbd> + <kbd>C</kbd> (without <kbd>SHIFT</kbd>) copies the whole inventory + - changed 'copy whole inventory' keybinding to <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>C</kbd> (with <kbd>SHIFT</kbd>) - New config options for older features: - Output of `/moo waila` and copied inventory data can now also be saved to files, instead of being copied to clipboard - Bazaar: order 'Sell Inventory/Sacks Now' tooltips ascending or descending diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java index f37f19b..026308a 100644 --- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java +++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java @@ -585,7 +585,7 @@ public class MooConfig { "dungOverlayEnabled", true, "Enable Dungeon performance overlay?")); Property propDungOverlayPositionX = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungOverlayPositionX", 1, "Dungeon performance overlay position: x value", 0, 1000), + "dungOverlayPositionX", 6, "Dungeon performance overlay position: x value", 0, 1000), null, "‰", // per mille (slider) -> { MooConfig.dungOverlayPositionX = slider.getValueInt(); @@ -593,7 +593,7 @@ public class MooConfig { }); Property propDungOverlayPositionY = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungOverlayPositionY", 1, "Dungeon performance overlay position: y value", 0, 1000), + "dungOverlayPositionY", 200, "Dungeon performance overlay position: y value", 0, 1000), null, "‰", // per mille (slider) -> { MooConfig.dungOverlayPositionY = slider.getValueInt(); diff --git a/src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java b/src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java index 5b5a4e6..cafa4a3 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java @@ -67,18 +67,7 @@ public class PlayerListener { public void onKeyboardInput(GuiScreenEvent.KeyboardInputEvent.Pre e) { if (MooConfig.enableCopyInventory && Keyboard.getEventKeyState() && Keyboard.getEventKey() == Keyboard.KEY_C && GuiScreen.isCtrlKeyDown()) { if (GuiScreen.isShiftKeyDown()) { - // ctrl + shift + C - if (e.gui instanceof GuiContainer) { - Slot slotUnderMouse = GuiHelper.getSlotUnderMouse((GuiContainer) e.gui); - if (slotUnderMouse != null && slotUnderMouse.getHasStack()) { - ItemStack itemUnderMouse = slotUnderMouse.getStack(); - NBTTagCompound itemNbt = new NBTTagCompound(); - itemUnderMouse.writeToNBT(itemNbt); - Utils.copyToClipboardOrSaveAsFile(itemUnderMouse.getDisplayName() + EnumChatFormatting.RESET + EnumChatFormatting.GREEN, "item_" + itemUnderMouse.getDisplayName(), itemNbt, false); - } - } - } else { - // ctrl + C + // ctrl + shift + C: Copy inventory IInventory inventory; String inventoryName; if (e.gui instanceof GuiChest) { @@ -106,6 +95,17 @@ public class PlayerListener { } } Utils.copyToClipboardOrSaveAsFile(items.tagCount() + " items from '" + inventoryName + "'", "inventory_" + inventoryName, items, false); + } else { + // ctrl + C: Copy one item + if (e.gui instanceof GuiContainer) { + Slot slotUnderMouse = GuiHelper.getSlotUnderMouse((GuiContainer) e.gui); + if (slotUnderMouse != null && slotUnderMouse.getHasStack()) { + ItemStack itemUnderMouse = slotUnderMouse.getStack(); + NBTTagCompound itemNbt = new NBTTagCompound(); + itemUnderMouse.writeToNBT(itemNbt); + Utils.copyToClipboardOrSaveAsFile(itemUnderMouse.getDisplayName() + EnumChatFormatting.RESET + EnumChatFormatting.GREEN, "item_" + itemUnderMouse.getDisplayName(), itemNbt, false); + } + } } } } diff --git a/src/main/resources/assets/cowlection/lang/en_US.lang b/src/main/resources/assets/cowlection/lang/en_US.lang index 2a124a4..30b15d7 100644 --- a/src/main/resources/assets/cowlection/lang/en_US.lang +++ b/src/main/resources/assets/cowlection/lang/en_US.lang @@ -6,8 +6,8 @@ cowlection.config.mooCmdAlias=Alias for /moo command cowlection.config.mooCmdAlias.tooltip=Alternative command alias for §e/moo§f.\nLeave empty to remove alias. cowlection.config.fixReplyCmd=Auto-replace /r? cowlection.config.fixReplyCmd.tooltip=Auto-replace §e/r §fwith §e/w <latest username> §fto avoid replying to the wrong person.\n\nUse §e/rr <message> §fto prevent the auto-replacement for a message. -cowlection.config.enableCopyInventory=Copy inventories with CTRL + C? -cowlection.config.enableCopyInventory.tooltip=If enabled:\n ‣ copy the items in an inventory as JSON with §eCTRL + C§r\n ‣ copy a single item with §eCTRL + SHIFT + C +cowlection.config.enableCopyInventory=Copy items/inventories with CTRL + C? +cowlection.config.enableCopyInventory.tooltip=If enabled:\n ‣ copy a single item as JSON with §eCTRL + C§r\n ‣ copy the items in an inventory as JSON with §eCTRL + SHIFT + C cowlection.config.wailaLevelOfDetail=Level of detail of /moo waila cowlection.config.wailaLevelOfDetail.tooltip=Should §e/moo whatAmILookingAt §rcopy §oall §rinfo or only the §omost important §rinfo?\n§7§oIn addition, the optional 2nd parameter can also be used: §e§o/moo waila <all|main> cowlection.config.copyOrSaveWailaAndInventoryData=Output /moo waila and inventory data |