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 ImmutableList.Builder<ResourceKey<LootTable>> private final ImmutableList.Builder<ResourceKey<Recipe<?>>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExperience(int pExperience) Adds the given amount of experience.addLootTable(ResourceKey<LootTable> pLootTable) addRecipe(ResourceKey<Recipe<?>> pRecipe) build()static AdvancementRewards.Builderexperience(int pExperience) Creates a new builder with the given amount of experience as a rewardstatic AdvancementRewards.Builderfunction(ResourceLocation pFunctionId) static AdvancementRewards.Builderloot(ResourceKey<LootTable> pLootTable) static AdvancementRewards.Builderrecipe(ResourceKey<Recipe<?>> pRecipe) runs(ResourceLocation pFunctionId)
-
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
-
addRecipe
-
function
-
runs
-
build
-