DebugBeeInfo .java

net.minecraft.util.debug.DebugBeeInfo (record): members: hivePos, flowerPos, travelTicks, blacklistedHives, hasHive, STREAM_CODEC. imports: ByteBuf.

net.minecraft.util.debugrecord27 linescommon941 B

API Surface (2)

record DebugBeeInfo(Optional<BlockPos> hivePos, Optional<BlockPos> flowerPos, int travelTicks, List<BlockPos> blacklistedHives)
boolean hasHive(final BlockPos hivePos)

Fields & Constants (1)

STREAM_CODEC

Code Graph: Dependencies (3)

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

Full Source

DebugBeeInfo.java27 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util.debug;
2
3
import io.netty.buffer.ByteBuf;
4
import java.util.List;
5
import java.util.Optional;
6
import net.minecraft.core.BlockPos;
7
import net.minecraft.network.codec.ByteBufCodecs;
8
import net.minecraft.network.codec.StreamCodec;
9
10
public record DebugBeeInfo(Optional<BlockPos> hivePos, Optional<BlockPos> flowerPos, int travelTicks, List<BlockPos> blacklistedHives) {
11
	public static final StreamCodec<ByteBuf, DebugBeeInfo> STREAM_CODEC = StreamCodec.composite(
12
		BlockPos.STREAM_CODEC.apply(ByteBufCodecs::optional),
13
		DebugBeeInfo::hivePos,
14
		BlockPos.STREAM_CODEC.apply(ByteBufCodecs::optional),
15
		DebugBeeInfo::flowerPos,
16
		ByteBufCodecs.VAR_INT,
17
		DebugBeeInfo::travelTicks,
18
		BlockPos.STREAM_CODEC.apply(ByteBufCodecs.list()),
19
		DebugBeeInfo::blacklistedHives,
20
		DebugBeeInfo::new
21
	);
22
23
	public boolean hasHive(final BlockPos hivePos) {
24
		return this.hivePos.isPresent() && hivePos.equals(this.hivePos.get());
25
	}
26
}
27

Decompiled Minecraft 26.3 source of DebugBeeInfo (net/minecraft/util/debug/DebugBeeInfo.java) with Mojang official mappings, stored verbatim on the site.