(self)
return data
Formats the slot for network packing.
Formats the slot for network packing.
Formats the slot for network packing .
def get_dict(self):
        """ Formats the slot for network packing. """
        data = {'id': self.item_id}
        if self.item_id != constants.INV_ITEMID_EMPTY:
            data['damage'] = self.damage
            data['amount'] = self.amount
            if self.nbt is not None:
                data['enchants'] = self.nbt
        return data
def get_dict ( self ) : data = { 'id' : self . item_id } if self . item_id != constants . INV_ITEMID_EMPTY : data [ 'damage' ] = self . damage data [ 'amount' ] = self . amount if self . nbt is not None : data [ 'enchants' ] = self . nbt return data