Skip to content

Delivery Table

mortuusars edited this page Dec 12, 2023 · 1 revision

There are several properties of Delivery Table NBT data, that can be useful for specific scenarios:

  • VoidAgreementOnBreak (true/false): When table is broken - Agreement will not drop.
  • AgreementLock ({}): When Agreements is locked, it cannot be removed from the table, but it will still drop when the table is broken (if VoidAgreementOnBreak is false). It has these properties:
    • UnlockBehavior ("never/completed/expired/completed_or_expired"): controls when Agreement can be removed again.
    • Locked (true/false): General value to lock the Agreement.
    • MatchBuyerName (Component): If Agreement's 'buyerName' matches this value, it will be locked
    • MatchBuyerAddress (Component): If Agreement's 'buyerAddress' matches this value, it will be locked
    • MatchSeal (String): If Agreement's 'seal' matches this value, it will be locked

Examples of AgreementLock definition:
/give @s wares:delivery_table{BlockEntityTag:{ AgreementLock:{Locked:true, UnlockBehavior:"completed_or_expired"} }}
/give @s wares:delivery_table{BlockEntityTag:{ AgreementLock:{MatchBuyerName:'{"text":"Example Name"}', UnlockBehavior:"never"} }}
*Values for buyer name and address in DeliveryAgreement should be completely equal to the AgreementLock ones for it to match.