Skip to content

Commit

Permalink
Added JEI support
Browse files Browse the repository at this point in the history
  • Loading branch information
Wurmatron committed Jan 16, 2017
1 parent 9fa0e18 commit 1a67b34
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ minecraft {
replaceIn "Global.java"
}

dependencies {}
repositories {
maven {
url = "http://dvs1.progwml6.com/files/maven"
}
}

dependencies {
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
runtime "mezz.jei:jei_${mc_version}:${jei_version}"
}

processResources
{
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod_name=Viral
package_group=wurmatron
mod_version=0.0.2
mod_version=0.0.3
mc_version=1.10.2
forge_version=latest
forge_version=latest

jei_version=3.9.7.260
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static void loadConfig() {
Settings.hurtPassive = hurtPassive.getBoolean();
infectPassive = config.get(Configuration.CATEGORY_GENERAL, "infectPassive", Defaults.infectPassive, "Can the virus infected passive mobs?");
Settings.infectPassive = infectPassive.getBoolean();
passiveDamage = config.get(Configuration.CATEGORY_GENERAL, "passiveDamage", Defaults.passiveDamage, "How much damge do passive mobs take");
passiveDamage = config.get(Configuration.CATEGORY_GENERAL, "passiveDamage", Defaults.passiveDamage, "How much damage do passive mobs take");
Settings.passiveDamage = passiveDamage.getDouble();
if (config.hasChanged()) {
LogHandler.info("Config saved");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package wurmatron.viral.common.intergration.jei;

import mezz.jei.api.BlankModPlugin;
import mezz.jei.api.IModRegistry;
import mezz.jei.api.JEIPlugin;
import wurmatron.viral.Viral;

import javax.annotation.Nonnull;

@JEIPlugin
public class ViralPlugin extends BlankModPlugin {
@Override
public void register(IModRegistry registry) {
registry.addDescription(Viral.syringeFilled, "description.filledSyringe.name");
registry.addDescription(Viral.syringeCure, "description.cureSyringe.name");
registry.addDescription(Viral.syringeImunity, "description.imunitySyringe.name");
}
}
7 changes: 6 additions & 1 deletion src/main/resources/assets/viral/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ item.syringeCure.name=Cure Syringe
item.syringeImmunity.name=Immunity Syringe

# Chat
chat.cannotCure.name=§cYou cannot create immunity while still influenced by the "Viral".
chat.cannotCure.name=§cYou cannot create immunity while still influenced by the "Viral".

# Description
description.filledSyringe.name=Using an Empty Syringe click on an infected mob.
description.imunitySyringe.name=Can be used to make an uninfected mob immune from the virus.
description.cureSyringe.name=Able to cure a single mob of the virus.

0 comments on commit 1a67b34

Please sign in to comment.