Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,29 @@ repositories {
includeGroupAndSubgroups("com.terraformersmc")
}
}
exclusiveContent {
forRepository {
maven {
name = "MrCrayfish (GitHub)"
url = "https://maven.pkg.github.com/MrCrayfish/Maven"
credentials {
username = findProperty("gpr.user") ?: System.getenv("GPR_USER")
password = findProperty("gpr.key") ?: System.getenv("GPR_KEY")
if (findProperty("gpr.user") ?: System.getenv("GPR_USER")) {
exclusiveContent {
forRepository {
maven {
name = "MrCrayfish (GitHub)"
url = "https://maven.pkg.github.com/MrCrayfish/Maven"
credentials {
username = findProperty("gpr.user") ?: System.getenv("GPR_USER")
password = findProperty("gpr.key") ?: System.getenv("GPR_KEY")
}
}
}
}
filter {
includeGroupAndSubgroups("com.mrcrayfish")
filter {
includeGroupAndSubgroups("com.mrcrayfish")
}
}
}
if (!System.getenv("CI")) {
if (System.getenv("LOCAL_MAVEN") && !System.getenv("CI")) {
maven {
url "file://" + System.getenv("LOCAL_MAVEN")
url "file://${System.getenv("LOCAL_MAVEN")}"
}
} else {
mavenLocal()
}
maven {
name = 'BlameJared'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mrcrayfish.configured.client.screen.list;

import com.mrcrayfish.configured.Constants;
import net.minecraft.network.chat.Component;

import java.util.function.Function;
Expand All @@ -13,7 +14,7 @@ public class ListType<T> implements IListType<T>
public ListType(Function<T, String> stringParser, Function<String, T> valueParser, String hintKey)
{
this.stringParser = stringParser;
this.valueParser = valueParser;
this.valueParser = new ErrorSuppressingParserWrapper<>(valueParser);
this.hintKey = hintKey;
}

Expand All @@ -34,4 +35,21 @@ public Component getHint()
{
return Component.translatable(this.hintKey);
}

private record ErrorSuppressingParserWrapper<T>(Function<String, T> wrapped) implements Function<String, T>
{
@Override
public T apply(String s)
{
try
{
return this.wrapped.apply(s);
}
catch(RuntimeException e)
{
Constants.LOG.debug(String.format("Suppressing error parsing value: %s", s), e);
return null;
}
}
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fabric_version=0.97.8+1.20.6
fabric_loader_version=0.15.10

# NeoForge
neoforge_version=20.6.48-beta
neoforge_version=20.6.99-beta
neoforge_version_range=[20.6,)
neoforge_loader_version_range=[2,)

Expand All @@ -31,7 +31,7 @@ mod_issues=https://github.com/MrCrayfish/Configured/issues
mod_license=GNU Lesser General Public License v3.0

# Dependency options
framework_version=0.8.8
framework_version=0.8.13
jei_version=17.3.0.48
catalogue_version=1.10.1

Expand Down