Skip to content

🔌 Mixin 位元組碼注入參考與掛鉤點 ​

📌 代碼倉庫原始碼免責聲明:本維基文件反映了倉庫當前的原始碼狀態,可能包含領先於 CurseForge 與 Modrinth 上公開發布版本的最新開發提交或未發布功能。

Better Bats uses Bytecode Mixins to modify vanilla entity and world spawning behavior while keeping world saves 100% vanilla-safe.

☕ 獨立開發者寄語:如果你喜歡蝙蝠逼真的三維群飛和鳥糞為莊稼施肥的生態體驗,歡迎在 Ko-fi 上支持我的獨立開發!


📋 完整 Mixin 注入對應表 ​

Mixin ClassTarget Vanilla ClassTarget Method@At Injection PointCancellation / Behavior
BatMixinnet.minecraft.world.entity.ambient.Bat<init>@At("TAIL")Registers custom AI goals (Panic, Sleep, HuntLight, DiveBomb) into goalSelector.
BatMixinnet.minecraft.world.entity.ambient.BatcustomServerAiStep@At("HEAD")cancellable = true. Completely replaces vanilla flight calculation with BatFlightHelper forces and resting logic.
BatMixinnet.minecraft.world.entity.ambient.BatcheckBatSpawnRules@At("HEAD")cancellable = true. Validates surface nighttime spawning rules.
BatMixinnet.minecraft.world.entity.ambient.BataddAdditionalSaveData@At("TAIL")Writes betterbats:guano_ticks integer tag to ValueOutput.
BatMixinnet.minecraft.world.entity.ambient.BatreadAdditionalSaveData@At("TAIL")Reads betterbats:guano_ticks integer tag from ValueInput.
GameEventDispatcherMixinnet.minecraft.world.level.gameevent.vibrations.VibrationSystem$ListenerhandleGameEvent@At("HEAD")Notifies nearby bats of sprint/explosion vibrations.
NaturalSpawnerMixinnet.minecraft.world.level.NaturalSpawnerm_6419_@At("HEAD")Replaces vanilla bat spawn weights with bat_spawn_weight GameRule.

See also: 系統架構與套件結構 | 行為配置與狀態存取器

Official documentation & web portal for Dasik Igaijinn mods.