Tabnine Logo
SetCount.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
net.minecraft.world.storage.loot.functions.SetCount
constructor

Best Java code snippets using net.minecraft.world.storage.loot.functions.SetCount.<init> (Showing top 4 results out of 315)

origin: SleepyTrousers/EnderIO

private @Nonnull static SetCount setCount(int min, int max) {
 return new SetCount(NO_CONDITIONS, new RandomValueRange(min, min));
}
origin: JurassiCraftTeam/JurassiCraft2

public EntryBuilder count(int min, int max) {
  return this.function(new SetCount(new LootCondition[0], new RandomValueRange(min, max)));
}
origin: Darkhax-Minecraft/Bookshelf

/**
 * Creates a new loot entry that will be added to the loot pools when a world is loaded.
 *
 * @param location The loot table to add the loot to. You can use
 *        {@link net.minecraft.world.storage.loot.LootTableList} for convenience.
 * @param name The name of the entry being added. This will be prefixed with {@link #modid}
 *        .
 * @param pool The name of the pool to add the entry to. This pool must already exist.
 * @param weight The weight of the entry.
 * @param item The item to add.
 * @param meta The metadata for the loot.
 * @param min The smallest item size.
 * @param max The largest item size.
 * @return A builder object. It can be used to fine tune the loot entry.
 */
public LootBuilder addLoot (ResourceLocation location, String name, String pool, int weight, Item item, int meta, int min, int max) {
  final LootBuilder loot = this.addLoot(location, name, pool, weight, item, meta);
  loot.addFunction(new SetCount(new LootCondition[0], new RandomValueRange(min, max)));
  return loot;
}
origin: Ellpeck/ActuallyAdditions

LootFunction jamAmount = new SetCount(noCondition, new RandomValueRange(3, 5));
pool.addEntry(new LootEntryItem(InitItems.itemJams, 2, 0, new LootFunction[]{jamDamage, jamAmount}, noCondition, ActuallyAdditions.MODID+":jams"));
LootFunction glassAmount = new SetCount(noCondition, new RandomValueRange(2));
pool.addEntry(new LootEntryItem(Items.GLASS_BOTTLE, 1, 0, new LootFunction[]{glassAmount}, noCondition, ActuallyAdditions.MODID+":bottles"));
LootFunction bonesAmount = new SetCount(noCondition, new RandomValueRange(1, 12));
pool.addEntry(new LootEntryItem(Items.BONE, 100, 0, new LootFunction[]{bonesAmount}, noCondition, ActuallyAdditions.MODID+":bones"));
addDrillCore = true;
LootFunction woodCaseAmount = new SetCount(noCondition, new RandomValueRange(3, 10));
LootFunction woodCaseDamage = new SetMetadata(noCondition, new RandomValueRange(TheMiscBlocks.WOOD_CASING.ordinal()));
pool.addEntry(new LootEntryItem(Item.getItemFromBlock(InitBlocks.blockMisc), 60, 0, new LootFunction[]{woodCaseAmount, woodCaseDamage}, noCondition, ActuallyAdditions.MODID+":woodenCase"));
LootFunction ironCaseAmount = new SetCount(noCondition, new RandomValueRange(1, 3));
LootFunction ironCaseDamage = new SetMetadata(noCondition, new RandomValueRange(TheMiscBlocks.IRON_CASING.ordinal()));
pool.addEntry(new LootEntryItem(Item.getItemFromBlock(InitBlocks.blockMisc), 40, 0, new LootFunction[]{ironCaseAmount, ironCaseDamage}, noCondition, ActuallyAdditions.MODID+":ironCase"));
LootFunction amount = new SetCount(noCondition, new RandomValueRange(1, 3));
LootFunction[] functions = new LootFunction[]{damage, amount};
LootFunction amount = new SetCount(noCondition, new RandomValueRange(1, 5));
pool.addEntry(new LootEntryItem(InitItems.itemMisc, 20, 0, new LootFunction[]{damage, amount}, noCondition, ActuallyAdditions.MODID+":quartz"));
LootFunction amount = new SetCount(noCondition, new RandomValueRange(1, 2));
pool.addEntry(new LootEntryItem(InitItems.itemMisc, 5, 0, new LootFunction[]{damage, amount}, noCondition, ActuallyAdditions.MODID+":batWings"));
net.minecraft.world.storage.loot.functionsSetCount<init>

Popular methods of SetCount

    Popular in Java

    • Making http requests using okhttp
    • scheduleAtFixedRate (ScheduledExecutorService)
    • runOnUiThread (Activity)
    • scheduleAtFixedRate (Timer)
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • HttpURLConnection (java.net)
      An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
    • Collection (java.util)
      Collection is the root of the collection hierarchy. It defines operations on data collections and t
    • ReentrantLock (java.util.concurrent.locks)
      A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
    • JarFile (java.util.jar)
      JarFile is used to read jar entries and their associated data from jar files.
    • Base64 (org.apache.commons.codec.binary)
      Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
    • Top PhpStorm plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now