61 lines
2.1 KiB
Java
61 lines
2.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.mojang.serialization.Codec
|
|
*/
|
|
package net.minecraft.world.item.crafting;
|
|
|
|
import com.mojang.serialization.Codec;
|
|
import java.util.List;
|
|
import net.minecraft.core.HolderLookup;
|
|
import net.minecraft.core.registries.BuiltInRegistries;
|
|
import net.minecraft.core.registries.Registries;
|
|
import net.minecraft.network.RegistryFriendlyByteBuf;
|
|
import net.minecraft.network.codec.ByteBufCodecs;
|
|
import net.minecraft.network.codec.StreamCodec;
|
|
import net.minecraft.resources.ResourceKey;
|
|
import net.minecraft.world.item.ItemStack;
|
|
import net.minecraft.world.item.crafting.PlacementInfo;
|
|
import net.minecraft.world.item.crafting.RecipeBookCategory;
|
|
import net.minecraft.world.item.crafting.RecipeInput;
|
|
import net.minecraft.world.item.crafting.RecipeSerializer;
|
|
import net.minecraft.world.item.crafting.RecipeType;
|
|
import net.minecraft.world.item.crafting.display.RecipeDisplay;
|
|
import net.minecraft.world.level.Level;
|
|
|
|
public interface Recipe<T extends RecipeInput> {
|
|
public static final Codec<Recipe<?>> CODEC = BuiltInRegistries.RECIPE_SERIALIZER.byNameCodec().dispatch(Recipe::getSerializer, RecipeSerializer::codec);
|
|
public static final Codec<ResourceKey<Recipe<?>>> KEY_CODEC = ResourceKey.codec(Registries.RECIPE);
|
|
public static final StreamCodec<RegistryFriendlyByteBuf, Recipe<?>> STREAM_CODEC = ByteBufCodecs.registry(Registries.RECIPE_SERIALIZER).dispatch(Recipe::getSerializer, RecipeSerializer::streamCodec);
|
|
|
|
public boolean matches(T var1, Level var2);
|
|
|
|
public ItemStack assemble(T var1, HolderLookup.Provider var2);
|
|
|
|
default public boolean isSpecial() {
|
|
return false;
|
|
}
|
|
|
|
default public boolean showNotification() {
|
|
return true;
|
|
}
|
|
|
|
default public String group() {
|
|
return "";
|
|
}
|
|
|
|
public RecipeSerializer<? extends Recipe<T>> getSerializer();
|
|
|
|
public RecipeType<? extends Recipe<T>> getType();
|
|
|
|
public PlacementInfo placementInfo();
|
|
|
|
default public List<RecipeDisplay> display() {
|
|
return List.of();
|
|
}
|
|
|
|
public RecipeBookCategory recipeBookCategory();
|
|
}
|
|
|