Tabnine Logo
SetCount
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using net.minecraft.world.storage.loot.functions.SetCount (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

Most used methods

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JComboBox (javax.swing)
  • Option (scala)
  • Best IntelliJ 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