mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-18 14:20:02 +00:00
convert a bunch of stuff to new APIs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user