AquaTweaks 是一个小型的客户端核心模组,旨在改善流体在非实心方块周围的外观。
其核心功能是将假水渲染到梯子、栅栏、告示牌等方块中,使它们在水下看起来不再那么滑稽。
请注意,这些更改纯粹是图形方面的。流体实际上不会穿过方块流动,而只是渲染进其中。
此外,此模组允许其他模组开发者注册他们的方块以进行优化。由于该过程的技术性,我将使用折叠内容展示。
有两种选项:要么在你的方块中实现接口 "blusunrize.aquatweaks.api.IAquaConnectable"(这支持 @Optional 注解),要么发送 IMC 消息。
使用接口的用户可以获得世界和坐标作为参数,从而可能进行 TileEntity 交互;此外,还有一个方法用于检查是否应向方块一侧渲染水,另一个方法用于确定是否应将水渲染进方块内部。
IMC 是简单快捷的方法。消息必须包含一个 NBTTagCompound,该复合标签需要两个字符串 "modid" 和 "block",它们用于通过 GameRegistry.findBlock() 获取相应的方块。
如果你只想让方块的特定元数据被 AquaTweaks 处理,还可以在键 "meta" 下添加一个整数。如果没有 meta,则默认值为 32767,这是损坏值的通用通配符值。
IMC 消息将发送至 ModID "AquaTweaks"。
祝你玩得愉快!
AquaTweaks is a small, clientside, coremod, which aims to improve the way fluids look around non-solid blocks.
In its essence, it renders fake water into ladders, fences, signs and the likes, making them not look as derpy underwater.
Note that these changes are purely of graphical nature. Fluids will not actually flow through blocks, but simply render into them.
In addition to that, this mod allows other modders to register their blocks for tweaking. Due to the technicality of that process, I'm going to spoiler it.
There is two options. either implement the interface "blusunrize.aquatweaks.api.IAquaConnectable" in your block (this supports the @Optional annotation"), or send an IMC message.
Users of the interface get the benefit of having world and coordinates passed, allowing possible TileEntity interaction, furthermore, the get one method to check if water should render a side towards the block and another which determines if water should be rendered into the block.
IMC is the easy and fast method. The message must have an NBTTagCompound that that compound requires two strings "modid" and "block", which are used to grab the respective block via GameRegistry.findBlock();
You can also add an integer under the key of "meta" if you only want a certain metadata of the block to AquaTweaks. Without meta, it will default to 32767, the universal wildcard value for damage.
IMC messages are sent to the ModID "AquaTweaks".
Enjoy!
评论 0
登录后参与评分
还没有评论,来抢沙发吧