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

@@ -34,7 +34,7 @@ public class StructureCommandAddon implements AddonInitializer {
private BaseAddon addon;
private static Registry<Structure> getStructureRegistry(CommandContext<CommandSender> sender) {
return sender.sender().getEntity().orElseThrow().world().getPack().getRegistry(Structure.class);
return sender.sender().getEntity().orThrow().world().getPack().getRegistry(Structure.class);
}
@Override
@@ -55,7 +55,7 @@ public class StructureCommandAddon implements AddonInitializer {
.optional("rotation", EnumParser.enumParser(Rotation.class), DefaultValue.constant(Rotation.NONE))
.handler(context -> {
Structure structure = context.get("structure");
Entity sender = context.sender().getEntity().orElseThrow();
Entity sender = context.sender().getEntity().orThrow();
structure.generate(
sender.position().toInt(),
sender.world(),