Compare commits

..
9 changed files with 20 additions and 12 deletions

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.42'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43'
}
@@ -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);
@@ -31,7 +31,7 @@ public class KeyManager {
public static void tickKeyStates() {
for (Entry<String, KeyState> entry : keyStates.entrySet()) {
final int keyCode = NEIKeyboardUtils.unhash(NEIClientConfig.getKeyBinding(entry.getKey()));
final boolean down = keyCode < Keyboard.KEYBOARD_SIZE ? Keyboard.isKeyDown(keyCode) : null;
final boolean down = keyCode > 0 && keyCode < Keyboard.KEYBOARD_SIZE && Keyboard.isKeyDown(keyCode);
final KeyState state = entry.getValue();
if (down) {
@@ -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);
@@ -117,7 +117,7 @@ public class BookmarkGridGenerator {
this.itemToSlot.put(collapsedItemIndex, absoluteSlotIndex);
this.caclulatedItems.put(collapsedItemIndex, getItem(group, collapsedItemIndex));
if (!(shadows = getShadows(group, item.recipeId)).isEmpty()) {
if (item.recipeId != null && !(shadows = getShadows(group, item.recipeId)).isEmpty()) {
borderGrid.put(absoluteSlotIndex, "recipe:" + shadows.get(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);
@@ -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;
@@ -1254,8 +1254,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,,,,,,
1 handler itemName nbtInfo modId modRequired excludedModId priority minVersion maxVersion forceClassName itemNotes
1254 bw.recipe.biolab gregtech:gt.blockmachines:12706 bartworks TRUE
1255 bw.recipe.biolab gregtech:gt.blockmachines:12707 bartworks TRUE
1256 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
1257 bw.recipe.BacteriaVat gregtech:gt.blockmachines:12712 bartworks TRUE
1258 gt.recipe.electricimplosioncompressor gregtech:gt.blockmachines:12734 bartworks TRUE
1259 gt.recipe.dieselgeneratorfuel gregtech:gt.blockmachines:1113 GoodGenerator TRUE