AnyValue .java

net.minecraft.core.component.predicates.AnyValue (record, 12 lines): members: matches, type. imports: DataComponentType, DataComponentGetter.

net.minecraft.core.component.predicatesrecord12 linescommon373 B

Implements

API Surface (1)

boolean matches(final DataComponentGetter components)

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

AnyValue.java12 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.core.component.predicates;
2
3
import net.minecraft.core.component.DataComponentGetter;
4
import net.minecraft.core.component.DataComponentType;
5
6
public record AnyValue(DataComponentType<?> type) implements DataComponentPredicate {
7
	@Override
8
	public boolean matches(final DataComponentGetter components) {
9
		return components.get(this.type) != null;
10
	}
11
}
12

Decompiled Minecraft 26.3 source of AnyValue (net/minecraft/core/component/predicates/AnyValue.java) with Mojang official mappings, stored verbatim on the site.