Address is a crucial part of a delivery system, allowing correct routing of mail.
Usage
Mailbox
Each mailbox must have an address to be able to send and receive mail.
Address is selected and applied to a mailable item using an address tag.
It's also used in a "sender" field and delivery log.
Types
There are 5 types of addresses:
- Block: mailbox
- Player: player name; resolves to player's default mailbox
- Service: NPCs
- Custom: for use in commands; cannot receive mail
- Unknown: for cases where address could not be determined or does not exist
Players would mostly be dealing with Block, Player and Service types in-game.
Info
Service addresses use translations for their names,
and they will work and resolve correctly regardless of the selected language.
Data
Definition
Addresses can be defined in commands or json like this:
json
{ "type":"block", "id":"Mortuus Base" }{ "type":"player", "name":"mortuusars" }{ "type":"service", "definition":"envelope:automated_supply_service" }{ "type":"custom", "name":{ "translate": "entity.minecraft.villager" } }{ "type":"unknown" }
Heads up!
As opposed to the rest of the types which can be defined freely, service address needs to be registered first.