fix deprecation
This commit is contained in:
@@ -141,14 +141,9 @@ dependencies {
|
|||||||
|
|
||||||
def targetJavaVersion = 21
|
def targetJavaVersion = 21
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
|
||||||
// this fixes some edge cases with special characters not displaying correctly
|
|
||||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
|
||||||
// If Javadoc is generated, this must be specified in that task too.
|
|
||||||
it.options.encoding = "UTF-8"
|
it.options.encoding = "UTF-8"
|
||||||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
it.options.release = targetJavaVersion
|
||||||
it.options.release = targetJavaVersion
|
it.options.deprecation = true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
|||||||
@@ -220,7 +220,11 @@ public class DHImporter implements IDataImporter {
|
|||||||
bStateStr = encEntry.substring(sIdx + STATE_STRING_SEPARATOR.length());
|
bStateStr = encEntry.substring(sIdx + STATE_STRING_SEPARATOR.length());
|
||||||
}
|
}
|
||||||
var bId = Identifier.of(encEntry.substring(b, sIdx != -1 ? sIdx : encEntry.length()));
|
var bId = Identifier.of(encEntry.substring(b, sIdx != -1 ? sIdx : encEntry.length()));
|
||||||
var block = this.blockRegistry.getEntry(bId).orElse(Blocks.AIR.getRegistryEntry()).value();
|
var maybeBlock = this.blockRegistry.getEntry(bId);
|
||||||
|
Block block = Blocks.AIR;
|
||||||
|
if (maybeBlock.isPresent()) {
|
||||||
|
block = maybeBlock.get().value();
|
||||||
|
}
|
||||||
var state = block.getDefaultState();
|
var state = block.getDefaultState();
|
||||||
if (bStateStr != null && block != Blocks.AIR) {
|
if (bStateStr != null && block != Blocks.AIR) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user