WorldClock .java

net.minecraft.world.clock.WorldClock (record, 17 lines): record. members: DIRECT_CODEC, STREAM_CODEC, CODEC. imports: RegistryCodecs.

net.minecraft.world.clockrecord17 linescommon783 B

API Surface (1)

record WorldClock()

Fields & Constants (3)

CODEC
STREAM_CODEC
DIRECT_CODEC

Code Graph: Dependencies (6)

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

Full Source

WorldClock.java17 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.clock;
2
3
import com.mojang.serialization.Codec;
4
import com.mojang.serialization.MapCodec;
5
import net.minecraft.core.Holder;
6
import net.minecraft.core.registries.Registries;
7
import net.minecraft.core.registries.codec.RegistryCodecs;
8
import net.minecraft.network.RegistryFriendlyByteBuf;
9
import net.minecraft.network.codec.ByteBufCodecs;
10
import net.minecraft.network.codec.StreamCodec;
11
12
public record WorldClock() {
13
	public static final Codec<Holder<WorldClock>> CODEC = RegistryCodecs.holder(Registries.WORLD_CLOCK);
14
	public static final StreamCodec<RegistryFriendlyByteBuf, Holder<WorldClock>> STREAM_CODEC = ByteBufCodecs.holderRegistry(Registries.WORLD_CLOCK);
15
	public static final Codec<WorldClock> DIRECT_CODEC = MapCodec.unitCodec(WorldClock::new);
16
}
17

Decompiled Minecraft 26.3 source of WorldClock (net/minecraft/world/clock/WorldClock.java) with Mojang official mappings, stored verbatim on the site.