Class ListItemCost
java.lang.Object
com.minecolonies.api.research.costs.ListItemCost
- All Implemented Interfaces:
IResearchCost
A plain item cost that takes a list of several items that have to be fulfilled.
-
Constructor Summary
ConstructorsConstructorDescriptionListItemCost(com.google.gson.JsonObject json) Create a list item cost.ListItemCost(net.minecraft.nbt.CompoundTag compound) Create a list item cost. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.research.IResearchCost
getTranslatedName
-
Constructor Details
-
ListItemCost
public ListItemCost(net.minecraft.nbt.CompoundTag compound) Create a list item cost.- Parameters:
compound- the nbt containing the relevant data.
-
ListItemCost
public ListItemCost(com.google.gson.JsonObject json) Create a list item cost.- Parameters:
json- the json containing the relevant data.
-
-
Method Details
-
getType
Description copied from interface:IResearchCostThe type for this cost.- Specified by:
getTypein interfaceIResearchCost- Returns:
- the type.
-
getCount
public int getCount()Description copied from interface:IResearchCostGet the count for this cost.- Specified by:
getCountin interfaceIResearchCost- Returns:
- the count.
-
getItems
Description copied from interface:IResearchCostGet the list of items for this cost.- Specified by:
getItemsin interfaceIResearchCost- Returns:
- the list of items.
-
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.
-