mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 19:29:17 +00:00
Use EnumAddressee instead of String to identify mail carriers
This commit is contained in:
1 parent
d6c3c8093c
commit
dff81eb85c
6 files changed
+20
-29
No files matched your search
@@ -159,20 +159,13 @@ public class PostOffice extends WorldSavedData implements IPostOffice {
|
||||
|
||||
IPostalState state = EnumDeliveryState.NOT_MAILABLE;
|
||||
for (IMailAddress address : letter.getRecipients()) {
|
||||
IPostalCarrier carrier = PostManager.postRegistry.getCarrier(address.getType().toString());
|
||||
IPostalCarrier carrier = PostManager.postRegistry.getCarrier(address.getType());
|
||||
if (carrier == null)
|
||||
continue;
|
||||
state = carrier.deliverLetter(world, this, address, itemstack, doLodge);
|
||||
if (!state.isOk())
|
||||
break;
|
||||
}
|
||||
/*
|
||||
for (MailAddress address : letter.getRecipients())
|
||||
if (address.isPlayer())
|
||||
state = storeInPOBox(world, address, itemstack, doLodge);
|
||||
else if (address.getType().equals(EnumAddressee.TRADER.toString()))
|
||||
state = handleTradeLetter(world, address, itemstack, doLodge);
|
||||
*/
|
||||
|
||||
if (!state.isOk())
|
||||
return state;
|
||||
|
||||
Reference in new issue
Block a user