mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-19 23:00:19 +00:00
add more api helpers
This commit is contained in:
@@ -62,9 +62,10 @@ public class LootFunction implements Function<Void> {
|
||||
|
||||
String id = data.apply(implementationArguments, scope);
|
||||
|
||||
|
||||
registry.get(RegistryKey.parse(id))
|
||||
.consume(table -> {
|
||||
RegistryKey.parse(id)
|
||||
.bind(registry::getEither)
|
||||
.consume(left -> LOGGER.error("No such loot table {}", id),
|
||||
table -> {
|
||||
Vector3 apply = Vector3.of(FloatingPointFunctions.round(xz.getX()),
|
||||
y.apply(implementationArguments, scope)
|
||||
.intValue(),
|
||||
@@ -92,7 +93,7 @@ public class LootFunction implements Function<Void> {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
).ifNothing(() -> LOGGER.error("No such loot table {}", id));
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user