/* * Decompiled with CFR 0.152. */ package net.minecraft.gametest.framework; import java.util.function.Consumer; import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.gametest.framework.BuiltinTestFunctions; import net.minecraft.gametest.framework.FunctionGameTestInstance; import net.minecraft.gametest.framework.GameTestEnvironments; import net.minecraft.gametest.framework.GameTestHelper; import net.minecraft.gametest.framework.GameTestInstance; import net.minecraft.gametest.framework.TestData; import net.minecraft.gametest.framework.TestEnvironmentDefinition; import net.minecraft.resources.Identifier; import net.minecraft.resources.ResourceKey; public interface GameTestInstances { public static final ResourceKey ALWAYS_PASS = GameTestInstances.create("always_pass"); public static void bootstrap(BootstrapContext context) { HolderGetter> functions = context.lookup(Registries.TEST_FUNCTION); HolderGetter batches = context.lookup(Registries.TEST_ENVIRONMENT); context.register(ALWAYS_PASS, new FunctionGameTestInstance(BuiltinTestFunctions.ALWAYS_PASS, new TestData>(batches.getOrThrow(GameTestEnvironments.DEFAULT_KEY), Identifier.withDefaultNamespace("empty"), 1, 1, false))); } private static ResourceKey create(String id) { return ResourceKey.create(Registries.TEST_INSTANCE, Identifier.withDefaultNamespace(id)); } }