Class TagItemCost
java.lang.Object
com.minecolonies.api.research.costs.TagItemCost
- All Implemented Interfaces:
IResearchCost
A plain item cost that takes a list of several items that have to be fulfilled.
-
Constructor Summary
ConstructorsConstructorDescriptionTagItemCost(com.google.gson.JsonObject json) Create a simple item cost.TagItemCost(net.minecraft.nbt.CompoundTag compound) Create a simple item cost. -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()Get the count for this cost.List<net.minecraft.world.item.Item>getItems()Get the list of items for this cost.net.minecraft.network.chat.ComponentGet the translated text for this research cost.getType()The type for this cost.net.minecraft.nbt.CompoundTagWrite the research cost to nbt data.
-
Constructor Details
-
TagItemCost
public TagItemCost(net.minecraft.nbt.CompoundTag compound) Create a simple item cost.- Parameters:
compound- the nbt containing the relevant data.
-
TagItemCost
public TagItemCost(com.google.gson.JsonObject json) Create a simple item cost.- Parameters:
json- the nbt containing the relevant data.
-
-
Method Details
-
getType
Description copied from interface:IResearchCostThe type for this cost.- Specified by:
getTypein interfaceIResearchCost- Returns:
- the type.
-
getItems
Description copied from interface:IResearchCostGet the list of items for this cost.- Specified by:
getItemsin interfaceIResearchCost- Returns:
- the list of items.
-
getCount
public int getCount()Description copied from interface:IResearchCostGet the count for this cost.- Specified by:
getCountin interfaceIResearchCost- Returns:
- the count.
-
getTranslatedName
public net.minecraft.network.chat.Component getTranslatedName()Description copied from interface:IResearchCostGet the translated text for this research cost.- Specified by:
getTranslatedNamein interfaceIResearchCost- Returns:
- the translated text.
-
writeToNBT
public net.minecraft.nbt.CompoundTag writeToNBT()Description copied from interface:IResearchCostWrite the research cost to nbt data.- Specified by:
writeToNBTin interfaceIResearchCost- Returns:
- the nbt data.
-