start working on error handling stuff

This commit is contained in:
dfsek
2025-12-29 22:18:44 -07:00
parent 9a16336f53
commit cb08401536
76 changed files with 212 additions and 165 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().orThrow().world().getPack().getRegistry(Structure.class);
return sender.sender().entity().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().orThrow();
Entity sender = context.sender().entity().orThrow();
structure.generate(
sender.position().toInt(),
sender.world(),