Package net.minecraft.advancements
Class AdvancementRewards.Builder
java.lang.Object
net.minecraft.advancements.AdvancementRewards.Builder
- Enclosing class:
AdvancementRewards
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Optional<ResourceLocation> private final com.google.common.collect.ImmutableList.Builder<ResourceKey<LootTable>> private final com.google.common.collect.ImmutableList.Builder<ResourceLocation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExperience(int experience) Adds the given amount of experience.addLootTable(ResourceKey<LootTable> lootTable) addRecipe(ResourceLocation recipeId) Adds the given recipe to the rewards.build()static AdvancementRewards.Builderexperience(int experience) Creates a new builder with the given amount of experience as a rewardstatic AdvancementRewards.Builderfunction(ResourceLocation functionId) static AdvancementRewards.Builderloot(ResourceKey<LootTable> lootTable) static AdvancementRewards.Builderrecipe(ResourceLocation recipeId) Creates a new builder with the given recipe as a reward.runs(ResourceLocation functionId)
-
Field Details
-
experience
private int experience -
loot
-
recipes
-
function
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
experience
Creates a new builder with the given amount of experience as a reward -
addExperience
Adds the given amount of experience. (Not a direct setter) -
loot
-
addLootTable
-
recipe
Creates a new builder with the given recipe as a reward. -
addRecipe
Adds the given recipe to the rewards. -
function
-
runs
-
build
-