26 lines
1.4 KiB
Java
26 lines
1.4 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.mojang.datafixers.kinds.App
|
|
* com.mojang.datafixers.kinds.Applicative
|
|
* com.mojang.serialization.Codec
|
|
* com.mojang.serialization.codecs.RecordCodecBuilder
|
|
*/
|
|
package net.minecraft.client.resources.metadata.texture;
|
|
|
|
import com.mojang.datafixers.kinds.App;
|
|
import com.mojang.datafixers.kinds.Applicative;
|
|
import com.mojang.serialization.Codec;
|
|
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
|
import net.minecraft.client.renderer.texture.MipmapStrategy;
|
|
import net.minecraft.server.packs.metadata.MetadataSectionType;
|
|
|
|
public record TextureMetadataSection(boolean blur, boolean clamp, MipmapStrategy mipmapStrategy) {
|
|
public static final boolean DEFAULT_BLUR = false;
|
|
public static final boolean DEFAULT_CLAMP = false;
|
|
public static final Codec<TextureMetadataSection> CODEC = RecordCodecBuilder.create(i -> i.group((App)Codec.BOOL.optionalFieldOf("blur", (Object)false).forGetter(TextureMetadataSection::blur), (App)Codec.BOOL.optionalFieldOf("clamp", (Object)false).forGetter(TextureMetadataSection::clamp), (App)MipmapStrategy.CODEC.optionalFieldOf("mipmap_strategy", (Object)MipmapStrategy.AUTO).forGetter(TextureMetadataSection::mipmapStrategy)).apply((Applicative)i, TextureMetadataSection::new));
|
|
public static final MetadataSectionType<TextureMetadataSection> TYPE = new MetadataSectionType<TextureMetadataSection>("texture", CODEC);
|
|
}
|
|
|