|
3 | 3 | import codes.biscuit.skyblockaddons.SkyblockAddons; |
4 | 4 | import codes.biscuit.skyblockaddons.asm.utils.ReturnValue; |
5 | 5 | import codes.biscuit.skyblockaddons.core.Feature; |
6 | | -import codes.biscuit.skyblockaddons.core.InventoryType; |
7 | 6 | import codes.biscuit.skyblockaddons.events.SkyblockBlockBreakEvent; |
8 | 7 | import codes.biscuit.skyblockaddons.features.backpacks.BackpackColor; |
9 | 8 | import codes.biscuit.skyblockaddons.features.backpacks.BackpackInventoryManager; |
10 | | -import codes.biscuit.skyblockaddons.features.craftingpatterns.CraftingPattern; |
11 | | -import codes.biscuit.skyblockaddons.features.craftingpatterns.CraftingPatternResult; |
12 | 9 | import codes.biscuit.skyblockaddons.utils.ItemUtils; |
13 | 10 | import codes.biscuit.skyblockaddons.utils.Utils; |
14 | 11 | import com.google.common.collect.Sets; |
@@ -161,45 +158,6 @@ public static void onWindowClick(int slotNum, int mouseButtonClicked, int mode, |
161 | 158 | main.getUtils().playLoudSound("note.bass", 0.5); |
162 | 159 | returnValue.cancel(); |
163 | 160 | } |
164 | | - |
165 | | - // Crafting patterns |
166 | | - if (false && slotIn != null && main.getInventoryUtils().getInventoryType() == InventoryType.CRAFTING_TABLE |
167 | | - /*&& main.getConfigValues().isEnabled(Feature.CRAFTING_PATTERNS)*/) { |
168 | | - |
169 | | - final CraftingPattern selectedPattern = main.getPersistentValuesManager().getPersistentValues().getSelectedCraftingPattern(); |
170 | | - final ItemStack clickedItem = slotIn.getStack(); |
171 | | - if (selectedPattern != CraftingPattern.FREE && clickedItem != null) { |
172 | | - final ItemStack[] craftingGrid = new ItemStack[9]; |
173 | | - for (int i = 0; i < CraftingPattern.CRAFTING_GRID_SLOTS.size(); i++) { |
174 | | - int slotIndex = CraftingPattern.CRAFTING_GRID_SLOTS.get(i); |
175 | | - craftingGrid[i] = slots.getSlot(slotIndex).getStack(); |
176 | | - } |
177 | | - |
178 | | - final CraftingPatternResult result = selectedPattern.checkAgainstGrid(craftingGrid); |
179 | | - |
180 | | - if (slotIn.inventory.equals(Minecraft.getMinecraft().thePlayer.inventory)) { |
181 | | - if (result.isFilled() && !result.fitsItem(clickedItem) && mode == SHIFTCLICK_CLICK_TYPE) { |
182 | | - // cancel shift-clicking items from the inventory if the pattern is already filled |
183 | | - if (System.currentTimeMillis() > lastCraftingSoundPlayed + CRAFTING_PATTERN_SOUND_COOLDOWN) { |
184 | | - main.getUtils().playSound("note.bass", 0.5); |
185 | | - lastCraftingSoundPlayed = System.currentTimeMillis(); |
186 | | - } |
187 | | - returnValue.cancel(); |
188 | | - } |
189 | | - } else { |
190 | | - if (slotIn.getSlotIndex() == CraftingPattern.CRAFTING_RESULT_INDEX |
191 | | - && !result.isSatisfied() |
192 | | - && main.getPersistentValuesManager().getPersistentValues().isBlockCraftingIncompletePatterns()) { |
193 | | - // cancel clicking the result if the pattern isn't satisfied |
194 | | - if (System.currentTimeMillis() > lastCraftingSoundPlayed + CRAFTING_PATTERN_SOUND_COOLDOWN) { |
195 | | - main.getUtils().playSound("note.bass", 0.5); |
196 | | - lastCraftingSoundPlayed = System.currentTimeMillis(); |
197 | | - } |
198 | | - returnValue.cancel(); |
199 | | - } |
200 | | - } |
201 | | - } |
202 | | - } |
203 | 161 | } |
204 | 162 | } |
205 | 163 | else { |
|
0 commit comments