Package com.minecolonies.api.research
Class ModResearchCosts.ResearchCostEntry
java.lang.Object
com.minecolonies.api.research.ModResearchCosts.ResearchCostEntry
- Enclosing class:
- ModResearchCosts
Quest reward entry type.
-
Constructor Summary
ConstructorsConstructorDescriptionResearchCostEntry(net.minecraft.resources.ResourceLocation registryName, ModResearchCosts.ReadFromNBTFunction readFromNBT, ModResearchCosts.ReadFromJsonFunction readFromJson) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationGet the registry name for this entry.readFromJson(com.google.gson.JsonObject json) Read a research cost instance from json.readFromNBT(net.minecraft.nbt.CompoundTag nbt) Read a research cost instance from NBT.
-
Constructor Details
-
ResearchCostEntry
public ResearchCostEntry(net.minecraft.resources.ResourceLocation registryName, ModResearchCosts.ReadFromNBTFunction readFromNBT, ModResearchCosts.ReadFromJsonFunction readFromJson) Default constructor.- Parameters:
registryName- the registry name for this entry.readFromJson- function to read this item from NBT.readFromNBT- function to read this item from json.
-
-
Method Details
-
getRegistryName
public net.minecraft.resources.ResourceLocation getRegistryName()Get the registry name for this entry. -
readFromNBT
Read a research cost instance from NBT. -
readFromJson
public IResearchCost readFromJson(com.google.gson.JsonObject json) throws com.google.gson.JsonParseException Read a research cost instance from json.- Throws:
com.google.gson.JsonParseException
-