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
@@ -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();