diff options
author | Roman Gräf <romangraef@loves.dicksinhisan.us> | 2020-08-13 11:56:36 +0200 |
---|---|---|
committer | Roman Gräf <romangraef@loves.dicksinhisan.us> | 2020-08-13 11:56:36 +0200 |
commit | c385807c59d7d8900226937b58aef552782dcc19 (patch) | |
tree | 0a83bcb535d03b050c346752e5bdcc1274b072e8 | |
parent | 11a0bd145ea66bc54d67689a6aa10889a0520870 (diff) | |
download | tagtooltip-c385807c59d7d8900226937b58aef552782dcc19.tar.gz tagtooltip-c385807c59d7d8900226937b58aef552782dcc19.tar.bz2 tagtooltip-c385807c59d7d8900226937b58aef552782dcc19.zip |
Fixed keybind display + README
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | LICENSE | 21 | ||||
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | README.txt | 53 | ||||
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/com/romangraef/tagtooltip/TagTooltip.java | 11 | ||||
-rw-r--r-- | src/main/resources/META-INF/mods.toml | 8 | ||||
-rw-r--r-- | src/main/resources/tagtooltip.png | bin | 0 -> 1605 bytes |
8 files changed, 47 insertions, 66 deletions
@@ -23,3 +23,5 @@ run # Files from Forge MDK forge*changelog.txt +mcmodsrepo/ + @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Roman Gräf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.
\ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6e7caf1 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Tag Tooltip + +This mod adds a tooltip to every item which shows every tag an that item has. It was primarily created to be used in conjunction with Mekanisms Tag filter, which allows to tell machines on which items to operate. Since Mekanism didn't provide information how to get those tags, i created this mod to help with that. + +## Added Features + + - Keybind "Show Ore Dictionary / Item Tags" under the "Inventory" category + - This keybind shows the tags when hovering over an item + - Can be installed Client side only, and doesn't provide any benefit if installed on the server. + - That's it, it's a small mod, maybe I'll add in more tooltips if I can think of any. + +## Links + + - [Bug Tracker](https://github.com/romangraef/tagtooltip/issues) + - [Github](https://github.com/romangraef/tagtooltip) + - [My Twitter](https://twitter.com/romangraef89) diff --git a/README.txt b/README.txt deleted file mode 100644 index 6904b37..0000000 --- a/README.txt +++ /dev/null @@ -1,53 +0,0 @@ -------------------------------------------- -Source installation information for modders -------------------------------------------- -This code follows the Minecraft Forge installation methodology. It will apply -some small patches to the vanilla MCP source code, giving you and it access -to some of the data and functions you need to build a successful mod. - -Note also that the patches are built against "unrenamed" MCP source code (aka -srgnames) - this means that you will not be able to read them directly against -normal code. - -Source pack installation information: - -Standalone source installation -============================== - -See the Forge Documentation online for more detailed instructions: -http://mcforge.readthedocs.io/en/latest/gettingstarted/ - -Step 1: Open your command-line and browse to the folder where you extracted the zip file. - -Step 2: You're left with a choice. -If you prefer to use Eclipse: -1. Run the following command: "gradlew genEclipseRuns" (./gradlew genEclipseRuns if you are on Mac/Linux) -2. Open Eclipse, Import > Existing Gradle Project > Select Folder - or run "gradlew eclipse" to generate the project. -(Current Issue) -4. Open Project > Run/Debug Settings > Edit runClient and runServer > Environment -5. Edit MOD_CLASSES to show [modid]%%[Path]; 2 times rather then the generated 4. - -If you prefer to use IntelliJ: -1. Open IDEA, and import project. -2. Select your build.gradle file and have it import. -3. Run the following command: "gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux) -4. Refresh the Gradle Project in IDEA if required. - -If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again. - -Should it still not work, -Refer to #ForgeGradle on EsperNet for more information about the gradle environment. -or the Forge Project Discord discord.gg/UvedJ9m - -Forge source installation -========================= -MinecraftForge ships with this code and installs it as part of the forge -installation process, no further action is required on your part. - -LexManos' Install Video -======================= -https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be - -For more details update more often refer to the Forge Forums: -http://www.minecraftforge.net/forum/index.php/topic,14048.0.html diff --git a/build.gradle b/build.gradle index 375214f..414e6ad 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.16.1-1.0' +version = '1.16.1-1.1' group = 'com.romangraef.tagtooltip' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'tagtooltip' diff --git a/src/main/java/com/romangraef/tagtooltip/TagTooltip.java b/src/main/java/com/romangraef/tagtooltip/TagTooltip.java index 8d419b9..31dfa6c 100644 --- a/src/main/java/com/romangraef/tagtooltip/TagTooltip.java +++ b/src/main/java/com/romangraef/tagtooltip/TagTooltip.java @@ -4,12 +4,10 @@ import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.util.InputMappings; import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.KeybindTextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TranslationTextComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.settings.KeyConflictContext; -import net.minecraftforge.client.settings.KeyModifier; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.eventbus.api.EventPriority; @@ -36,14 +34,11 @@ import static com.romangraef.tagtooltip.TagTooltip.MODID; public class TagTooltip { public static final String MODID = "tagtooltip"; public static final Logger log = LogManager.getLogger(MODID); - public KeyBinding showTagsBinding = new KeyBinding("key.showtags", KeyConflictContext.GUI, InputMappings.Type.KEYSYM, GLFW.GLFW_KEY_M, "key.categories.inventory"); + public KeyBinding showTagsBinding = new KeyBinding("key.showtags", KeyConflictContext.UNIVERSAL, InputMappings.Type.KEYSYM, GLFW.GLFW_KEY_M, "key.categories.inventory"); public TagTooltip() { if (FMLEnvironment.dist == Dist.DEDICATED_SERVER) { - log.warn("#########################################"); - log.warn("# ReAuth was loaded on Server #"); - log.warn("# Consider removing it to save some RAM #"); - log.warn("#########################################"); + log.warn("Tag Tooltips is a client side only mod."); } else { IEventBus eventBus = MinecraftForge.EVENT_BUS; eventBus.addListener(EventPriority.NORMAL, false, ItemTooltipEvent.class, this::onTooltip); @@ -55,7 +50,7 @@ public class TagTooltip { if (event == null) return; List<ITextComponent> toolTip = event.getToolTip(); if (!showTagsBinding.isKeyDown()) { - toolTip.add(new TranslationTextComponent("tooltip.showTags", new TranslationTextComponent(showTagsBinding.getTranslationKey()))); + toolTip.add(new TranslationTextComponent("tooltip.showTags", showTagsBinding.func_238171_j_())); return; } for (ResourceLocation tag : event.getItemStack().getItem().getTags()) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index ccb4756..e3aba84 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,14 +1,14 @@ modLoader="javafml" loaderVersion="[32,)" license="All rights reserved" -issueTrackerURL="http://github.com/romangraef/tagtooltip" +issueTrackerURL="http://github.com/romangraef/tagtooltip/issues" [[mods]] modId="tagtooltip" version="${file.jarVersion}" displayName="Tag Tooltips" -updateJSONURL="http://myurl.me/" -displayURL="http://example.com/" -logoFile="examplemod.png" +updateJSONURL="http://myurl.me/" # todo update url +displayURL="http://github.com/romangraef/tagtooltip" +logoFile="tagtooltip.png" credits="" authors="Roman Gräf <hello@romangraef.com>" description=''' diff --git a/src/main/resources/tagtooltip.png b/src/main/resources/tagtooltip.png Binary files differnew file mode 100644 index 0000000..8195178 --- /dev/null +++ b/src/main/resources/tagtooltip.png |