Code/net/minecraft/world/level/levelgen/structure/templatesystem/RuleTest.java

16 lines
605 B
Java
Raw Normal View History

2025-07-01 06:20:03 +00:00
package net.minecraft.world.level.levelgen.structure.templatesystem;
import com.mojang.serialization.Codec;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.block.state.BlockState;
public abstract class RuleTest {
public static final Codec<RuleTest> CODEC = BuiltInRegistries.RULE_TEST
.byNameCodec()
.dispatch("predicate_type", RuleTest::getType, RuleTestType::codec);
public abstract boolean test(BlockState p_230322_, RandomSource p_230323_);
protected abstract RuleTestType<?> getType();
}