File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/main/java/hellfirepvp/modularmachinery/common/integration Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -206,10 +206,12 @@ public void register(IModRegistry registry) {
206206 registry .addRecipeCatalyst (stack , machineCategory );
207207 }
208208
209- // Only handle MM recipes
210- for (DynamicMachine machine : MachineRegistry .getRegistry ()) {
211- String machineCategory = getCategoryStringFor (machine );
212- registry .getRecipeTransferRegistry ().addRecipeTransferHandler (new MEInputRecipeTransferHandler (), machineCategory );
209+ // 仅在 AE2 存在时注册转移处理器,避免类加载失败导致 JEI 插件注册中断
210+ if (Mods .AE2 .isPresent ()) {
211+ for (DynamicMachine machine : MachineRegistry .getRegistry ()) {
212+ String machineCategory = getCategoryStringFor (machine );
213+ registry .getRecipeTransferRegistry ().addRecipeTransferHandler (new MEInputRecipeTransferHandler (), machineCategory );
214+ }
213215 }
214216
215217 for (DynamicMachine machine : MachineRegistry .getRegistry ()) {
You can’t perform that action at this time.
0 commit comments