convert a bunch of stuff to new APIs

This commit is contained in:
dfsek
2025-12-29 21:11:11 -07:00
parent 16705057e0
commit 9a16336f53
29 changed files with 167 additions and 87 deletions

View File

@@ -64,7 +64,7 @@ public class LootFunction implements Function<Void> {
registry.get(RegistryKey.parse(id))
.ifPresentOrElse(table -> {
.consume(table -> {
Vector3 apply = Vector3.of(FloatingPointFunctions.round(xz.getX()),
y.apply(implementationArguments, scope)
.intValue(),
@@ -91,8 +91,8 @@ public class LootFunction implements Function<Void> {
LOGGER.error("Could not apply loot at {}", apply, e);
e.printStackTrace();
}
},
() -> LOGGER.error("No such loot table {}", id));
}
).ifNothing(() -> LOGGER.error("No such loot table {}", id));
return null;
}

View File

@@ -91,10 +91,10 @@ public class StructureFunction implements Function<Boolean> {
FloatingPointFunctions.round(xz.getZ())),
arguments.getRandom(),
arguments.getRotation().rotate(rotation1));
}).orElseGet(() -> {
}).collect(left -> {
LOGGER.error("No such structure {}", app);
return false;
});
}, java.util.function.Function.identity());
}
@Override