Class StandardRequestableTypeRequestResolverAssignmentDataStore.Factory
java.lang.Object
com.minecolonies.core.colony.requestsystem.data.StandardRequestableTypeRequestResolverAssignmentDataStore.Factory
- All Implemented Interfaces:
IFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore>
- Enclosing class:
- StandardRequestableTypeRequestResolverAssignmentDataStore
public static class StandardRequestableTypeRequestResolverAssignmentDataStore.Factory
extends Object
implements IFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(@NotNull IFactoryController controller, @NotNull net.minecraft.nbt.CompoundTag nbt) Method to deserialize a given constructable.deserialize(IFactoryController controller, net.minecraft.network.FriendlyByteBuf buffer) Method to deserialize a given constructable.@NotNull com.google.common.reflect.TypeToken<? extends FactoryVoidInput>Used to determine which type this can produce.@NotNull com.google.common.reflect.TypeToken<? extends StandardRequestableTypeRequestResolverAssignmentDataStore>Method to get the type this factory can produce.getNewInstance(@NotNull IFactoryController factoryController, @NotNull FactoryVoidInput factoryVoidInput, @NotNull Object... context) Method to get a new instance of the output given the input and additional context data.shortGet a serialization id for the factory.@NotNull net.minecraft.nbt.CompoundTagserialize(@NotNull IFactoryController controller, @NotNull StandardRequestableTypeRequestResolverAssignmentDataStore standardRequestableTypeRequestResolverAssignmentDataStore) Method to serialize a given constructable.voidserialize(IFactoryController controller, StandardRequestableTypeRequestResolverAssignmentDataStore input, net.minecraft.network.FriendlyByteBuf packetBuffer) Method to serialize a given constructable.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
getFactoryOutputType
@NotNull public @NotNull com.google.common.reflect.TypeToken<? extends StandardRequestableTypeRequestResolverAssignmentDataStore> getFactoryOutputType()Description copied from interface:IFactoryMethod to get the type this factory can produce.- Specified by:
getFactoryOutputTypein interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Returns:
- The type of request this factory can produce.
-
getFactoryInputType
@NotNull public @NotNull com.google.common.reflect.TypeToken<? extends FactoryVoidInput> getFactoryInputType()Description copied from interface:IFactoryUsed to determine which type this can produce.- Specified by:
getFactoryInputTypein interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Returns:
- The class that represents the Type of Request this can produce.
-
getNewInstance
@NotNull public @NotNull StandardRequestableTypeRequestResolverAssignmentDataStore getNewInstance(@NotNull @NotNull IFactoryController factoryController, @NotNull @NotNull FactoryVoidInput factoryVoidInput, @NotNull @NotNull Object... context) throws IllegalArgumentException 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,StandardRequestableTypeRequestResolverAssignmentDataStore> - Parameters:
factoryController- The controller calling this factory method.factoryVoidInput- The input to build a new output for.context- The context of the request.- Returns:
- The new output instance for a given input.
- Throws:
IllegalArgumentException- is thrown when the factory cannot produce a new instance out of the given context and input.
-
serialize
@NotNull public @NotNull net.minecraft.nbt.CompoundTag serialize(@NotNull @NotNull IFactoryController controller, @NotNull @NotNull StandardRequestableTypeRequestResolverAssignmentDataStore standardRequestableTypeRequestResolverAssignmentDataStore) Description copied from interface:IFactoryMethod to serialize a given constructable.- Specified by:
serializein interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Parameters:
controller- The controller that can be used to serialize complicated types.standardRequestableTypeRequestResolverAssignmentDataStore- The request to serialize.- Returns:
- The serialized data of the given requets.
-
deserialize
@NotNull public @NotNull StandardRequestableTypeRequestResolverAssignmentDataStore deserialize(@NotNull @NotNull IFactoryController controller, @NotNull @NotNull net.minecraft.nbt.CompoundTag nbt) throws Throwable Description copied from interface:IFactoryMethod to deserialize a given constructable.- Specified by:
deserializein interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Parameters:
controller- The controller that can be used to deserialize complicated types.nbt- The data of the request that should be deserialized.- Returns:
- The request that corresponds with the given data in the nbt
- Throws:
Exception- if somethings goes wrong during the deserialization.Throwable
-
serialize
public void serialize(IFactoryController controller, StandardRequestableTypeRequestResolverAssignmentDataStore input, net.minecraft.network.FriendlyByteBuf packetBuffer) Description copied from interface:IFactoryMethod to serialize a given constructable.- Specified by:
serializein interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Parameters:
controller- The controller that can be used to serialize complicated types.input- The request to serialize.packetBuffer- The buffer to serialize into.
-
deserialize
public StandardRequestableTypeRequestResolverAssignmentDataStore deserialize(IFactoryController controller, net.minecraft.network.FriendlyByteBuf buffer) throws Throwable Description copied from interface:IFactoryMethod to deserialize a given constructable.- Specified by:
deserializein interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Parameters:
controller- The controller that can be used to deserialize complicated types.buffer- The data buffer of the request that should be deserialized.- Returns:
- The request that corresponds with the given data in the nbt
- Throws:
Exception- if somethings goes wrong during the deserialization.Throwable
-
getSerializationId
public short getSerializationId()Description copied from interface:IFactoryGet a serialization id for the factory.- Specified by:
getSerializationIdin interfaceIFactory<FactoryVoidInput,StandardRequestableTypeRequestResolverAssignmentDataStore> - Returns:
- the short id.
-