Interface IPocketCrafter<R extends net.minecraft.world.item.crafting.Recipe<?>>
- All Known Implementing Classes:
AbstractCookingPocketCrafter,CookingPocketCrafter,CraftingPocketCrafter,SimplePocketCrafter,SingleInputPocketCrafter
@ParametersAreNonnullByDefault
public interface IPocketCrafter<R extends net.minecraft.world.item.crafting.Recipe<?>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, net.minecraft.core.Holder<IPocketCrafter<?>>> -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCastRecipe(net.minecraft.world.item.crafting.Recipe<?> recipe) craft(IPocketCraftingContext context, boolean simulate, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipeHolder, List<IInterpretedSlot<?>> inputSlots, net.minecraft.world.inventory.Slot outputSlot) net.minecraft.world.item.ItemStacknet.minecraft.network.chat.MutableComponentgetName()default intgetRecipeLength(IPocketCraftingContext context, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipe) getRecipes(IPocketCraftingContext.Client context, List<IInterpretedSlot<?>> slots, PocketCrafting.SlotArrangement slotArrangement) default List<IInterpretedSlot<?>> getSlotInterpretations(IPocketCraftingContext context, net.minecraft.world.inventory.Slot slot) default voidsendPacket(IPocketCraftingContext.Client context, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipeHolder, List<PocketCraftPacket.SlotAndInterpretation> slotAndInterpretations, Optional<Integer> outputSlotIndex)
-
Field Details
-
STREAM_CODEC
static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,net.minecraft.core.Holder<IPocketCrafter<?>>> STREAM_CODEC
-
-
Method Details
-
getName
net.minecraft.network.chat.MutableComponent getName() -
getDefaultToolStack
net.minecraft.world.item.ItemStack getDefaultToolStack() -
getSlotInterpretations
default List<IInterpretedSlot<?>> getSlotInterpretations(IPocketCraftingContext context, net.minecraft.world.inventory.Slot slot) -
canCastRecipe
boolean canCastRecipe(net.minecraft.world.item.crafting.Recipe<?> recipe) -
getRecipes
List<net.minecraft.world.item.crafting.RecipeHolder<? extends R>> getRecipes(IPocketCraftingContext.Client context, List<IInterpretedSlot<?>> slots, PocketCrafting.SlotArrangement slotArrangement) -
getRecipeLength
default int getRecipeLength(IPocketCraftingContext context, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipe) -
craft
PocketCrafting.Result craft(IPocketCraftingContext context, boolean simulate, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipeHolder, List<IInterpretedSlot<?>> inputSlots, @Nullable net.minecraft.world.inventory.Slot outputSlot) -
sendPacket
default void sendPacket(IPocketCraftingContext.Client context, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipeHolder, List<PocketCraftPacket.SlotAndInterpretation> slotAndInterpretations, Optional<Integer> outputSlotIndex)
-