aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper
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/main/java/de/cowtipper
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/main/java/de/cowtipper')
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java4
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/PlayerListener.java24
2 files changed, 14 insertions, 14 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);
+ }
+ }
}
}
}