/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.mojang.serialization.Codec * com.mojang.serialization.MapCodec * io.netty.buffer.ByteBuf */ package net.minecraft.server.dialog; import com.mojang.serialization.Codec; import com.mojang.serialization.MapCodec; import io.netty.buffer.ByteBuf; import java.util.Optional; import net.minecraft.core.Holder; import net.minecraft.core.HolderSet; import net.minecraft.core.RegistryCodecs; 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.RegistryFileCodec; import net.minecraft.server.dialog.CommonDialogData; import net.minecraft.server.dialog.action.Action; import net.minecraft.util.ExtraCodecs; public interface Dialog { public static final Codec WIDTH_CODEC = ExtraCodecs.intRange(1, 1024); public static final Codec DIRECT_CODEC = BuiltInRegistries.DIALOG_TYPE.byNameCodec().dispatch(Dialog::codec, c -> c); public static final Codec> CODEC = RegistryFileCodec.create(Registries.DIALOG, DIRECT_CODEC); public static final Codec> LIST_CODEC = RegistryCodecs.homogeneousList(Registries.DIALOG, DIRECT_CODEC); public static final StreamCodec> STREAM_CODEC = ByteBufCodecs.holder(Registries.DIALOG, ByteBufCodecs.fromCodecWithRegistriesTrusted(DIRECT_CODEC)); public static final StreamCodec CONTEXT_FREE_STREAM_CODEC = ByteBufCodecs.fromCodecTrusted(DIRECT_CODEC); public CommonDialogData common(); public MapCodec codec(); public Optional onCancel(); }