PlainTextFunction .java

net.minecraft.commands.functions.PlainTextFunction (record, 17 lines): members: entries, instantiate. imports: FunctionInstantiationException, CompoundTag.

net.minecraft.commands.functionsrecord17 linescommon696 B

Implements

API Surface (1)

InstantiatedFunction<T> instantiate(final @Nullable CompoundTag arguments, final CommandDispatcher<T> dispatcher)

Full Source

PlainTextFunction.java17 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.commands.functions;
2
3
import com.mojang.brigadier.CommandDispatcher;
4
import java.util.List;
5
import net.minecraft.commands.FunctionInstantiationException;
6
import net.minecraft.commands.execution.UnboundEntryAction;
7
import net.minecraft.nbt.CompoundTag;
8
import net.minecraft.resources.Identifier;
9
import org.jspecify.annotations.Nullable;
10
11
public record PlainTextFunction<T>(Identifier id, List<UnboundEntryAction<T>> entries) implements CommandFunction<T>, InstantiatedFunction<T> {
12
	@Override
13
	public InstantiatedFunction<T> instantiate(final @Nullable CompoundTag arguments, final CommandDispatcher<T> dispatcher) throws FunctionInstantiationException {
14
		return this;
15
	}
16
}
17

Decompiled Minecraft 26.3 source of PlainTextFunction (net/minecraft/commands/functions/PlainTextFunction.java) with Mojang official mappings, stored verbatim on the site.