Package powercrystals.core.random

Examples of powercrystals.core.random.WeightedRandomItemStack


    return _slaughterhouseBlacklist;
  }

  public static void registerSludgeDrop(int weight, ItemStack drop)
  {
    _sludgeDrops.add(new WeightedRandomItemStack(weight, drop.copy()));
  }
View Full Code Here


    return _redNetLogicCircuits;
  }

  public static void registerLaserOre(int weight, ItemStack ore)
  {
    _laserOres.add(new WeightedRandomItemStack(weight, ore.copy()));
  }
View Full Code Here

    List<WeightedRandomItemStack> drops = new LinkedList<WeightedRandomItemStack>();
    int boost = WeightedRandom.getTotalWeight(MFRRegistry.getLaserOres()) / 30;
   
    for(WeightedRandomItem i : MFRRegistry.getLaserOres())
    {
      WeightedRandomItemStack oldStack = (WeightedRandomItemStack)i;
      WeightedRandomItemStack newStack = new WeightedRandomItemStack(oldStack.itemWeight, oldStack.getStack());
      drops.add(newStack);
      for(ItemStack s : _inventory)
      {
        if(s == null || s.itemID != MineFactoryReloadedCore.laserFocusItem.itemID || MFRRegistry.getLaserPreferredOres(s.getItemDamage()) == null)
        {
          continue;
        }
       
        List<ItemStack> preferredOres = MFRRegistry.getLaserPreferredOres(s.getItemDamage());
       
        for(ItemStack preferredOre : preferredOres)
        {
          if(UtilInventory.stacksEqual(newStack.getStack(), preferredOre))
          {
            newStack.itemWeight += boost;
          }
        }
      }
View Full Code Here

TOP

Related Classes of powercrystals.core.random.WeightedRandomItemStack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.