AlwaysTrueTest .java

net.minecraft.world.level.levelgen.structure.templatesystem.AlwaysTrueTest (class): members: testAgainstWorldState, INSTANCE, test, getType, CODEC.

net.minecraft.world.level.levelgen.structure.templatesystemclass31 linescommonextends RuleTest907 B

API Surface (3)

boolean testAgainstWorldState(final LevelReader level, final BlockPos pos, final RandomSource random)
boolean test(final BlockState blockState, final BlockPos pos, final RandomSource random)
RuleTestType<?> getType()

Fields & Constants (2)

CODEC
INSTANCE

Code Graph: Dependencies (6)

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

Full Source

AlwaysTrueTest.java31 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.structure.templatesystem;
2
3
import com.mojang.serialization.MapCodec;
4
import net.minecraft.core.BlockPos;
5
import net.minecraft.util.RandomSource;
6
import net.minecraft.world.level.LevelReader;
7
import net.minecraft.world.level.block.state.BlockState;
8
9
public class AlwaysTrueTest extends RuleTest {
10
	public static final MapCodec<AlwaysTrueTest> CODEC = MapCodec.unit(() -> AlwaysTrueTest.INSTANCE);
11
	public static final AlwaysTrueTest INSTANCE = new AlwaysTrueTest();
12
13
	private AlwaysTrueTest() {
14
	}
15
16
	@Override
17
	public boolean testAgainstWorldState(final LevelReader level, final BlockPos pos, final RandomSource random) {
18
		return true;
19
	}
20
21
	@Override
22
	public boolean test(final BlockState blockState, final BlockPos pos, final RandomSource random) {
23
		return true;
24
	}
25
26
	@Override
27
	protected RuleTestType<?> getType() {
28
		return RuleTestType.ALWAYS_TRUE_TEST;
29
	}
30
}
31

Decompiled Minecraft 26.3 source of AlwaysTrueTest (net/minecraft/world/level/levelgen/structure/templatesystem/AlwaysTrueTest.java) with Mojang official mappings, stored verbatim on the site.