GuiHandler
基本信息
| 属性 | 值 |
|---|---|
| 类名 | remoteio.common.core.handler.GuiHandler |
| 注册 | NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler())(RemoteIO 的 preInit) |
功能
把「哪个方块 / 物品 → 开哪个 GUI」的分发逻辑集中在一处。
实现要点
- 是 Forge 标准的
IGuiHandler实现,负责按EntityPlayer所在维度与坐标找到对应的IGuiProvider(方块或物品),再打开对应容器。 - 与 ContainerHandler 分工:本类管打开, 后者管容器在客户端的同步。
相关条目
- ContainerHandler - 容器同步
- RemoteIO - 注册位置