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<ResourceLocation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExperience(int pExperience) Adds the given amount of experience.addLootTable(ResourceKey<LootTable> pLootTable) addRecipe(ResourceLocation pRecipeId) Adds the given recipe to the rewards.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(ResourceLocation pRecipeId) Creates a new builder with the given recipe as a reward.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
Creates a new builder with the given recipe as a reward. -
addRecipe
Adds the given recipe to the rewards. -
function
-
runs
-
build
-