Contents
Class MaterialQuantity
java.lang.Object
com.hypixel.hytale.server.core.inventory.MaterialQuantity
- All Implemented Interfaces:
NetworkSerializable<MaterialQuantity>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<MaterialQuantity> static final MaterialQuantity[]static final ValidatorCache<MaterialQuantity> Validates that an item is named and that it exists. -
Constructor Summary
ConstructorsConstructorDescriptionMaterialQuantity(String itemId, String resourceTypeId, String tag, int quantity, org.bson.BsonDocument metadata) -
Method Summary
Modifier and TypeMethodDescriptionclone(int quantity) booleanorg.bson.BsonDocumentintintinthashCode()booleanisItemExcluded(String candidateItemId) toItemStacks(MaterialQuantity[] materials) Fetches the item stacks for the given materials, skipping any that reference no item.toPacket()toString()withExcludedItemIds(Set<String> excludedItemIds)
-
Field Details
-
EMPTY_ARRAY
-
ITEM_VALIDATOR_CACHE
Validates that an item is named and that it exists. SeeMaterialQuantity.ItemValidatorfor when it can be used. -
CODEC
-
-
Constructor Details
-
MaterialQuantity
-
-
Method Details
-
getItemId
-
getResourceTypeId
-
getTagIndex
public int getTagIndex() -
getQuantity
public int getQuantity() -
getMetadata
public org.bson.BsonDocument getMetadata() -
clone
-
withExcludedItemIds
-
getExcludedItemIds
-
isItemExcluded
-
toItemStack
-
toItemStacks
Fetches the item stacks for the given materials, skipping any that reference no item.- Parameters:
materials- The materials to convert.- Returns:
- the list of item stacks.
-
toResource
-
toPacket
- Specified by:
toPacketin interfaceNetworkSerializable<MaterialQuantity>
-
equals
-
hashCode
-
toString
-