IJInventoryItem.h 947 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // IJInventoryItem.h
  3. // InsideJob
  4. //
  5. // Created by Adam Preble on 10/7/10.
  6. // Copyright 2010 Adam Preble. All rights reserved.
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. // See: http://www.minecraftwiki.net/wiki/Data_values
  10. #define IJInventorySlotQuickFirst (0)
  11. #define IJInventorySlotQuickLast (8)
  12. #define IJInventorySlotNormalFirst (9)
  13. #define IJInventorySlotNormalLast (35)
  14. #define IJInventorySlotArmorLast (103) // head
  15. #define IJInventorySlotArmorFirst (100) // feet
  16. @interface IJInventoryItem : NSObject {
  17. uint16_t itemId;
  18. uint16_t damage;
  19. uint8_t count;
  20. uint8_t slot;
  21. }
  22. @property (nonatomic, assign) uint16_t itemId;
  23. @property (nonatomic, assign) uint16_t damage;
  24. @property (nonatomic, assign) uint8_t count;
  25. @property (nonatomic, assign) uint8_t slot;
  26. @property (nonatomic, readonly) NSString *itemName;
  27. @property (nonatomic, readonly) NSImage *image;
  28. + (id)emptyItemWithSlot:(uint8_t)slot;
  29. + (NSDictionary *)itemIdLookup;
  30. @end