aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2021-07-11 15:35:49 +0200
committerCow <cow@volloeko.de>2021-07-11 15:35:49 +0200
commitac41ecd855a511c76499d61983ddb6c723ae0844 (patch)
tree93d5ee998258213826cdd092c6d15f34ea2f0239 /src
parent060839b4960cf95d428d9ecbc69e455c913d720d (diff)
downloadCowlection-ac41ecd855a511c76499d61983ddb6c723ae0844.tar.gz
Cowlection-ac41ecd855a511c76499d61983ddb6c723ae0844.tar.bz2
Cowlection-ac41ecd855a511c76499d61983ddb6c723ae0844.zip
Swapped copy inventory and copy item keybindings
- also changed default position of dungeon overlay
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java4
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java24
-rw-r--r--src/main/resources/assets/cowlection/lang/en_US.lang4
3 files changed, 16 insertions, 16 deletions
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