TouhouLittleMaid icon indicating copy to clipboard operation
TouhouLittleMaid copied to clipboard

[Bug] 1.12 女仆模组修改 NPC 渲染器导致的兼容性问题

Open ChloePrime opened this issue 4 years ago • 0 comments

如题,我正在对我的mod做NPC兼容,这个mod会对任意实体生成护盾模型并渲染, 在开发环境(ModList:项目本身,CNPC,CodeChickenLib)下NPC可以显示护盾模型, 但在生产环境(MineCraft幻想乡客户端)下就跑不起来了。

经查明,是由于女仆模组的NPC渲染器继承的是RenderNPCInterface而非RenderCustomNpc导致的, RenderNPCInterface除了RenderCustomNpc以外的其他子类是其他NPC自带模型的渲染器, 而NPC引用的实体存在于RenderCustomNpc类中,负责任何NPC的渲染,包括调用RenderNPCInterface其他子类的渲染。

女仆模组修改NPC渲染类以后,其他mod便无法通过将RenderLivingBase转换为RenderCustonNpc从NPC的渲染器中获取NPC真正的模型,导致兼容失效。

故女仆的模组EntityCustomNpcChangeRender应继承RenderCustomNpc而非RenderNPCInterface类。

ChloePrime avatar Dec 13 '20 12:12 ChloePrime