Class PublicCrafting
java.lang.Object
com.minecolonies.api.colony.requestsystem.requestable.crafting.AbstractCrafting
com.minecolonies.api.colony.requestsystem.requestable.crafting.PublicCrafting
- All Implemented Interfaces:
IRequestable
-
Field Summary
Fields inherited from class com.minecolonies.api.colony.requestsystem.requestable.crafting.AbstractCrafting
NBT_COUNT, NBT_MIN_COUNT, NBT_STACK, NBT_TOKEN -
Constructor Summary
ConstructorsConstructorDescriptionPublicCrafting(@NotNull net.minecraft.world.item.ItemStack stack, int count, int minCount, IToken<?> recipeToken) Create a Stack deliverable.PublicCrafting(@NotNull net.minecraft.world.item.ItemStack stack, int count, IToken<?> recipeToken) Create a Stack deliverable. -
Method Summary
Modifier and TypeMethodDescriptionstatic PublicCraftingdeserialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer) Deserialize the deliverable.static PublicCraftingdeserialize(net.minecraft.core.HolderLookup.Provider provider, IFactoryController controller, net.minecraft.nbt.CompoundTag compound) Deserialize the deliverable.Set<com.google.common.reflect.TypeToken<?>> Get the super classes associated to this request type.static voidserialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer, PublicCrafting input) Serialize the deliverable.static net.minecraft.nbt.CompoundTagserialize(net.minecraft.core.HolderLookup.Provider provider, IFactoryController controller, PublicCrafting input) Serialize the deliverable.Methods inherited from class com.minecolonies.api.colony.requestsystem.requestable.crafting.AbstractCrafting
equals, getCount, getMinCount, getRecipeID, getStack, hashCode
-
Constructor Details
-
PublicCrafting
public PublicCrafting(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, int count, int minCount, IToken<?> recipeToken) Create a Stack deliverable.- Parameters:
stack- the required stack.count- the crafting count.minCount- the min count.
-
PublicCrafting
public PublicCrafting(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, int count, IToken<?> recipeToken) Create a Stack deliverable.- Parameters:
stack- the required stack.count- the crafting count.
-
-
Method Details
-
serialize
public static net.minecraft.nbt.CompoundTag serialize(@NotNull net.minecraft.core.HolderLookup.Provider provider, IFactoryController controller, PublicCrafting input) Serialize the deliverable.- Parameters:
controller- the controller.input- the input.- Returns:
- the compound.
-
deserialize
public static PublicCrafting deserialize(@NotNull net.minecraft.core.HolderLookup.Provider provider, IFactoryController controller, net.minecraft.nbt.CompoundTag compound) Deserialize the deliverable.- Parameters:
controller- the controller.compound- the compound.- Returns:
- the deliverable.
-
serialize
public static void serialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer, PublicCrafting input) Serialize the deliverable.- Parameters:
controller- the controller.buffer- the the buffer to write to.input- the input to serialize.
-
deserialize
public static PublicCrafting deserialize(IFactoryController controller, net.minecraft.network.RegistryFriendlyByteBuf buffer) Deserialize the deliverable.- Parameters:
controller- the controller.buffer- the buffer to read.- Returns:
- the deliverable.
-
getSuperClasses
Description copied from interface:IRequestableGet the super classes associated to this request type.- Returns:
- the type.
-