package com.r3944realms.leashedplayer.client.renderer.item.properties.conditionalRange;

import com.mojang.serialization.MapCodec;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;

import javax.annotation.Nullable;

@OnlyIn(Dist.CLIENT)
public interface ConditionalRangeItemModelProperty {
    ConditionalRangeData get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed, ItemDisplayContext displayContext);

    MapCodec<? extends ConditionalRangeItemModelProperty> type();
    record ConditionalRangeData(boolean boolValue, float floatValue) {
        public static ConditionalRangeData create(boolean boolValue, float floatValue) {
            return new ConditionalRangeData(boolValue, floatValue);
        }
    }
}
