Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var BLOCK_MAP = {
- "SZMARAGD": "emerald_ore",
- "ZLOTO": "gold_ore",
- "WEGIEL": "coal_ore"
- };
- function onWindowItems(bot, items, windowId) {
- for (var i = 0; i < items.size(); i++) {
- var itemStack = items.get(i);
- if (itemStack == null) continue;
- var key = itemStack.getTranslationKey();
- for (var polishName in BLOCK_MAP) {
- if (key.contains(BLOCK_MAP[polishName])) {
- bot.getController().windowClick(i, 0);
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment