|
1 | 1 | --- before/net/minecraft/inventory/ContainerBrewingStand.java |
2 | 2 | +++ after/net/minecraft/inventory/ContainerBrewingStand.java |
3 | | -@@ -29,33 +29,31 @@ |
4 | | - this.slot = this.addSlotToContainer(new ContainerBrewingStand.Ingredient(tileBrewingStandIn, 3, 79, 17)); |
5 | | - this.addSlotToContainer(new ContainerBrewingStand.Fuel(tileBrewingStandIn, 4, 17, 17)); |
6 | | - |
7 | | -- for (int i = 0; i < 3; i++) |
8 | | -+ for (int i = 0; i < 3; ++i) |
9 | | - { |
10 | | -- for (int j = 0; j < 9; j++) |
11 | | -+ for (int j = 0; j < 9; ++j) |
12 | | - { |
13 | | - this.addSlotToContainer(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); |
14 | | - } |
15 | | - } |
16 | | - |
17 | | -- for (int k = 0; k < 9; k++) |
18 | | -+ for (int k = 0; k < 9; ++k) |
19 | | - { |
20 | | - this.addSlotToContainer(new Slot(playerInventory, k, 8 + k * 18, 142)); |
21 | | - } |
22 | | - } |
23 | | - |
24 | | -- @Override |
25 | | - public void addListener(IContainerListener listener) |
26 | | - { |
27 | | - super.addListener(listener); |
28 | | - listener.sendAllWindowProperties(this, this.tileBrewingStand); |
29 | | - } |
30 | | - |
31 | | -- @Override |
32 | | - public void detectAndSendChanges() |
33 | | - { |
34 | | - super.detectAndSendChanges(); |
35 | | - |
36 | | -- for (int i = 0; i < this.listeners.size(); i++) |
37 | | -+ for (int i = 0; i < this.listeners.size(); ++i) |
38 | | - { |
39 | | - IContainerListener icontainerlistener = this.listeners.get(i); |
40 | | - |
41 | | -@@ -75,19 +73,16 @@ |
42 | | - } |
43 | | - |
44 | | - @SideOnly(Side.CLIENT) |
45 | | -- @Override |
46 | | - public void updateProgressBar(int id, int data) |
47 | | - { |
48 | | - this.tileBrewingStand.setField(id, data); |
49 | | - } |
50 | | - |
51 | | -- @Override |
52 | | - public boolean canInteractWith(EntityPlayer playerIn) |
53 | | - { |
54 | | - return this.tileBrewingStand.isUsableByPlayer(playerIn); |
55 | | - } |
56 | | - |
57 | | -- @Override |
58 | | - public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) |
59 | | - { |
60 | | - ItemStack itemstack = ItemStack.EMPTY; |
61 | | -@@ -177,7 +172,6 @@ |
62 | | - super(iInventoryIn, index, xPosition, yPosition); |
63 | | - } |
64 | | - |
65 | | -- @Override |
66 | | - public boolean isItemValid(ItemStack stack) |
67 | | - { |
68 | | - return isValidBrewingFuel(stack); |
69 | | -@@ -188,7 +182,6 @@ |
70 | | - return itemStackIn.getItem() == Items.BLAZE_POWDER; |
71 | | - } |
72 | | - |
73 | | -- @Override |
74 | | - public int getSlotStackLimit() |
75 | | - { |
76 | | - return 64; |
77 | | -@@ -202,13 +195,11 @@ |
78 | | - super(iInventoryIn, index, xPosition, yPosition); |
79 | | - } |
80 | | - |
81 | | -- @Override |
| 3 | +@@ -205,7 +205,7 @@ |
| 4 | + @Override |
82 | 5 | public boolean isItemValid(ItemStack stack) |
83 | 6 | { |
84 | 7 | - return PotionHelper.isReagent(stack); |
85 | 8 | + return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidIngredient(stack); |
86 | 9 | } |
87 | 10 |
|
88 | | -- @Override |
89 | | - public int getSlotStackLimit() |
90 | | - { |
91 | | - return 64; |
92 | | -@@ -222,25 +213,23 @@ |
93 | | - super(p_i47598_1_, p_i47598_2_, p_i47598_3_, p_i47598_4_); |
94 | | - } |
95 | | - |
96 | | -- @Override |
97 | | - public boolean isItemValid(ItemStack stack) |
98 | | - { |
99 | | - return canHoldPotion(stack); |
100 | | - } |
101 | | - |
102 | | -- @Override |
103 | | - public int getSlotStackLimit() |
104 | | - { |
105 | | - return 1; |
106 | | - } |
107 | | - |
108 | | -- @Override |
109 | | - public ItemStack onTake(EntityPlayer thePlayer, ItemStack stack) |
110 | | - { |
111 | | - PotionType potiontype = PotionUtils.getPotionFromItem(stack); |
| 11 | + @Override |
| 12 | +@@ -241,6 +241,7 @@ |
112 | 13 |
|
113 | 14 | if (thePlayer instanceof EntityPlayerMP) |
114 | 15 | { |
115 | 16 | + net.minecraftforge.event.ForgeEventFactory.onPlayerBrewedPotion(thePlayer, stack); |
116 | 17 | CriteriaTriggers.BREWED_POTION.trigger((EntityPlayerMP)thePlayer, potiontype); |
117 | 18 | } |
118 | 19 |
|
119 | | -@@ -250,8 +239,7 @@ |
| 20 | +@@ -250,8 +251,7 @@ |
120 | 21 |
|
121 | 22 | public static boolean canHoldPotion(ItemStack stack) |
122 | 23 | { |
|
0 commit comments