20 lines
460 B
Java
20 lines
460 B
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.server.jsonrpc.api;
|
|
|
|
import java.net.URI;
|
|
import java.util.List;
|
|
import net.minecraft.server.jsonrpc.api.Schema;
|
|
|
|
public record SchemaComponent<T>(String name, URI ref, Schema<T> schema) {
|
|
public Schema<T> asRef() {
|
|
return Schema.ofRef(this.ref, this.schema.codec());
|
|
}
|
|
|
|
public Schema<List<T>> asArray() {
|
|
return Schema.arrayOf(this.asRef(), this.schema.codec());
|
|
}
|
|
}
|
|
|