GameTestEvent .java

net.minecraft.gametest.framework.GameTestEvent (class): members: createWithMinimumDelay, expectedDelay, minimumDelay, assertion, create. imports: Nullable.

net.minecraft.gametest.frameworkclass28 linescommon901 B

API Surface (3)

GameTestEvent create(final Runnable runnable)
GameTestEvent create(final long expectedTick, final Runnable runnable)
GameTestEvent createWithMinimumDelay(final long minimumDelay, final Runnable runnable)

Fields & Constants (3)

expectedDelay
minimumDelay
assertion

Full Source

GameTestEvent.java28 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.gametest.framework;
2
3
import org.jspecify.annotations.Nullable;
4
5
public class GameTestEvent {
6
	public final @Nullable Long expectedDelay;
7
	public final @Nullable Long minimumDelay;
8
	public final Runnable assertion;
9
10
	private GameTestEvent(final @Nullable Long expectedDelay, final @Nullable Long minimumDelay, final Runnable assertion) {
11
		this.expectedDelay = expectedDelay;
12
		this.minimumDelay = minimumDelay;
13
		this.assertion = assertion;
14
	}
15
16
	public static GameTestEvent create(final Runnable runnable) {
17
		return new GameTestEvent(null, null, runnable);
18
	}
19
20
	public static GameTestEvent create(final long expectedTick, final Runnable runnable) {
21
		return new GameTestEvent(expectedTick, null, runnable);
22
	}
23
24
	public static GameTestEvent createWithMinimumDelay(final long minimumDelay, final Runnable runnable) {
25
		return new GameTestEvent(null, minimumDelay, runnable);
26
	}
27
}
28

Decompiled Minecraft 26.3 source of GameTestEvent (net/minecraft/gametest/framework/GameTestEvent.java) with Mojang official mappings, stored verbatim on the site.