Guest User

Untitled

a guest
Jun 25th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2. public static HashMap<Integer, Integer> woodBlockRegistry = new HashMap<Integer, Integer>();
  3.  
  4. public static boolean isWood(int i) { return woodBlockRegistry.containsValue(i); }
  5.  
  6. public static void addWoodBlock(int i) {
  7. int j = 0;
  8. do {
  9. if(woodBlockRegistry.get(j) != null) {
  10. j++;
  11. continue;
  12. } else {
  13. woodBlockRegistry.put(j, i);
  14. break;
  15. }
  16. } while(true);
  17. }
Add Comment
Please, Sign In to add comment