此模组提供对闪电产生的雷声音量的控制。无需再将天气滑块设置为“关闭”。现在可以一边享受雨声,一边聆听雷声。
技术细节
该模组通过挂钩 PlaySound 事件并筛选 ambient.weather.thunder 来实现这一功能。在声音播放前,其音量会被大幅降低(从 10000.0f 降至 5.0f)。对于高于 5 的音量,它也会进行处理,以尝试覆盖部分模组生成的雷电(例如使用 64.0f 的 Weather2)。默认的 5.0f 音量是根据相关错误报告 MC-46634 中的 一条评论 选定的。
全局雷声
默认启用一种简单的算法,使雷声在玩家附近、朝向闪电的方向播放。同时也会影响雷声的音量。详情请参阅配置文件。
常见问题 (FAQ)
我可以将其作为整合包的一部分分发吗?
可以,你不需要为此征求许可;只需保留模组的署名即可。
你会移植到 [版本号] 吗?
只有当足够多的人需要时才会移植。否则可能不会。我创建这个模组是为了我自己和朋友游玩的一个小型整合包,由于找不到能实现此功能的模组,我便决定分享出来。
BugTorch 不是已经修复这个问题了吗?
某种程度上是的。BugTorch 使用 一个 mixin 来修补 Minecraft 的 EntityLightningBolt 类。这意味着对于任何使用原版闪电的情况都已修复。尽管如此,如果将音量设置得过低,除非闪电离你很近,否则你将无法听到雷声;而如果设置得过高,即使你将天气滑块调得很低,雷声仍然会震耳欲聋。
本模组采用不同的方法,通过拦截实际的雷声并在播放前降低其音量来实现。这使得它可以覆盖任何使用雷声效果的模组。此外,本模组能够将声音定位在你附近,这样即使远处的闪电也能听到雷声,同时还能控制音量。
自版本 1.2.0 起,Better Thunder 会检测是否使用了 BugTorch 的修复方案,如果是,则会自动禁用自身。
This mod provides volume control over the thunder noise created by lightning bolts. No more setting the Weather slider to "OFF". Enjoy the rain alongside the thunder.
Technical
The mod accomplishes this by hooking onto the PlaySound event and filtering for ambient.weather.thunder. The volume is then reduced considerably (from 10000.0f to 5.0f) before it plays. It does this for any volume above 5 to try and catch some modded thunderbolts too (such as Weather2, which uses 64.0f). The default volume of 5.0f was chosen according to a comment on the relevant bug MC-46634.
Global thunder
Enabled by default is a simple algorithm that plays the sound near the player, in the direction of the thunderbolt. It also affects the thunder's volume. See the configuration file for details.
FAQ
Can I distribute it as part of a modpack?
Yes, and you don't need to ask for permission to do so; just preserve the mod credits.
Will you port this to [version]?
Only if enough people want it. Otherwise, probably not. I created this mod for a small modpack that I play on with a friend, and I thought I'd share it since I couldn't find a mod that does this.
Isn't this already fixed by BugTorch?
Yes, sort of. BugTorch uses a mixin to patch Minecraft's EntityLightningBolt class. This means it is fixed for anything that uses the vanilla lightning bolt. Despite this, setting the volume too low means you won't be able to hear it unless it's quite close to you, and setting it too high means it will still explode your ears even if you have the Weather slider set really low.
This mod uses a different approach by intercepting the actual thunder sound and reducing its volume before it is played. This allows coverage for any mods using the thunder sound. Additionally, this mod is able to place the sound near you so that you can still hear thunder bolts that are far away, while also being able to control the volume.
As of version 1.2.0, Better Thunder detects whether or not BugTorch's fix is used, and disables itself if so.
评论 0
登录后参与评分
还没有评论,来抢沙发吧