drackiseries

Custom Dungeon Loot

Jun 24th, 2012
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.74 KB | None | 0 0
  1. WORLD GEN DUNGEONS CODE:
  2.  
  3. private ItemStack pickCheckLootItem(Random par1Random)
  4.     {
  5.         int i = par1Random.nextInt(15);
  6.  
  7.         if (i == 0)
  8.         {
  9.             return new ItemStack(Item.saddle);
  10.         }
  11.  
  12.         if (i == 1)
  13.         {
  14.             return new ItemStack(Item.ingotIron, par1Random.nextInt(4) + 1);
  15.         }
  16.  
  17.         if (i == 2)
  18.         {
  19.             return new ItemStack(Item.bread);
  20.         }
  21.  
  22.         if (i == 3)
  23.         {
  24.             return new ItemStack(Item.wheat, par1Random.nextInt(4) + 1);
  25.         }
  26.  
  27.         if (i == 4)
  28.         {
  29.             return new ItemStack(Item.gunpowder, par1Random.nextInt(4) + 1);
  30.         }
  31.  
  32.         if (i == 5)
  33.         {
  34.             return new ItemStack(Item.silk, par1Random.nextInt(4) + 1);
  35.         }
  36.  
  37.         if (i == 6)
  38.         {
  39.             return new ItemStack(Item.bucketEmpty);
  40.         }
  41.  
  42.         if (i == 7 && par1Random.nextInt(100) == 0)
  43.         {
  44.             return new ItemStack(Item.appleGold);
  45.         }
  46.  
  47.         if (i == 8 && par1Random.nextInt(2) == 0)
  48.         {
  49.             return new ItemStack(Item.redstone, par1Random.nextInt(4) + 1);
  50.         }
  51.  
  52.         if (i == 9 && par1Random.nextInt(10) == 0)
  53.         {
  54.             return new ItemStack(Item.itemsList[Item.record13.shiftedIndex + par1Random.nextInt(2)]);
  55.         }
  56.  
  57.         if (i == 10)
  58.         {
  59.             return new ItemStack(Item.dyePowder, 1, 3);
  60.         }
  61.         if (i == 11)
  62.         {
  63.             return new ItemStack(mod_tutorial.Skull,1);
  64.         }
  65.         if (i == 12 && (par1Random.nextInt(50) == 0))
  66.         {
  67.             return new ItemStack(mod_tutorial.Neutron, (1 + par1Random.nextInt(2)));
  68.         }
  69.         else
  70.         {
  71.             return null;
  72.         }
  73.     }
Advertisement
Add Comment
Please, Sign In to add comment