minecraft-src/net/minecraft/client/resources/metadata/texture/TextureMetadataSectionSerializer.java
2025-07-04 01:41:11 +03:00

21 lines
721 B
Java

package net.minecraft.client.resources.metadata.texture;
import com.google.gson.JsonObject;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.server.packs.metadata.MetadataSectionSerializer;
import net.minecraft.util.GsonHelper;
@Environment(EnvType.CLIENT)
public class TextureMetadataSectionSerializer implements MetadataSectionSerializer<TextureMetadataSection> {
public TextureMetadataSection fromJson(JsonObject json) {
boolean bl = GsonHelper.getAsBoolean(json, "blur", false);
boolean bl2 = GsonHelper.getAsBoolean(json, "clamp", false);
return new TextureMetadataSection(bl, bl2);
}
@Override
public String getMetadataSectionName() {
return "texture";
}
}