Package net.minecraft.advancements
Class AdvancementRewards.Builder
java.lang.Object
net.minecraft.advancements.AdvancementRewards.Builder
- Enclosing class:
AdvancementRewards
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private 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 pExperience) Adds the given amount of experience.addLootTable
(ResourceKey<LootTable> pLootTable) addRecipe
(ResourceLocation pRecipeId) Adds the given recipe to the rewards.build()
static AdvancementRewards.Builder
experience
(int pExperience) Creates a new builder with the given amount of experience as a rewardstatic AdvancementRewards.Builder
function
(ResourceLocation pFunctionId) static AdvancementRewards.Builder
loot
(ResourceKey<LootTable> pLootTable) static AdvancementRewards.Builder
recipe
(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
-