mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-24 13:31:33 +00:00
convert a bunch of stuff to new APIs
This commit is contained in:
+2
-2
@@ -41,7 +41,7 @@ public class LocateCommandAddon implements AddonInitializer {
|
||||
private BaseAddon addon;
|
||||
|
||||
private static Registry<Biome> getBiomeRegistry(CommandContext<CommandSender> sender) {
|
||||
return sender.sender().getEntity().orElseThrow().world().getPack().getRegistry(Biome.class);
|
||||
return sender.sender().getEntity().orThrow().world().getPack().getRegistry(Biome.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,7 +69,7 @@ public class LocateCommandAddon implements AddonInitializer {
|
||||
.handler(context -> {
|
||||
// 1. Gather Context & Arguments
|
||||
Biome targetBiome = context.get("biome");
|
||||
Entity sender = context.sender().getEntity().orElseThrow(
|
||||
Entity sender = context.sender().getEntity().orThrow(
|
||||
() -> new Error("Only entities can run this command."));
|
||||
World world = sender.world();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user