无护盾延迟
基于 Revvilo 的 Responsive Shields,为 Fabric 版 Minecraft 的格挡系统提供可配置的延迟减少功能
你是否曾注意到一种奇怪的情况:你试图格挡并攻击,但依然被击中?即使当时你的盾牌明明已经举起来了?这并非你的错觉!这种延迟是真实存在的,而本模组将其移除!
当持有物品时,存在一个基础的“使用时长”,该值会被记录并在持有时每刻递减。
Minecraft 仅在盾牌举起超过 5 刻(ticks)后才会格挡攻击。
它通过检查当前使用时长倒计时与物品基础使用时长的差值来进行判断。
(来自 LivingEntity 的 isBlocking() 方法)
return item.getMaxUseTime(this.activeItemStack) - this.itemUseTimeLeft >= 5;
本模组通过使用 mixin 修改 5 这个常量来绕过此限制,从而允许在任意给定整数 0 到 5 之间进行比较。
本模组旨在作为 Revvilo's Responsive Shields 的替代方案。因此,如果 Revvilo 未来推出其自身的 Fabric 移植版本,我将停止维护本项目。
如果你需要 Forge 等效模组,不妨去看看那个。
? 设置
本模组适用于 1.17 及以上版本。它可能也能在更早的版本中运行,但我懒得去测试。
本模组仅需在服务端安装。同时在客户端安装也不会带来任何额外好处。
本模组不需要 Fabric API,只需要 Fabric 加载器(Fabric Loader)。
⚙ 配置文件
文件及内容:
no-shield-delay.toml
RaiseTime(抬起时间)
(范围 0 到 5,默认值:0)从右键点击开始,到游戏允许格挡攻击所需的时间,以刻(ticks)为单位。
Enabled(启用)
(默认值:true)是否启用本模组的效果。
说明:
? 许可证
版权所有 2022 Quplet,采用 Apache License 2.0 许可协议。若使用或分发我的作品,请注明出处。
No Shield Delay
Configurable reduction of the delay in Minecraft's blocking system for Fabric based off of Revvilo's Responsive Shields
Ever notice a strange occurrence where you try to block and attack and it hits you anyway? Even though your shield was definitely up by then? Well, it isn't in your head! That delay is very much real and this mod removes it!
When holding use on an item, there is a base 'use time' which is stored and then decremented every tick while it's being held.
Minecraft will only block an attack after the shield has been raised for more than 5 ticks.
It checks this by looking at the difference between the current use time countdown and the base use time of the item.
(from LivingEntity's isBlocking() method)
return item.getMaxUseTime(this.activeItemStack) - this.itemUseTimeLeft >= 5;
This mod bypasses this by using mixin to alter the 5 constant, allowing comparison between any given integer 0 thorough 5.
This mod is supposed to be an alternative to Revvilo's Responsive Shields. Because of this, if Revvilo ever makes a Fabric port of their own, I will cease maintaining this project.
Give it a look if you need a Forge equivalent.
? Setup
This mod should work with 1.17+. It possibly could work with versions older than that, but I don't feel like testing it.
This mod is only necessary server side. Installing on the client as well will not yield any benefit.
The Fabric API is not needed for this mod. Only the Fabric Loader.
⚙ Configs
Files and contents:
no-shield-delay.toml
RaiseTime
(From 0 to 5. default: 0) The amount of time, in ticks, from when you right-click before the game will block attacks.
Enabled
(Default: true) Whether or not the effect of the mod is enabled.
Info:
-
Setting Raise Time to 0 makes shields capable of blocking immediately
-
The client-side raise animation takes roughly one tick to complete. So setting Raise Time to 1 is a decent balance between responsiveness and not being able to blockhit as easily.
? License
Copyright 2022 Quplet, Apache License 2.0. Please credit if you use or distribute my work.
评论 0
登录后参与评分
还没有评论,来抢沙发吧