DebugHiveInfo.java
net.minecraft.util.debug.DebugHiveInfo
信息
- 全限定名:net.minecraft.util.debug.DebugHiveInfo
- 类型:public record
- 包:net.minecraft.util.debug
- 源码路径:src/main/java/net/minecraft/util/debug/DebugHiveInfo.java
- 起始行号:L10
- 职责:
TODO
字段/常量
STREAM_CODEC- 类型:
StreamCodec<RegistryFriendlyByteBuf,DebugHiveInfo> - 修饰符:
public static final - 源码定位:
L11 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static DebugHiveInfo pack(BeehiveBlockEntity beehive) @ L23
- 方法名:pack
- 源码定位:L23
- 返回类型:DebugHiveInfo
- 修饰符:public static
参数:
- beehive: BeehiveBlockEntity
说明:
TODO
代码
public record DebugHiveInfo(Block type, int occupantCount, int honeyLevel, boolean sedated) {
public static final StreamCodec<RegistryFriendlyByteBuf, DebugHiveInfo> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.registry(Registries.BLOCK),
DebugHiveInfo::type,
ByteBufCodecs.VAR_INT,
DebugHiveInfo::occupantCount,
ByteBufCodecs.VAR_INT,
DebugHiveInfo::honeyLevel,
ByteBufCodecs.BOOL,
DebugHiveInfo::sedated,
DebugHiveInfo::new
);
public static DebugHiveInfo pack(BeehiveBlockEntity beehive) {
return new DebugHiveInfo(
beehive.getBlockState().getBlock(), beehive.getOccupantCount(), BeehiveBlockEntity.getHoneyLevel(beehive.getBlockState()), beehive.isSedated()
);
}
}引用的其他类
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
ByteBufCodecs.registry()
- 引用位置:
-
- 引用位置:
字段/方法调用 - 关联成员:
StreamCodec.composite()
- 引用位置:
-
- 引用位置:
参数/方法调用 - 关联成员:
BeehiveBlockEntity.getHoneyLevel()
- 引用位置: