Class SimpleItemCost
java.lang.Object
com.minecolonies.api.research.costs.SimpleItemCost
- All Implemented Interfaces:
IResearchCost
A simple item cost which contains a singular item.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleItemCost(com.google.gson.JsonObject json) Create a simple item cost.SimpleItemCost(net.minecraft.nbt.CompoundTag compound) Create a simple 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
-
SimpleItemCost
public SimpleItemCost(net.minecraft.nbt.CompoundTag compound) Create a simple item cost.- Parameters:
compound- the nbt containing the relevant data.
-
SimpleItemCost
public SimpleItemCost(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.
-
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.
-