Skip to content

🎨 美学表现与环境反馈

Agrarian Reform 丰富了农业生产的视觉与听觉反馈,使田野更具生机、灵动且充满沉浸感。


🌾 穿行作物自然沙沙音效

当玩家或实体穿过完全成熟的农作物时,引擎会触发物理作物沙沙声效 (SoundEvents.GRASS_HIT):

java
if (isMaxAge && DynamicGameRuleManager.getBoolean(serverLevel, AgrarianGameRules.AMBIENT_CROP_RUSTLE)) {
    if (SoundHelper.shouldPlayRustle(entityId, time)) {
        if (entity.getDeltaMovement().horizontalDistance() > 0.01D) {
            float pitch = 0.8F + serverLevel.getRandom().nextFloat() * 0.4F;
            float volume = 0.2F + serverLevel.getRandom().nextFloat() * 0.1F;
            serverLevel.playSound(null, pos, SoundEvents.GRASS_HIT, SoundSource.BLOCKS, volume, pitch);
        }
    }
}
  • 音调变化:音调在 $0.8$ 到 $1.2$ 之间动态变化,避免机械单调的听觉重复。
  • 防抖节流SoundHelper 按实体 ID 对音效触发进行节流控制,防止在密集田间疾跑时造成音效轰鸣堆叠。

✨ 活力绿色粒子迸发

当作物生长阶段提升时(无论是自然生长、降雨加速还是使用骨粉),作物方块都会迸发出喜悦村民的绿色活力粒子 (ParticleTypes.HAPPY_VILLAGER):

  • 粒子数量:每次生长事件产生 3 个粒子。
  • 扩散范围:方块中心周围 $0.25\text{m} \times 0.25\text{m} \times 0.25\text{m}$。
  • 游戏规则控制:可通过 /gamerule agrarian_reform:ambient_vitality_particles false 关闭。

🌅 清晨微露视觉渲染

日出时耕地的渲染色调会发生微妙更新,模拟晨露浸润湿润耕地的景象,为清晨的农作收获增添视觉仪式感。


See also: 耕地韧性与防践踏机制 and 游戏规则 (GameRules) 参考.

Official documentation & web portal for Dasik Igaijinn mods.