通知接口

基本信息

属性 值
注册名 RandomThings:notificationInterface
类 lumien.randomthings.Blocks.BlockNotificationInterface
TileEntity TileEntityNotificationInterface(ModTileEntities.java:15)
材质 Material.rock(BlockNotificationInterface.java:12)
GUI ID 由 GuiIds 覆盖,无独立 ID
开关 Blocks.NotificationInterface(RTConfiguration.java:205)
合成配方 无

功能

通知接口用于接收自定义的屏幕通知(标题 + 描述 + 图标 + 时长),是本 mod 客户端通知系统的方块端入口。

它的通知可以通过指令 /rt notify 主动发出(见 指令),RandomThings.imcMessages 也处理 setSolutionColor 这个 IMC 动作(RandomThings.java:189-195),把其他 mod 传来的生物群系颜色写进 ItemBiomeCapsule.biomeColors。

功能:ComputerCraft 外设

它是三个 CC 外设方块之一。PeripheralProvider.getPeripheral 对以下三类 TileEntity 返回外设(PeripheralProvider.java:33-38):

TileEntity 对应方块
TileEntityCreativePlayerInterface 创造模式玩家接口
TileEntityOnlineDetector 在线侦测器
TileEntityNotificationInterface 本方块

注册方式是反射调用 ComputerCraftAPI.registerPeripheralProvider(PeripheralProvider.java:24-29),因为 ComputerCraft 是软依赖。反射失败时 RandomThings.postInit 会打一条 WARN 日志(RandomThings.java:139-144):

Couldn't reflect on cc, no cc peripheral support for CreativePlayerInterface and OnlineDetector and Notification Interface

数值

数值名 值
CC 外设支持 是
通知来源 /rt notify 指令 + IMC setSolutionColor
合成配方 无(grep -c 'ModBlocks.notificationInterface' Library/Recipes.java = 0)

获取方式

无合成配方,且不进入任何战利品表。 全 mod 的 ChestGenHooks.addItem 只有两处 —— ItemWhiteStone.java:32(地下城箱子,白石)与 ItemIngredient.java:51(村庄铁匠铺,灵魂之铁)—— 均不涉及本方块。因此本方块在生存模式下只能由指令放置。

相关条目