Class BuilderBucket
java.lang.Object
com.minecolonies.core.colony.buildings.utils.BuilderBucket
Represents a bucket of items the builder workers will pick up with them to go to the buildsite.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOrAdjustResource(String key, int qty) Add additional resources.Get the required resources from the bucket.intGet how many total stacks were required up to now.voidremoveResources(String name) Remove a specific resource.voidsetTotalStacks(int totalStacks) Set the required total stacks.
-
Constructor Details
-
BuilderBucket
public BuilderBucket()
-
-
Method Details
-
getResourceMap
Get the required resources from the bucket.- Returns:
- the map with the identifiers and count.
-
getTotalStacks
public int getTotalStacks()Get how many total stacks were required up to now.- Returns:
- the total stacks.
-
setTotalStacks
public void setTotalStacks(int totalStacks) Set the required total stacks.- Parameters:
totalStacks- the total stucks.
-
addOrAdjustResource
Add additional resources.- Parameters:
key- the key to add.qty- the quantity to add.
-
removeResources
Remove a specific resource.- Parameters:
name- the key.
-