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.