Package net.minecraft.advancements
Class Advancement.Builder
- java.lang.Object
-
- net.minecraft.advancements.Advancement.Builder
-
- All Implemented Interfaces:
IForgeAdvancementBuilder
- Enclosing class:
- Advancement
public static class Advancement.Builder extends java.lang.Object implements IForgeAdvancementBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Criterion>
criteria
private DisplayInfo
display
private Advancement
parent
private ResourceLocation
parentId
private java.lang.String[][]
requirements
private IRequirementsStrategy
requirementsStrategy
private AdvancementRewards
rewards
-
Constructor Summary
Constructors Modifier Constructor Description private
Builder()
private
Builder(ResourceLocation p_i47414_1_, DisplayInfo p_i47414_2_, AdvancementRewards p_i47414_3_, java.util.Map<java.lang.String,Criterion> p_i47414_4_, java.lang.String[][] p_i47414_5_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Advancement.Builder
addCriterion(java.lang.String p_200276_1_, Criterion p_200276_2_)
Advancement.Builder
addCriterion(java.lang.String p_200275_1_, ICriterionInstance p_200275_2_)
static Advancement.Builder
advancement()
Advancement
build(ResourceLocation p_192056_1_)
boolean
canBuild(java.util.function.Function<ResourceLocation,Advancement> p_192058_1_)
Advancement.Builder
display(DisplayInfo p_203903_1_)
Advancement.Builder
display(ItemStack p_215092_1_, ITextComponent p_215092_2_, ITextComponent p_215092_3_, ResourceLocation p_215092_4_, FrameType p_215092_5_, boolean p_215092_6_, boolean p_215092_7_, boolean p_215092_8_)
Advancement.Builder
display(IItemProvider p_203902_1_, ITextComponent p_203902_2_, ITextComponent p_203902_3_, ResourceLocation p_203902_4_, FrameType p_203902_5_, boolean p_203902_6_, boolean p_203902_7_, boolean p_203902_8_)
static Advancement.Builder
fromJson(com.google.gson.JsonObject p_241043_0_, ConditionArrayParser p_241043_1_)
static Advancement.Builder
fromNetwork(PacketBuffer p_192060_0_)
java.util.Map<java.lang.String,Criterion>
getCriteria()
Advancement.Builder
parent(Advancement p_203905_1_)
Advancement.Builder
parent(ResourceLocation p_200272_1_)
Advancement.Builder
requirements(IRequirementsStrategy p_200270_1_)
Advancement.Builder
rewards(AdvancementRewards p_200274_1_)
Advancement.Builder
rewards(AdvancementRewards.Builder p_200271_1_)
Advancement
save(java.util.function.Consumer<Advancement> p_203904_1_, java.lang.String p_203904_2_)
com.google.gson.JsonObject
serializeToJson()
void
serializeToNetwork(PacketBuffer p_192057_1_)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeAdvancementBuilder
save, self
-
-
-
-
Field Detail
-
parentId
private ResourceLocation parentId
-
parent
private Advancement parent
-
display
private DisplayInfo display
-
rewards
private AdvancementRewards rewards
-
criteria
private java.util.Map<java.lang.String,Criterion> criteria
-
requirements
private java.lang.String[][] requirements
-
requirementsStrategy
private IRequirementsStrategy requirementsStrategy
-
-
Constructor Detail
-
Builder
private Builder(@Nullable ResourceLocation p_i47414_1_, @Nullable DisplayInfo p_i47414_2_, AdvancementRewards p_i47414_3_, java.util.Map<java.lang.String,Criterion> p_i47414_4_, java.lang.String[][] p_i47414_5_)
-
Builder
private Builder()
-
-
Method Detail
-
advancement
public static Advancement.Builder advancement()
-
parent
public Advancement.Builder parent(Advancement p_203905_1_)
-
parent
public Advancement.Builder parent(ResourceLocation p_200272_1_)
-
display
public Advancement.Builder display(ItemStack p_215092_1_, ITextComponent p_215092_2_, ITextComponent p_215092_3_, @Nullable ResourceLocation p_215092_4_, FrameType p_215092_5_, boolean p_215092_6_, boolean p_215092_7_, boolean p_215092_8_)
-
display
public Advancement.Builder display(IItemProvider p_203902_1_, ITextComponent p_203902_2_, ITextComponent p_203902_3_, @Nullable ResourceLocation p_203902_4_, FrameType p_203902_5_, boolean p_203902_6_, boolean p_203902_7_, boolean p_203902_8_)
-
display
public Advancement.Builder display(DisplayInfo p_203903_1_)
-
rewards
public Advancement.Builder rewards(AdvancementRewards.Builder p_200271_1_)
-
rewards
public Advancement.Builder rewards(AdvancementRewards p_200274_1_)
-
addCriterion
public Advancement.Builder addCriterion(java.lang.String p_200275_1_, ICriterionInstance p_200275_2_)
-
addCriterion
public Advancement.Builder addCriterion(java.lang.String p_200276_1_, Criterion p_200276_2_)
-
requirements
public Advancement.Builder requirements(IRequirementsStrategy p_200270_1_)
-
canBuild
public boolean canBuild(java.util.function.Function<ResourceLocation,Advancement> p_192058_1_)
-
build
public Advancement build(ResourceLocation p_192056_1_)
-
save
public Advancement save(java.util.function.Consumer<Advancement> p_203904_1_, java.lang.String p_203904_2_)
-
serializeToJson
public com.google.gson.JsonObject serializeToJson()
-
serializeToNetwork
public void serializeToNetwork(PacketBuffer p_192057_1_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fromJson
public static Advancement.Builder fromJson(com.google.gson.JsonObject p_241043_0_, ConditionArrayParser p_241043_1_)
-
fromNetwork
public static Advancement.Builder fromNetwork(PacketBuffer p_192060_0_)
-
getCriteria
public java.util.Map<java.lang.String,Criterion> getCriteria()
-
-