https://github.com/emptydreams/smart-elytra
This mod is designed to help players reduce accidental activation of the elytra.
https://github.com/emptydreams/smart-elytra
fabric kotlin mc minecraft
Last synced: about 2 months ago
JSON representation
This mod is designed to help players reduce accidental activation of the elytra.
- Host: GitHub
- URL: https://github.com/emptydreams/smart-elytra
- Owner: EmptyDreams
- License: mit
- Created: 2025-01-28T06:38:42.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-01-28T07:04:33.000Z (3 months ago)
- Last Synced: 2025-01-28T07:28:01.008Z (3 months ago)
- Topics: fabric, kotlin, mc, minecraft
- Language: Kotlin
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 欢迎使用 SmartElytra
本模组致力于尽可能地避免玩家误触鞘翅。
### 检测逻辑
模组通过固定的逻辑猜测玩家是否是主观地想要使用鞘翅,从而在玩家不想使用鞘翅时禁用鞘翅。
检测逻辑如下:
1. 检查玩家是否手持烟花,如果是则允许使用鞘翅,否则继续向下
2. 检查玩家是否不在奔跑且脚下不是空气方块,如果是说明玩家地脚在方块中或在流体中,此时禁用鞘翅,否则继续向下
3. 检查玩家垂直方向速度的绝对值是否小于 0.25 且距离上一次跳跃的间隔小于 20 Tick,如果是说明玩家在跳跃最高点附近按下了空格,可能是想要通过鞘翅滑行进入爬行模式,此时允许使用鞘翅,否则继续向下
4. 检查玩家是否不在奔跑且脚下间隔一个方块的位置是流体或空气,如果是说明玩家可能在尝试进入爬行或借助鞘翅越出水面,此时允许使用鞘翅,否则继续向下
5. 检查玩家前方五格的空间是否允许飞行,如果是则允许使用鞘翅,否则禁用鞘翅