BubiStu

Untitled

Mar 14th, 2026 (edited)
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. var BLOCK_MAP = {
  2. "SZMARAGD": "emerald_ore",
  3. "ZLOTO": "gold_ore",
  4. "WEGIEL": "coal_ore"
  5. };
  6.  
  7. function onWindowItems(bot, items, windowId) {
  8. for (var i = 0; i < items.size(); i++) {
  9. var itemStack = items.get(i);
  10. if (itemStack == null) continue;
  11.  
  12. var key = itemStack.getTranslationKey();
  13.  
  14. for (var polishName in BLOCK_MAP) {
  15. if (key.contains(BLOCK_MAP[polishName])) {
  16. bot.getController().windowClick(i, 0);
  17. return;
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment