-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6eed0b
commit 35d6c48
Showing
5 changed files
with
49 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.daemon=false | ||
#Mod Info | ||
mod_version=1.5.1 | ||
mod_version=1.16.3 | ||
#Dependencies | ||
forge_version=1.16.2-33.0.61 | ||
forge_version=1.16.3-34.0.1 | ||
mcp_version=20200820-1.16.1 | ||
jei_version=1.16.2:7.3.2.25 |
66 changes: 33 additions & 33 deletions
66
src/main/java/com/direwolf20/mininggadgets/client/MiningGadgetsJEI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
package com.direwolf20.mininggadgets.client; | ||
|
||
import com.direwolf20.mininggadgets.common.Config; | ||
import com.direwolf20.mininggadgets.common.MiningGadgets; | ||
import com.direwolf20.mininggadgets.common.items.MiningGadget; | ||
import com.direwolf20.mininggadgets.common.items.ModItems; | ||
import mezz.jei.api.IModPlugin; | ||
import mezz.jei.api.JeiPlugin; | ||
import mezz.jei.api.ingredients.subtypes.ISubtypeInterpreter; | ||
import mezz.jei.api.registration.ISubtypeRegistration; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
@JeiPlugin | ||
public class MiningGadgetsJEI implements IModPlugin { | ||
@Override | ||
public ResourceLocation getPluginUid() { | ||
return new ResourceLocation(MiningGadgets.MOD_ID, "jei_plugin"); | ||
} | ||
|
||
@Override | ||
public void registerItemSubtypes(ISubtypeRegistration registration) { | ||
registration.registerSubtypeInterpreter(ModItems.MININGGADGET.get(), itemStack -> { | ||
if(!(itemStack.getItem() instanceof MiningGadget)) | ||
return ISubtypeInterpreter.NONE; | ||
|
||
double energy = itemStack.getOrCreateTag().getDouble("energy"); | ||
if (energy == 0) | ||
return "empty"; | ||
else if (energy == Config.MININGGADGET_MAXPOWER.get()) | ||
return "charged"; | ||
|
||
return ISubtypeInterpreter.NONE; | ||
}); | ||
} | ||
} | ||
//import com.direwolf20.mininggadgets.common.Config; | ||
//import com.direwolf20.mininggadgets.common.MiningGadgets; | ||
//import com.direwolf20.mininggadgets.common.items.MiningGadget; | ||
//import com.direwolf20.mininggadgets.common.items.ModItems; | ||
//import mezz.jei.api.IModPlugin; | ||
//import mezz.jei.api.JeiPlugin; | ||
//import mezz.jei.api.ingredients.subtypes.ISubtypeInterpreter; | ||
//import mezz.jei.api.registration.ISubtypeRegistration; | ||
//import net.minecraft.util.ResourceLocation; | ||
// | ||
//@JeiPlugin | ||
//public class MiningGadgetsJEI implements IModPlugin { | ||
// @Override | ||
// public ResourceLocation getPluginUid() { | ||
// return new ResourceLocation(MiningGadgets.MOD_ID, "jei_plugin"); | ||
// } | ||
// | ||
// @Override | ||
// public void registerItemSubtypes(ISubtypeRegistration registration) { | ||
// registration.registerSubtypeInterpreter(ModItems.MININGGADGET.get(), itemStack -> { | ||
// if(!(itemStack.getItem() instanceof MiningGadget)) | ||
// return ISubtypeInterpreter.NONE; | ||
// | ||
// double energy = itemStack.getOrCreateTag().getDouble("energy"); | ||
// if (energy == 0) | ||
// return "empty"; | ||
// else if (energy == Config.MININGGADGET_MAXPOWER.get()) | ||
// return "charged"; | ||
// | ||
// return ISubtypeInterpreter.NONE; | ||
// }); | ||
// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters