Advertisement
Guest User

k

a guest
Sep 27th, 2016
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. Iterator itwhile = HarvestLevel.iterator();
  2. Iterator ittool = ToolHash.iterator();
  3. while (itwhile.hasNext())
  4. {
  5. String raw1 = itwhile.next().toString();
  6. String[] partaa = raw1.split("=");
  7. String blocka = partaa[0];
  8. String strlevel = partaa[1];
  9. int level = Integer.parseInt(strlevel);
  10. String replaced = blocka.replaceFirst(":", "\u00A9");
  11. String[] partsH = replaced.split("\u00A9");
  12. String modidH = partsH[0];
  13. String blockH = partsH[1];
  14. if (!SpawnerList.contains(blocka))
  15. {
  16. MainJava.SpawnerChecker.put(blocka, "no_value");
  17. }
  18. //preventitive code that if defined in harvestlevel.txt then it will set the spawner level through all via tools to 0 so it won't drop if it's not the right configed harvest level
  19. //because, if a harvest level is set to 10 and theirs is 3 it will still not drop so this code makes it drop if their harvest level in the config is right...
  20. while (ittool.hasNext())
  21. {
  22. String tool = ittool.next().toString();
  23. Block blockh = GameRegistry.findBlock(modidH, blockH);
  24. if (blockh != null)
  25. {
  26. blockh.setHarvestLevel(tool, level);
  27. }
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement