-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add item blacklist and item priority list
- Loading branch information
Showing
21 changed files
with
362 additions
and
66 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.github.vfyjxf.nee; | ||
|
||
import com.github.vfyjxf.nee.processor.IRecipeProcessor; | ||
import com.github.vfyjxf.nee.processor.RecipeProcessor; | ||
import net.minecraft.command.CommandBase; | ||
import net.minecraft.command.ICommandSender; | ||
import net.minecraft.command.WrongUsageException; | ||
|
||
import java.util.List; | ||
|
||
import static com.github.vfyjxf.nee.NotEnoughEnergistics.logger; | ||
|
||
public class NEECommands extends CommandBase { | ||
@Override | ||
public String getCommandName() { | ||
return "nee"; | ||
} | ||
|
||
@Override | ||
public String getCommandUsage(ICommandSender sender) { | ||
return "use /nee RecipeProcessor to get RecipeProcessor and identifier,see them in log"; | ||
} | ||
|
||
@Override | ||
public void processCommand(ICommandSender sender, String[] args) { | ||
if (args.length != 0) { | ||
if ("RecipeProcessor".equals(args[0])) { | ||
for (IRecipeProcessor processor : RecipeProcessor.recipeProcessors) { | ||
logger.info("RecipeProcessor:" + processor.getRecipeProcessorId() + " identifier:"); | ||
for (String ident : processor.getAllOverlayIdentifier()) { | ||
logger.info(ident); | ||
} | ||
} | ||
} | ||
}else { | ||
throw new WrongUsageException("use /nee RecipeProcessor to get RecipeProcessor and identifier,see them in log"); | ||
} | ||
} | ||
|
||
@Override | ||
public List addTabCompletionOptions(ICommandSender sender, String[] args) { | ||
return CommandBase.getListOfStringsMatchingLastWord(args, "RecipeProcessor"); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.github.vfyjxf.nee; | ||
|
||
import net.minecraftforge.common.config.Configuration; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* @author vfyjxf | ||
*/ | ||
public class NEEConfig { | ||
|
||
|
||
public static String[] transformBlacklist = new String[0]; | ||
public static String[] transformPriorityList = new String[0]; | ||
|
||
public static void loadConfig(File configFile) { | ||
Configuration config = new Configuration(configFile); | ||
config.load(); | ||
|
||
transformBlacklist = config.get("client", "transformItemBlacklist", new String[0], | ||
"If item in the blacklist, it will not be transferred.\n" + | ||
"the format is \" {modid:modid,name:name,meta:meta,recipeProcessor:recipeProcessorID,identifier:identifier}\"\n"+ | ||
"example: \"{modid:minecraft,name:iron_ingot,recipeProcessor:EnderIO,identifier:EnderIOAlloySmelter}\"").getStringList(); | ||
transformPriorityList = config.get("client", "transformItemPriorityList", new String[0], | ||
"If item in tne priority list, it will be transferred first.").getStringList(); | ||
if (config.hasChanged()) config.save(); | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.