Package com.minecolonies.api.crafting
Interface IImmutableItemStorageFactory
- All Superinterfaces:
IFactory<FactoryVoidInput,ImmutableItemStorage>
- All Known Implementing Classes:
ImmutableItemStorageFactory
public interface IImmutableItemStorageFactory
extends IFactory<FactoryVoidInput,ImmutableItemStorage>
Interface for the IItemStorageFactory which is responsible for creating and maintaining ItemStorage objects.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull ImmutableItemStoragegetNewInstance(@NotNull IFactoryController factoryController, @NotNull FactoryVoidInput token, @NotNull Object... context) Method to get a new instance of the output given the input and additional context data.@NotNull ImmutableItemStoragegetNewInstance(@NotNull net.minecraft.world.item.ItemStack stack, int size) Method to get a new Instance of an itemStorage.Methods inherited from interface com.minecolonies.api.colony.requestsystem.factory.IFactory
deserialize, deserialize, getFactoryInputType, getFactoryOutputType, getSerializationId, serialize, serialize
-
Method Details
-
getNewInstance
@NotNull default @NotNull ImmutableItemStorage getNewInstance(@NotNull @NotNull IFactoryController factoryController, @NotNull @NotNull FactoryVoidInput token, @NotNull @NotNull Object... context) Description copied from interface:IFactoryMethod to get a new instance of the output given the input and additional context data.- Specified by:
getNewInstancein interfaceIFactory<FactoryVoidInput,ImmutableItemStorage> - Parameters:
factoryController- The controller calling this factory method.token- The input to build a new output for.context- The context of the request.- Returns:
- The new output instance for a given input.
-
getNewInstance
@NotNull @NotNull ImmutableItemStorage getNewInstance(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, int size) Method to get a new Instance of an itemStorage.- Parameters:
stack- the input.size- the grid size.- Returns:
- a new Instance of ItemStorage.
-