Tags
Creators
Details
All versions
1.0.6
Release
ABCDwater 1.0.63 months ago 14
Compatibility
Minecraft: Java Edition
26.1.2
Platform
NeoForge
Supported environments
Client-side
Changes
重写内容
坠落伤害预测 — 完全重写
不再简单地向下扫地面,改为模拟下一 tick 的物理运动预测是否会撞地受伤:
python
每 tick 预测:
1. 取当前 motionY
2. 模拟重力加速度: nextMotionY = (motionY - 0.08) × 0.98
3. 计算下一 tick 位置: nextY = currentY + motionY
4. 检查 nextY 下方是否非空气 → 会落地?
5. 若是,计算累积 fallDistance + 本次下落距离
6. 若 > 3.5 → 触发落地水!仅在有摔伤风险时出手
| 新逻辑 | 旧逻辑 |
|------------------------|----------------|
| 预测下一 tick 是否落地 | 向下扫描找地面 |
| 计算精确摔落伤害值 | 固定 2 格触发 |
| 仅在有伤害时放水 | 3.5 格内都触发 |
| 考虑运动速度 | 忽略速度 |
回收逻辑 — 完全重写
- 落地后持续尝试 useItemOn 水源(最多 40 tick ≈ 2 秒)
- 每次打印 result=,方便排查
- 水源消失后自动放弃
- 不依赖 isInWater() 判断,落地即尝试
Rewritten content
Fall Damage Prediction — Complete Rewrite
Instead of simply scanning the ground from top to bottom, we now simulate the physical motion for the next tick to predict whether a collision with the ground will result in injury:
python
Prediction per tick:
1. Take the current motionY
2. Simulate gravitational acceleration: nextMotionY = (motionY - 0.08) × 0.98
3. Calculate the position for the next tick: nextY = currentY + motionY
4. Check if the area below `nextY` is not air → Will the character land?
5. If so, add the current fall distance to the cumulative `fallDistance`
6. If > 3.5 → Trigger the ‘landing water’ effect! Only activate when there is a risk of fall damage
| New logic | Old logic |
|---------------------- --|----------------|
| Predict whether a fall will occur in the next tick | Scan downwards for ground |
| Calculate precise fall damage value | Triggered at a fixed 2-block distance |
| Release water only when damage is incurred | Triggered within 3.5 blocks |
| Takes movement speed into account | Ignores speed |
Recovery logic — completely rewritten
- Continues to attempt `useItemOn` on the water source after landing (up to 40 ticks ≈ 2 seconds)
- Prints `result=` each time to aid troubleshooting
- Automatically gives up once the water source disappears
- Does not rely on `isInWater()` for judgement; attempts immediately upon landing
Translated with DeepL.com (free version)
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:h3xDURMp:Pn5rLTK5"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:h3xDURMp:Pn5rLTK5"
}

