Compare commits

..
8 changed files with 30 additions and 15 deletions

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
dependencies {
api('com.github.GTNewHorizons:CodeChickenCore:1.4.7:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.6.39:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.6.40:dev')
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
@@ -180,8 +180,9 @@ public class ClientHandler {
new InputStreamReader(res.getInputStream(), StandardCharsets.UTF_8))) {
NEIClientConfig.logger.info("Loading '{}' from jar {}", resource, location);
callback.accept(
IOUtils.readLines(reader).stream().map(String::trim)
.filter(line -> !line.isEmpty() && !line.startsWith("#")));
IOUtils.readLines(reader).stream()
.map(line -> line.contains("#") ? line.substring(0, line.indexOf('#')) : line)
.map(String::trim).filter(line -> !line.isEmpty()));
return true;
}
@@ -209,8 +210,9 @@ public class ClientHandler {
try (FileReader reader = new FileReader(file)) {
NEIClientConfig.logger.info("Loading '{}' file {}", resource, file);
callback.accept(
IOUtils.readLines(reader).stream().map(String::trim)
.filter(line -> !line.isEmpty() && !line.startsWith("#")));
IOUtils.readLines(reader).stream()
.map(line -> line.contains("#") ? line.substring(0, line.indexOf('#')) : line)
.map(String::trim).filter(line -> !line.isEmpty()));
return true;
} catch (IOException e) {
NEIClientConfig.logger.error("Failed to load '{}' file {}", resource, file, e);
@@ -147,6 +147,8 @@ public class NEIClientConfig {
tag.getTag("inventory.widgetsenabled").getBooleanValue(true);
API.addOption(new OptionToggleButton("inventory.widgetsenabled"));
tag.getTag("findFuelsParallel").getBooleanValue(true);
tag.getTag("inventory.autocrafting").getBooleanValue(true);
tag.getTag("inventory.dynamicFontSize").getBooleanValue(true);
tag.getTag("inventory.hidden").getBooleanValue(false);
@@ -138,7 +138,7 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
return true;
}
if (button == 1 && slot instanceof SlotCrafting) // right click
if (button == 1 && modifier != 2 && slot instanceof SlotCrafting) // right click
{
for (int i1 = 0; i1 < 64; i1++) // click this slot 64 times
manager.handleSlotClick(slot.slotNumber, button, 0);
@@ -62,7 +62,13 @@ public class RecipeHandlerQuery<T extends IRecipeHandler> {
private ArrayList<T> getRecipeHandlersParallel() throws InterruptedException, ExecutionException {
// Pre-find the fuels so we're not fighting over it
FuelRecipeHandler.findFuelsOnceParallel();
if (NEIClientConfig.getBooleanSetting("findFuelsParallel")) {
FuelRecipeHandler.findFuelsOnceParallel();
} else {
FuelRecipeHandler.findFuelsOnce();
}
ArrayList<T> handlers = getSerialHandlersWithRecipes();
handlers.addAll(getHandlersWithRecipes());
handlers.sort(NEIClientConfig.HANDLER_COMPARATOR);
@@ -45,6 +45,7 @@ import codechicken.nei.api.IStackPositioner;
import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.guihook.IContainerInputHandler;
import codechicken.nei.guihook.IContainerTooltipHandler;
import cpw.mods.fml.common.FMLLog;
/**
* A Template Recipe Handler! How about that. Because it was sooo hard, and more seriously required lots of copied code
@@ -108,10 +109,15 @@ public abstract class TemplateRecipeHandler implements ICraftingHandler, IUsageH
}
private static FurnaceRecipeHandler.FuelPair identifyFuel(final ItemStack itemStack) {
if (efuels.contains(itemStack.getItem())) return null;
final int burnTime = TileEntityFurnace.getItemBurnTime(itemStack);
if (burnTime <= 0) return null;
return new FurnaceRecipeHandler.FuelPair(itemStack.copy(), burnTime);
try {
if (efuels.contains(itemStack.getItem())) return null;
final int burnTime = TileEntityFurnace.getItemBurnTime(itemStack);
if (burnTime <= 0) return null;
return new FurnaceRecipeHandler.FuelPair(itemStack.copy(), burnTime);
} catch (Exception e) {
FMLLog.getLogger().error("NEI: Error identifying fuel for item " + itemStack.getItem());
throw e;
}
}
/**
@@ -25,7 +25,7 @@ public class DefaultStackStringifyHandler implements IStackStringifyHandler {
nbTag.setShort("Damage", (short) stack.getItemDamage());
if (stack.hasTagCompound() && !stack.getTagCompound().hasNoTags()) {
nbTag.setTag("tag", stack.getTagCompound());
nbTag.setTag("tag", stack.getTagCompound().copy());
}
return nbTag;
@@ -822,6 +822,7 @@ gt.recipe.largeboilerfakefuels,gregtech:gt.blockmachines:1023,,gregtech,TRUE,gre
gt.recipe.vacuumfreezer,gregtech:gt.blockmachines:1002,,gregtech,TRUE,gregapi_post,,,,,
smelting,gregtech:gt.blockmachines:1003,,gregtech,TRUE,gregapi_post,,,,,
smelting,gregtech:gt.blockmachines:15412,,gregtech,TRUE,gregapi_post,,,,,
smelting,gregtech:gt.blockmachines:31087,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.dieselgeneratorfuel,gregtech:gt.blockmachines:1110,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.dieselgeneratorfuel,gregtech:gt.blockmachines:1111,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.dieselgeneratorfuel,gregtech:gt.blockmachines:1112,,gregtech,TRUE,gregapi_post,,,,,
@@ -1254,8 +1255,6 @@ bw.recipe.biolab,gregtech:gt.blockmachines:12705,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12706,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12707,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12708,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12709,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12710,,bartworks,TRUE,,,,,,
bw.recipe.BacteriaVat,gregtech:gt.blockmachines:12712,,bartworks,TRUE,,,,,,
gt.recipe.electricimplosioncompressor,gregtech:gt.blockmachines:12734,,bartworks,TRUE,,,,,,
gt.recipe.dieselgeneratorfuel,gregtech:gt.blockmachines:1113,,GoodGenerator,TRUE,,,,,,
@@ -1484,4 +1483,4 @@ straywolfe.cookingwithtfc.client.nei.ClayOvenRecipeHandler,cookingwithtfc:item.c
factorization.nei.RecipeGrinder,factorization:diamond_cutting_head,,factorization,TRUE,,,,,,,,,,,
factorization.nei.RecipeMixer,factorization:FzBlock:18,,factorization,TRUE,,,,,,,,,,,
ua.pp.shurgent.tfctech.nei.WireDrawBenchRecipeHandler,tfctech:item.Wire Draw Bench,,tfctech,TRUE,,,,,,,,,,,
mekanism.client.nei.ElectrolyticSeparatorRecipeHandler,Mekanism:MachineBlock2:4,,Mekanism,TRUE,,,,,,,,,,,
mekanism.client.nei.ElectrolyticSeparatorRecipeHandler,Mekanism:MachineBlock2:4,,Mekanism,TRUE,,,,,,,,,,,
1 handler itemName nbtInfo modId modRequired excludedModId priority minVersion maxVersion forceClassName itemNotes
822 gt.recipe.vacuumfreezer gregtech:gt.blockmachines:1002 gregtech TRUE gregapi_post
823 smelting gregtech:gt.blockmachines:1003 gregtech TRUE gregapi_post
824 smelting gregtech:gt.blockmachines:15412 gregtech TRUE gregapi_post
825 smelting gregtech:gt.blockmachines:31087 gregtech TRUE gregapi_post
826 gt.recipe.dieselgeneratorfuel gregtech:gt.blockmachines:1110 gregtech TRUE gregapi_post
827 gt.recipe.dieselgeneratorfuel gregtech:gt.blockmachines:1111 gregtech TRUE gregapi_post
828 gt.recipe.dieselgeneratorfuel gregtech:gt.blockmachines:1112 gregtech TRUE gregapi_post
1255 bw.recipe.biolab gregtech:gt.blockmachines:12706 bartworks TRUE
1256 bw.recipe.biolab gregtech:gt.blockmachines:12707 bartworks TRUE
1257 bw.recipe.biolab gregtech:gt.blockmachines:12708 bartworks TRUE
bw.recipe.biolab gregtech:gt.blockmachines:12709 bartworks TRUE
bw.recipe.biolab gregtech:gt.blockmachines:12710 bartworks TRUE
1258 bw.recipe.BacteriaVat gregtech:gt.blockmachines:12712 bartworks TRUE
1259 gt.recipe.electricimplosioncompressor gregtech:gt.blockmachines:12734 bartworks TRUE
1260 gt.recipe.dieselgeneratorfuel gregtech:gt.blockmachines:1113 GoodGenerator TRUE
1483 factorization.nei.RecipeGrinder factorization:diamond_cutting_head factorization TRUE
1484 factorization.nei.RecipeMixer factorization:FzBlock:18 factorization TRUE
1485 ua.pp.shurgent.tfctech.nei.WireDrawBenchRecipeHandler tfctech:item.Wire Draw Bench tfctech TRUE
1486 mekanism.client.nei.ElectrolyticSeparatorRecipeHandler Mekanism:MachineBlock2:4 Mekanism TRUE