跳到正文

RealisticSunBurn

作者:Thomazb

Undead mobs burn based on the real sun direction, not just sky light. Walls, buildings and terrain now cast real shadows.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Realistic Sun Burn

Tired of zombies burning under a roof just because the sky light level says so? This mod completely overhauls the undead sun burn mechanic to use directional raycasting based on the sun’s real position in the sky.

WHAT DOES IT DO?

In vanilla Minecraft, undead mobs burn in daylight based on a simple vertical sky light check. This means a zombie under a single block will always be safe, but a zombie behind a 10-block thick wall in the morning sun will still burn, because the game only looks straight up.

Realistic Sun Burn replaces this with a proper raycast from the mob’s head toward the actual sun position:

– Morning/Evening: The sun is low on the horizon. Walls and buildings cast long shadows that protect mobs.
– A single block overhead won’t protect a mob if the sun comes from the side.
– Deep holes and canyons protect mobs when the sun can’t reach them at the current angle.
– Glass and transparent blocks let sunlight through, just like real life.

FEATURES

– Directional sun raycasting: mobs only burn when in direct line-of-sight with the sun
– Works with ALL mobs, vanilla and modded
– Optimized: staggered checks (2x per second per mob) with result caching, minimal performance impact
– Debug visualization: see the actual raycast with particles in-game
– In-game config screen accessible from the Mods menu

COMMANDS

All commands require operator permission (level 2):

/sunburn debug
    Toggle debug particles. Orange flames = mob burns. Blue flames = mob in shadow. Smoke = the block that blocks the ray.

/sunburn info
    Display current sun direction, elevation angle, and time of day.

/sunburn test
    Test the mob you’re looking at and see the full raycast result in chat.

CONFIGURATION

Accessible via Mods menu > Realistic Sun Burn > Config:

– Ray Distance (default 384, range 16-512): Maximum raycast distance in blocks.
– Check Interval (default 10, range 1-40): Ticks between checks per mob. 10 = twice per second.
– Particle Density (default 1.5, range 0.5-5.0): Spacing between debug particles in blocks.

COMPATIBILITY

– Forge 1.20.1 (Forge 47.x)
– All modded mobs that use the vanilla sun burn system
– Shader packs: this mod works server-side, independent of shaders
– Multiplayer: works on dedicated servers

HOW IT WORKS

1. A Mixin intercepts the vanilla isSunBurnTick() method, cancelling the default behavior.
2. The sun’s direction is calculated from the world’s celestial angle.
3. A ray is traced from the mob’s eye position toward the sun.
4. Transparent blocks (glass, flowers, torches) are skipped. Opaque blocks stop the ray.
5. If nothing blocks the ray, the mob burns. If blocked, the mob is safe in the shadow.

常见问题

RealisticSunBurn 支持哪些 Minecraft 版本?

RealisticSunBurn 支持 Minecraft Java 版 1.20.1–26.3,共 13 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

RealisticSunBurn 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

Thomazb 的其他作品

查看全部 →