public class PostRegistry extends java.lang.Object implements IPostRegistry
| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<IMailAddress,POBox> |
cachedPOBoxes |
static PostOffice |
cachedPostOffice |
static java.util.Map<IMailAddress,ITradeStation> |
cachedTradeStations |
| Constructor and Description |
|---|
PostRegistry() |
| Modifier and Type | Method and Description |
|---|---|
ILetter |
createLetter(IMailAddress sender,
IMailAddress recipient) |
net.minecraft.item.ItemStack |
createLetterStack(ILetter letter) |
void |
deleteTradeStation(net.minecraft.world.World world,
IMailAddress address) |
IPostalCarrier |
getCarrier(EnumAddressee type) |
ILetter |
getLetter(net.minecraft.item.ItemStack itemstack) |
IMailAddress |
getMailAddress(com.mojang.authlib.GameProfile gameProfile) |
IMailAddress |
getMailAddress(java.lang.String traderName) |
static POBox |
getOrCreatePOBox(net.minecraft.world.World world,
IMailAddress address) |
TradeStation |
getOrCreateTradeStation(net.minecraft.world.World world,
com.mojang.authlib.GameProfile owner,
IMailAddress address) |
static POBox |
getPOBox(net.minecraft.world.World world,
IMailAddress address) |
IPostOffice |
getPostOffice(net.minecraft.world.World world) |
java.util.Map<EnumAddressee,IPostalCarrier> |
getRegisteredCarriers() |
TradeStation |
getTradeStation(net.minecraft.world.World world,
IMailAddress address) |
boolean |
isAvailableTradeAddress(net.minecraft.world.World world,
IMailAddress address) |
boolean |
isLetter(net.minecraft.item.ItemStack itemstack) |
boolean |
isValidPOBox(net.minecraft.world.World world,
IMailAddress address) |
boolean |
isValidTradeAddress(net.minecraft.world.World world,
IMailAddress address) |
void |
registerCarrier(IPostalCarrier carrier)
Registers a new
IPostalCarrier. |
@Nullable public static PostOffice cachedPostOffice
public static final java.util.Map<IMailAddress,POBox> cachedPOBoxes
public static final java.util.Map<IMailAddress,ITradeStation> cachedTradeStations
public boolean isValidPOBox(net.minecraft.world.World world,
IMailAddress address)
isValidPOBox in interface IPostRegistryworld - the Minecraft world the PO box will be inaddress - the potential address of the PO box@Nullable public static POBox getPOBox(net.minecraft.world.World world, IMailAddress address)
public static POBox getOrCreatePOBox(net.minecraft.world.World world, IMailAddress address)
public boolean isValidTradeAddress(net.minecraft.world.World world,
IMailAddress address)
isValidTradeAddress in interface IPostRegistryworld - the Minecraft world the Trader will be inaddress - the potential address of the Traderpublic boolean isAvailableTradeAddress(net.minecraft.world.World world,
IMailAddress address)
isAvailableTradeAddress in interface IPostRegistryworld - the Minecraft world the Trader will be inaddress - the potential address of the Traderpublic TradeStation getTradeStation(net.minecraft.world.World world, IMailAddress address)
getTradeStation in interface IPostRegistrypublic TradeStation getOrCreateTradeStation(net.minecraft.world.World world, com.mojang.authlib.GameProfile owner, IMailAddress address)
getOrCreateTradeStation in interface IPostRegistrypublic void deleteTradeStation(net.minecraft.world.World world,
IMailAddress address)
deleteTradeStation in interface IPostRegistrypublic IPostOffice getPostOffice(net.minecraft.world.World world)
getPostOffice in interface IPostRegistrypublic IMailAddress getMailAddress(com.mojang.authlib.GameProfile gameProfile)
getMailAddress in interface IPostRegistrypublic IMailAddress getMailAddress(java.lang.String traderName)
getMailAddress in interface IPostRegistrypublic java.util.Map<EnumAddressee,IPostalCarrier> getRegisteredCarriers()
getRegisteredCarriers in interface IPostRegistrypublic void registerCarrier(IPostalCarrier carrier)
IPostRegistryIPostalCarrier. See IPostalCarrier for details.registerCarrier in interface IPostRegistrycarrier - IPostalCarrier to register.public IPostalCarrier getCarrier(EnumAddressee type)
getCarrier in interface IPostRegistrypublic ILetter createLetter(IMailAddress sender, IMailAddress recipient)
createLetter in interface IPostRegistrypublic net.minecraft.item.ItemStack createLetterStack(ILetter letter)
createLetterStack in interface IPostRegistry@Nullable public ILetter getLetter(net.minecraft.item.ItemStack itemstack)
getLetter in interface IPostRegistrypublic boolean isLetter(net.minecraft.item.ItemStack itemstack)
isLetter in interface IPostRegistry