Skip to content

Commit

Permalink
Updated to 1.5.0
Browse files Browse the repository at this point in the history
Updated to Minecraft 1.12.2 (14.23.0.2512) using mappings from
2017/09/18.

- ADDED: New tooltip type nbt. Adds an NBT tooltip
- ADDED: pack.mcmeta file (pack version 3 for 1.11 and above)
- UPDATED: Lowercased language files
- UPDATED: JEI dependency
- UPDATED: Upgraded the Gradle Wrapper to 4.2
- UPDATED: Updated README.md (Discord badge and Discord section
advertising the SnowShock server).
- UPDATED: Fixed a typo with metadata tooltip in Config class.
  • Loading branch information
SnowShock35 committed Oct 14, 2017
1 parent f6f262c commit 5505726
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 52 deletions.
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# JEI Integration - Minecraft Mod
_Providing Integrations & Tooltips_

[![Build Status](https://img.shields.io/travis/SnowShock35/JEIIntegration/master.svg)](https://travis-ci.org/SnowShock35/JEIIntegration) [![LICENSE](https://img.shields.io/github/license/SnowShock35/JEIIntegration.svg)](https://github.com/SnowShock35/JEIIntegration/blob/master/LICENSE) [![Minecraft CurseForge Downloads (Total)](http://cf.way2muchnoise.eu/full_jei-integration_downloads.svg)](https://minecraft.curseforge.com/projects/jei-integration/) [![Minecraft CurseForge Minecraft Versions](http://cf.way2muchnoise.eu/versions/jei-integration.svg)](https://minecraft.curseforge.com/projects/jei-integration/)
[![Build Status](https://img.shields.io/travis/SnowShock35/JEIIntegration/master.svg)](https://travis-ci.org/SnowShock35/JEIIntegration) [![LICENSE](https://img.shields.io/github/license/SnowShock35/JEIIntegration.svg)](https://github.com/SnowShock35/JEIIntegration/blob/master/LICENSE) [![Minecraft CurseForge Downloads (Total)](http://cf.way2muchnoise.eu/full_jei-integration_downloads.svg)](https://minecraft.curseforge.com/projects/jei-integration/) [![Minecraft CurseForge Minecraft Versions](http://cf.way2muchnoise.eu/versions/jei-integration.svg)](https://minecraft.curseforge.com/projects/jei-integration/) [![Discord](https://img.shields.io/discord/284709326189494282.svg?colorB=7289DA&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAABWAgMAAABnZYq0AAAACVBMVEUAAB38%2FPz%2F%2F%2F%2Bm8P%2F9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhBxwQJhxy2iqrAAABoElEQVRIx7WWzdGEIAyGgcMeKMESrMJ6rILZCiiBg4eYKr%2Fd1ZAfgXFm98sJfAyGNwno3G9sLucgYGpQ4OGVRxQTREMDZjF7ILSWjoiHo1n%2BE03Aw8p7CNY5IhkYd%2F%2F6MtO3f8BNhR1QWnarCH4tr6myl0cWgUVNcfMcXACP1hKrGMt8wcAyxide7Ymcgqale7hN6846uJCkQxw6GG7h2MH4Czz3cLqD1zHu0VOXMfZjHLoYvsdd0Q7ZvsOkafJ1P4QXxrWFd14wMc60h8JKCbyQvImzlFjyGoZTKzohwWR2UzSONHhYXBQOaKKsySsahwGGDnb%2FiYPJw22sCqzirSULYy1qtHhXGbtgrM0oagBV4XiTJok3GoLoDNH8ooTmBm7ZMsbpFzi2bgPGoXWXME6XT%2BRJ4GLddxJ4PpQy7tmfoU2HPN6cKg%2BledKHBKlF8oNSt5w5g5o8eXhu1IOlpl5kGerDxIVT%2BztzKepulD8utXqpChamkzzuo7xYGk%2FkpSYuviLXun5bzdRf0Krejzqyz7Z3p0I1v2d6HmA07dofmS48njAiuMgAAAAASUVORK5CYII%3D)](https://discord.gg/H4FUqrj)
## Description
#### Introduction

Expand Down Expand Up @@ -32,6 +32,8 @@ Tooltips are one of the main features of JEI Integration. They provide useful in

**Metadata** is a more advanced tooltip providing you with the metadata value of an item, such as wool with its various colours.

**NBT Data** is probably the most advanced tooltip. It displays (as an object) any data stored in NBT format on an item e.g. potions and enchantments

**Ore Dictionary Entries** is one of the more complex tooltips spanning across multiple lines. It lists all of the current item stacks ore dictionary entries if it should have any. e.g. Iron Ingot will display ingotIron`.

**Unlocalized Name** adds a tooltip to every item stack in the game telling you the item's unlocalized name. This good when doing any sort of development or debugging should you need it.
Expand All @@ -58,19 +60,19 @@ Tooltips themselves can be configured with various modes to suit your taste. Cur

_Did you know that we're now partnered with [CreeperHost](https://creeper.host)?_

Thanks to the wonderful people of [CreeperHost](https://creeper.host), you can now purchase a server from them with the following discount code, getting 10% off of your first month. Great for hosting the most up to date version of our mod packs. Click the banner below to get your server.
Thanks to the wonderful people of [CreeperHost](https://creeper.host), you can now purchase a server from them with the following discount code, getting **15%** off of your first month. Great for hosting the most up to date version of our mod packs. Click the banner below to get your server.

[![CreeperHost Discount](https://content.blamesnow.co.uk/CREEPER_HOST.png)](http://partners.creeper.host/r/snowshock35xbe)
[![CreeperHost Discount](https://content.blamesnow.co.uk/CREEPER_HOST_15.png)](http://partners.creeper.host/r/snowshock35xbe)

***

## Twitch Community
## Discord Server

_Wanting to get involved? Join the conversation._
_Wanting to get involved? Join us on Discord._

Our Twitch community is a place to socialize with both our developers as well as other community members such as yourself. You'll get to see and join in with the conversation. Oh, and did we mention that we hold occasional giveaways and polls? That's right! The community is free to join and you can do so by clicking the banner below or clicking the following link to [Join the Conversation](https://invite.twitch.tv/RordanShovelTooth).
Our Discord server is a place to socialize with both our developers as well as other community members such as yourself. You'll get to see and join in with the conversation. The community is free to join and you can do so by clicking the banner below or clicking the following link to [Join us on Discord](https://discord.gg/ZH98dRY).

[![Twitch Community](https://content.blamesnow.co.uk/Twitch_Large.jpeg)](https://invite.twitch.tv/RordanShovelTooth)
[![Discord Server](https://content.blamesnow.co.uk/DISCORD_SMALL.png)](https://discord.gg/ZH98dRY)

***

Expand All @@ -79,34 +81,34 @@ Our Twitch community is a place to socialize with both our developers as well as

**_Information regarding pack installation_**

This mod can be installed via the Twitch Desktop App. It's available for download at [https://app.twitch.tv/overview/](https://app.twitch.tv/overview/). If you need assistants installing mods there's a help guide available [here](https://help.twitch.tv/customer/en/portal/articles/2744534-game-profiles#AddingMods).
This mod pack is installed via the Twitch Desktop App. It's available for download at [https://app.twitch.tv/overview/](https://app.twitch.tv/overview/). If you need assistants installing mod packs there's a help guide available [here](https://help.twitch.tv/customer/en/portal/articles/2764216-how-to-play-minecraft-with-twitch-app#InstallingModpacks).

### Issues & Issue Reporting

**_If you encounter crashes, bugs or want to make a suggestion, please make sure to do so by clicking on the `Issues` tab at the top of the page or by clicking the following link to [report an issue](https://github.com/snowshock35/jeiintegration/issues/)_**
**_If you have a problem or issue to report for the pack please use the issues tab not the comment section!_**

If you report an issue please make sure to follow the guidelines listed on the repository. [Contributing Guidelines](https://github.com/snowshock35/jeiintegration/blob/master/.github/CONTRIBUTING.md).
If you report an issue make sure to follow the issue reporting guide [here]().

***

## Useful Links

_Make sure to follow our lead developer, SnowShock35, on social media for the latest updates and news about mods and other exciting projects._
_Make sure to follow our lead developer, SnowShock35, on social media for the latest updates and news about mod packs and other exciting projects._

* [CurseForge Projects](https://minecraft.curseforge.com/members/snowshock35/projects)
* [GitHub](https://github.com/SnowShock35)
* [Player.me](https://player.me/SnowShock35)
* [Reddit](https://reddit.com/u/SnowShock35)
* [Twitch](https://twitch.tv/SnowShock35)
* [Twitter](https://twitter.com/SnowShock35)
* [Website](https://SnowShock35.com)
* [YouTube](https://youtube.com/user/XSnowShockX35)
* [GitHub](https://github.com/snowshock35)
* [Player.me](https://player.me/snowshock35)
* [Reddit](https://reddit.com/u/snowshock35)
* [Twitch](https://twitch.tv/snowshock35)
* [Twitter](https://twitter.com/snowshock35)
* [Website](https://snowshock35.com)
* [YouTube](https://youtube.com/c/SnowShock35JN)

***

## Changelogs

Changelogs can be found on the Minecraft CurseForge projects page. To see a list of them click the following link. [View all changelogs](https://minecraft.curseforge.com/projects/jei-integration/files/)
Changelogs can be found on the Minecraft CurseForge project files page. To see a list of them click the following link. [View all changelogs](https://minecraft.curseforge.com/projects/jei-integration/files/)

***

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ plugins {

apply plugin: 'net.minecraftforge.gradle.forge'

version = version_major + "." + version_minor + "." + version_patch
version = "${version_major}.${version_minor}.${version_patch}"
group = "com.snowshock35.jeiintegration" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "jeiintegration_" + mc_version
archivesBaseName = "jeiintegration_${mc_version}"

//adds the build number to the end of the version string if on a build server
if (System.getenv('TRAVIS_BUILD_NUMBER') != null) {
Expand All @@ -32,10 +32,10 @@ compileJava {
}

minecraft {
version = mc_version + "-" + forge_version
version = "${mc_version}-${forge_version}"
runDir = "run"
replace '@VERSION@', project.version
mappings = mcp_mappings
replace "@VERSION@", project.version
mappings = "${mcp_mappings}"
useDepAts = true
}

Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Base Information
mc_version=1.12.1
forge_version=14.22.0.2452
mcp_mappings=snapshot_20170624
mc_version=1.12.2
forge_version=14.23.0.2512
mcp_mappings=snapshot_20170918
curse_project_id=265917
repo=SnowShock35/JEIIntegration

# Version
version_major=1
version_minor=4
version_patch=2
version_minor=5
version_patch=0

# Dependencies
version_jei=4.7.5.+
version_jei=4.8.0.+
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Jul 20 20:27:34 BST 2017
#Sat Oct 14 17:17:16 BST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-all.zip
26 changes: 17 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import net.minecraft.client.resources.I18n;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
Expand Down Expand Up @@ -91,6 +92,19 @@ public void onItemTooltip(ItemTooltipEvent e) {
}
}

NBTTagCompound nbtData = item.getNBTShareTag(itemStack);
if (item.getNBTShareTag(itemStack) != null && !isEmptyItemStack(e)) {
if (Objects.equals(config.getNbtTooltipMode(), "enabled")) {
e.getToolTip().add(TextFormatting.DARK_GRAY + I18n.format("tooltip.jeiintegration.nbtTagData") + " " + nbtData);
} else if (Objects.equals(config.getNbtTooltipMode(), "onShift") && isShiftKeyDown()) {
e.getToolTip().add(TextFormatting.DARK_GRAY + I18n.format("tooltip.jeiintegration.nbtTagData") + " " + nbtData);
} else if (Objects.equals(config.getNbtTooltipMode(), "onDebug") && isDebugMode()) {
e.getToolTip().add(TextFormatting.DARK_GRAY + I18n.format("tooltip.jeiintegration.nbtTagData") + " " + nbtData);
} else if (Objects.equals(config.getNbtTooltipMode(), "onShiftAndDebug") && isShiftKeyDown() && isDebugMode()) {
e.getToolTip().add(TextFormatting.DARK_GRAY + I18n.format("tooltip.jeiintegration.nbtTagData") + " " + nbtData);
}
}

if (!isEmptyItemStack(e)) {
if (Objects.equals(config.getRegistryNameTooltipMode(), "enabled")) {
e.getToolTip().add(TextFormatting.DARK_GRAY + I18n.format("tooltip.jeiintegration.registryName") + " " + item.getRegistryName());
Expand Down Expand Up @@ -169,7 +183,9 @@ private static void genOreDictTooltip(ItemTooltipEvent e) {
e.getToolTip().addAll(names);
}
}
}

//
// TODO: Fix the fluid registry tooltips
//
// private static void genFluidRegTooltip(ItemTooltipEvent e) {
Expand All @@ -189,5 +205,4 @@ private static void genOreDictTooltip(ItemTooltipEvent e) {
// e.getToolTip().addAll(names);
// }
// }
}

//
13 changes: 10 additions & 3 deletions src/main/java/com/snowshock35/jeiintegration/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class Config {
private static final String defaultRegistryNameTooltipMode = "disabled";
private static final String defaultMaxStackSizeTooltipMode = "disabled";
private static final String defaultMetadataTooltipMode = "disabled";
private static final String defaultNbtTooltipMode = "disabled";
private static final String defaultOreDictEntriesTooltipMode = "disabled";
private static final String defaultUnlocalizedNameTooltipMode = "disabled";

Expand All @@ -53,7 +54,8 @@ public class Config {
private String fluidRegInfoTooltipMode = "";
private String registryNameTooltipMode = "";
private String maxStackSizeTooltipMode = "";
private String metadataToolTipMode = "";
private String metadataTooltipMode = "";
private String nbtTooltipMode = "";
private String oreDictEntriesTooltipMode = "";
private String unlocalizedNameTooltipMode = "";

Expand All @@ -77,7 +79,8 @@ private void loadConfig() {
fluidRegInfoTooltipMode = config.getString("fluidRegInfoTooltipMode", CATEGORY_TOOLTIPS, defaultFluidRegInfoTooltipMode, I18n.format("config.jeiintegration.tooltips.fluidRegInfoTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.fluidRegInfoTooltipMode");
registryNameTooltipMode = config.getString("registryNameTooltipMode", CATEGORY_TOOLTIPS, defaultRegistryNameTooltipMode, I18n.format("config.jeiintegration.tooltips.registryNameTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.registryNameTooltipMode");
maxStackSizeTooltipMode = config.getString("maxStackSizeTooltipMode", CATEGORY_TOOLTIPS, defaultMaxStackSizeTooltipMode, I18n.format("config.jeiintegration.tooltips.maxStackSizeTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.maxStackSizeTooltipMode");
metadataToolTipMode = config.getString("metadataTooltipMode", CATEGORY_TOOLTIPS, defaultMetadataTooltipMode, I18n.format("config.jeiintegration.tooltips.metadataTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.metadataTooltipMode");
metadataTooltipMode = config.getString("metadataTooltipMode", CATEGORY_TOOLTIPS, defaultMetadataTooltipMode, I18n.format("config.jeiintegration.tooltips.metadataTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.metadataTooltipMode");
nbtTooltipMode = config.getString("nbtTooltipMode", CATEGORY_TOOLTIPS, defaultNbtTooltipMode, I18n.format("config.jeiintegration.tooltips.nbtTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.nbtTooltipMode");
oreDictEntriesTooltipMode = config.getString("oreDictEntriesTooltipMode", CATEGORY_TOOLTIPS, defaultOreDictEntriesTooltipMode, I18n.format("config.jeiintegration.tooltips.oreDictEntriesTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.oreDictEntriesTooltipMode");
unlocalizedNameTooltipMode = config.getString("unlocalizedNameTooltipMode", CATEGORY_TOOLTIPS, defaultUnlocalizedNameTooltipMode, I18n.format("config.jeiintegration.tooltips.unlocalizedNameTooltipMode.comment"), new String[] {"disabled", "enabled", "onShift", "onDebug", "onShiftAndDebug"}, "config.jeiintegration.tooltips.unlocalizedNameTooltipMode");

Expand Down Expand Up @@ -111,7 +114,11 @@ public String getMaxStackSizeTooltipMode() {
}

public String getMetadataTooltipMode() {
return metadataToolTipMode;
return metadataTooltipMode;
}

public String getNbtTooltipMode() {
return nbtTooltipMode;
}

public String getOreDictEntriesTooltipMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ config.jeiintegration.tooltips.unlocalizedNameTooltipMode.comment=Configure the

# Tooltips
tooltip.jeiintegration.metadata=Metadata:
tooltip.jeiintegration.nbtTagData=NBT:
tooltip.jeiintegration.durability=Durability:
tooltip.jeiintegration.burnTime=Burn Time:
tooltip.jeiintegration.burnTime.suffix=ticks
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 3,
"description": "JEI Integration Resource Pack"
}
}

0 comments on commit 5505726

Please sign in to comment.