Merge branch 'master' into 1.17

# Conflicts:
#	gradle.properties
This commit is contained in:
gnembon committed 2021-01-15 11:41:07 -04:00
commit 981dcf6eaa
6 files changed
+21 -7

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.0
# Mod Properties
mod_version = 1.4.22
mod_version = 1.4.23
maven_group = carpet
archives_base_name = fabric-carpet
@@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx1G
# The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5)
# This is needed because CF uses too vague names for prereleases and release candidates
# Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN]
release-curse-versions = 1.16.3,1.16.4
release-curse-versions = 1.16.4,1.16.5
# Whether or not to build another branch on release
release-extra-branch = true
# The name of the second branch to release
+1 -1
View File
@@ -37,7 +37,7 @@ import static carpet.settings.RuleCategory.CLIENT;
@SuppressWarnings("CanBeFinal")
public class CarpetSettings
{
public static final String carpetVersion = "1.4.22+v210113";
public static final String carpetVersion = "1.4.23+v210115";
public static final Logger LOG = LogManager.getLogger("carpet");
public static boolean skipGenerationChecks = false;
public static boolean impendingFillSkipUpdates = false;
@@ -76,9 +76,14 @@ public class FileModule extends Module
}
catch (IOException e)
{
try
// Copy of NbtIo.read(File) because that's now client-side only
if (!file.exists())
{
return NbtIo.read(file);
return null;
}
try (DataInputStream in = new DataInputStream(new FileInputStream(file)))
{
return NbtIo.read(in);
}
catch (IOException ioException)
{
@@ -57,7 +57,7 @@ public class DataStructures {
if (lv.size() == 1)
{
hwat = lv.get(0);
delimiter = StringValue.EMPTY;
delimiter = null;
}
else if (lv.size() == 2)
{
@@ -350,6 +350,11 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf
@Override
public Value split(Value delimiter) {
ListValue result = new ListValue();
if (delimiter == null)
{
this.forEach(item -> result.items.add(of(item)));
return result;
}
int startIndex = 0;
int index = 0;
for (Value val : this.items)
+5 -1
View File
@@ -193,7 +193,11 @@ public abstract class Value implements Comparable<Value>, Cloneable
public Value split(Value delimiter)
{
try
if (delimiter == null)
{
delimiter = StringValue.EMPTY;
}
try
{
return ListValue.wrap(Arrays.stream(getString().split(delimiter.getString())).map(StringValue::new).collect(Collectors.toList()));
}