Class SimpleInventoryState
java.lang.Object
org.cyclops.cyclopscore.inventory.SimpleInventoryState
- All Implemented Interfaces:
IInventoryState
An inventory state implementation for a
SimpleInventory
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getState()
Get a state value which represents the current state of an inventory.
-
Constructor Details
-
SimpleInventoryState
-
-
Method Details
-
getState
public int getState()Description copied from interface:IInventoryState
Get a state value which represents the current state of an inventory. This method must be able to calculate the state very quickly. Ideally, this should be pre-calculated. If inventory contents change, this method is guaranteed to return a different result. A different state does however not necessarily guarantee an inventory change but it should in most cases since callers might gate expensive logic behind hash changes.- Specified by:
getState
in interfaceIInventoryState
- Returns:
- A value representing the current state of an inventory.
-