Commits

Niklas Merkelt authored and md_5 committed e73ec6b833d
Update inventory properties to match current protocol
No tags

src/main/java/org/bukkit/inventory/InventoryView.java

Modified
15 15 public abstract class InventoryView {
16 16 public final static int OUTSIDE = -999;
17 17 /**
18 18 * Represents various extra properties of certain inventory windows.
19 19 */
20 20 public enum Property {
21 21 /**
22 22 * The progress of the down-pointing arrow in a brewing inventory.
23 23 */
24 24 BREW_TIME(0, InventoryType.BREWING),
25 - /**
26 - * The progress of the right-pointing arrow in a furnace inventory.
27 - */
28 - COOK_TIME(0, InventoryType.FURNACE),
29 25 /**
30 26 * The progress of the flame in a furnace inventory.
31 27 */
32 - BURN_TIME(1, InventoryType.FURNACE),
28 + BURN_TIME(0, InventoryType.FURNACE),
33 29 /**
34 30 * How many total ticks the current fuel should last.
35 31 */
36 - TICKS_FOR_CURRENT_FUEL(2, InventoryType.FURNACE),
32 + TICKS_FOR_CURRENT_FUEL(1, InventoryType.FURNACE),
33 + /**
34 + * The progress of the right-pointing arrow in a furnace inventory.
35 + */
36 + COOK_TIME(2, InventoryType.FURNACE),
37 + /**
38 + * How many total ticks the current smelting should last.
39 + */
40 + TICKS_FOR_CURRENT_SMELTING(3, InventoryType.FURNACE),
37 41 /**
38 42 * In an enchanting inventory, the top button's experience level
39 43 * value.
40 44 */
41 45 ENCHANT_BUTTON1(0, InventoryType.ENCHANTING),
42 46 /**
43 47 * In an enchanting inventory, the middle button's experience level
44 48 * value.
45 49 */
46 50 ENCHANT_BUTTON2(1, InventoryType.ENCHANTING),
47 51 /**
48 52 * In an enchanting inventory, the bottom button's experience level
49 53 * value.
50 54 */
51 - ENCHANT_BUTTON3(2, InventoryType.ENCHANTING);
55 + ENCHANT_BUTTON3(2, InventoryType.ENCHANTING),
56 + /**
57 + * In an enchanting inventory, the first four bits of the player's xpSeed.
58 + */
59 + ENCHANT_XP_SEED(3, InventoryType.ENCHANTING),
60 + /**
61 + * In an enchanting inventory, the top button's enchantment's id
62 + */
63 + ENCHANT_ID1(4, InventoryType.ENCHANTING),
64 + /**
65 + * In an enchanting inventory, the middle button's enchantment's id
66 + */
67 + ENCHANT_ID2(5, InventoryType.ENCHANTING),
68 + /**
69 + * In an enchanting inventory, the bottom button's enchantment's id
70 + */
71 + ENCHANT_ID3(6, InventoryType.ENCHANTING),
72 + /**
73 + * In an enchanting inventory, the top button's level value.
74 + */
75 + ENCHANT_LEVEL1(7, InventoryType.ENCHANTING),
76 + /**
77 + * In an enchanting inventory, the middle button's level value.
78 + */
79 + ENCHANT_LEVEL2(8, InventoryType.ENCHANTING),
80 + /**
81 + * In an enchanting inventory, the bottom button's level value.
82 + */
83 + ENCHANT_LEVEL3(9, InventoryType.ENCHANTING),
84 + /**
85 + * In an beacon inventory, the levels of the beacon
86 + */
87 + LEVELS(0, InventoryType.BEACON),
88 + /**
89 + * In an beacon inventory, the primary potion effect
90 + */
91 + PRIMARY_EFFECT(1, InventoryType.BEACON),
92 + /**
93 + * In an beacon inventory, the secondary potion effect
94 + */
95 + SECONDARY_EFFECT(2, InventoryType.BEACON),
96 + /**
97 + * The repair's cost in xp levels
98 + */
99 + REPAIR_COST(0, InventoryType.ANVIL);
52 100 int id;
53 101 InventoryType style;
54 102 private Property(int id, InventoryType appliesTo) {
55 103 this.id = id;
56 104 style = appliesTo;
57 105 }
58 106
59 107 public InventoryType getType() {
60 108 return style;
61 109 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut