Skip to content
This repository was archived by the owner on Jun 23, 2024. It is now read-only.

Commit 2fbb590

Browse files
committed
1.12 changes
1 parent 2c8e651 commit 2fbb590

File tree

4 files changed

+89
-79
lines changed

4 files changed

+89
-79
lines changed

build.gradle

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
buildscript {
2-
repositories {
3-
jcenter()
4-
maven { url = "http://files.minecraftforge.net/maven" }
5-
}
6-
dependencies {
7-
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
8-
}
9-
}
10-
apply plugin: 'net.minecraftforge.gradle.forge'
11-
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
12-
13-
14-
version = "1.0.0"
15-
group = "de.guntram.mcmod.DurabilityViewer" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
16-
archivesBaseName = "DurabilityViewer"
17-
18-
sourceCompatibility = targetCompatibility = "1.6" // Need this here so eclipse task generates correctly.
19-
compileJava {
20-
sourceCompatibility = targetCompatibility = "1.6"
21-
}
22-
23-
minecraft {
24-
version = "1.11.2-13.20.0.2231"
25-
runDir = "run"
26-
27-
// the mappings can be changed at any time, and must be in the following format.
28-
// snapshot_YYYYMMDD snapshot are built nightly.
29-
// stable_# stables are built at the discretion of the MCP team.
30-
// Use non-default mappings at your own risk. they may not always work.
31-
// simply re-run your setup task after changing the mappings to update your workspace.
32-
mappings = "snapshot_20170228"
33-
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
34-
}
35-
36-
dependencies {
37-
// you may put jars on which you depend on in ./libs
38-
// or you may define them like so..
39-
//compile "some.group:artifact:version:classifier"
40-
//compile "some.group:artifact:version"
41-
42-
// real examples
43-
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
44-
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
45-
46-
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
47-
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
48-
49-
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
50-
// except that these dependencies get remapped to your current MCP mappings
51-
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
52-
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
53-
54-
// for more info...
55-
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
56-
// http://www.gradle.org/docs/current/userguide/dependency_management.html
57-
58-
}
59-
60-
processResources {
61-
// this will ensure that this task is redone when the versions change.
62-
inputs.property "version", project.version
63-
inputs.property "mcversion", project.minecraft.version
64-
65-
// replace stuff in mcmod.info, nothing else
66-
from(sourceSets.main.resources.srcDirs) {
67-
include 'mcmod.info'
68-
69-
// replace version and mcversion
70-
expand 'version':project.version, 'mcversion':project.minecraft.version
71-
}
72-
73-
// copy everything else except the mcmod.info
74-
from(sourceSets.main.resources.srcDirs) {
75-
exclude 'mcmod.info'
76-
}
77-
}
1+
buildscript {
2+
repositories {
3+
jcenter()
4+
maven { url = "http://files.minecraftforge.net/maven" }
5+
}
6+
dependencies {
7+
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
8+
}
9+
}
10+
apply plugin: 'net.minecraftforge.gradle.forge'
11+
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
12+
13+
14+
version = "1.12-1.0.0"
15+
group = "de.guntram.mcmod.DurabilityViewer" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
16+
archivesBaseName = "DurabilityViewer"
17+
18+
sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
19+
compileJava {
20+
sourceCompatibility = targetCompatibility = "1.8"
21+
}
22+
23+
minecraft {
24+
version = "1.12-14.21.0.2335"
25+
runDir = "run"
26+
27+
// the mappings can be changed at any time, and must be in the following format.
28+
// snapshot_YYYYMMDD snapshot are built nightly.
29+
// stable_# stables are built at the discretion of the MCP team.
30+
// Use non-default mappings at your own risk. they may not always work.
31+
// simply re-run your setup task after changing the mappings to update your workspace.
32+
mappings = "snapshot_20170618"
33+
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
34+
}
35+
36+
dependencies {
37+
// you may put jars on which you depend on in ./libs
38+
// or you may define them like so..
39+
//compile "some.group:artifact:version:classifier"
40+
//compile "some.group:artifact:version"
41+
42+
// real examples
43+
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
44+
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
45+
46+
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
47+
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
48+
49+
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
50+
// except that these dependencies get remapped to your current MCP mappings
51+
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
52+
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
53+
54+
// for more info...
55+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
56+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
57+
58+
}
59+
60+
processResources {
61+
// this will ensure that this task is redone when the versions change.
62+
inputs.property "version", project.version
63+
inputs.property "mcversion", project.minecraft.version
64+
65+
// replace stuff in mcmod.info, nothing else
66+
from(sourceSets.main.resources.srcDirs) {
67+
include 'mcmod.info'
68+
69+
// replace version and mcversion
70+
expand 'version':project.version, 'mcversion':project.minecraft.version
71+
}
72+
73+
// copy everything else except the mcmod.info
74+
from(sourceSets.main.resources.srcDirs) {
75+
exclude 'mcmod.info'
76+
}
77+
}

src/main/java/de/guntram/mcmod/durabilityviewer/DurabilityViewer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
name = "Durability Viewer",
1515
version = DurabilityViewer.VERSION,
1616
clientSideOnly = true,
17-
acceptedMinecraftVersions = "[1.11.2]",
17+
acceptedMinecraftVersions = "[1.12]",
1818
guiFactory = "de.guntram.mcmod.durabilityviewer.client.gui.DurabilityViewerGuiFactory",
1919
dependencies = "")
2020

src/main/java/de/guntram/mcmod/durabilityviewer/client/gui/DurabilityViewerGuiFactory.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
public class DurabilityViewerGuiFactory implements IModGuiFactory
99
{
10+
@Override
11+
public boolean hasConfigGui() {
12+
return true;
13+
}
14+
1015
@Override
1116
public void initialize(final Minecraft minecraftInstance) {
1217
}
@@ -16,6 +21,11 @@ public Class<? extends GuiScreen> mainConfigGuiClass() {
1621
return DurabilityViewerGuiConfig.class;
1722
}
1823

24+
@Override
25+
public GuiScreen createConfigGui(GuiScreen parentScreen) {
26+
return new DurabilityViewerGuiConfig(parentScreen);
27+
}
28+
1929
@Override
2030
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
2131
return null;

src/main/java/de/guntram/mcmod/durabilityviewer/event/TooltipEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class TooltipEvent
1010
{
1111
@SubscribeEvent
1212
public void onItemTooltip(final ItemTooltipEvent event) {
13-
if (!event.isShowAdvancedItemTooltips() && !event.getItemStack().isEmpty()) {
13+
if (!event.getFlags().isAdvanced() && !event.getItemStack().isEmpty()) {
1414
final ItemStack itemStack = event.getItemStack();
1515
if (itemStack.isItemDamaged()) {
1616
final String toolTip = ConfigurationHandler.getInstance().getTooltipColor() +

0 commit comments

Comments
 (0)