Incompatibility between Connector and SpongeNeo due to RecipeManager missing in ResourceManagerHelperImpl#sort listeners
Chưa có ai nhận issue này.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Minecraft version
1.21.1
Describe the bug
When running Connector (2.0.0-beta.8) together with SpongeNeo on Forge 1.21.1 using Forgified Fabric API, the server fails resource reloads because ResourceManagerHelperImpl#getWrapperLookup cannot find a RecipeManager in the reload listeners list. This happens because SpongeNeo’s reload listener handling changes the order and contents of the listener list before Connector/FAPI processing, so the vanilla RecipeManager is no longer present when FAPI sorts listeners.
Steps to reproduce
- Install connector on a SpongeNeo server
- Add some fabric mod such as betterend
- Then crashed cause the No RecipeManager found in listeners!
...
Logs
https://gist.github.com/Sam-Chai/308356f2317c3ff77194950dd3956b4f
Additional context
From the begining I found that it seems like connector caused this problem. But when I check the crash-report, I notice that this crash from the FFAPI.
The issue from connector: https://github.com/Sinytra/Connector/issues/1911
Cause
ResourceManagerHelperImpl#sort(List) assumes the provided list always contains a RecipeManager instance (vanilla behavior). SpongeNeo modifies the reload process so that the RecipeManager is not in the list when FAPI’s sort runs. This triggers the IllegalStateException.
Proposed Fix
Add a compatibility patch in Connector that, when SpongeNeo is detected, ensures a RecipeManager is present in the listeners list before FAPI attempts to resolve dependencies.
Suggested Implementation
A minimal Mixin to ResourceManagerHelperImpl#sort(List) with remap=false, inserting the vanilla RecipeManager from the running server if missing:
@Inject(method = "sort(Ljava/util/List;)V", at = @At("HEAD"))
private void connector$ensureRecipeManagerPresent(List<PreparableReloadListener> listeners, CallbackInfo ci) {
if (!FMLEnvironment.dist.isDedicatedServer() || !ModList.get().isLoaded("spongeneo")) return;
for (PreparableReloadListener l : listeners) if (l instanceof RecipeManager) return;
MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
if (server == null) return;
ReloadableServerResources res = server.getServerResources().managers();
if (res == null) return;
RecipeManager rm = res.getRecipeManager();
if (rm == null) return;
listeners.add(0, rm);
}
This ensures that:
- It only runs on a dedicated server.
- It only triggers when SpongeNeo is loaded.
- It does nothing if a RecipeManager is already in the list.
- It adds the RecipeManager at the start of the list to preserve vanilla/FAPI expectations.
Result:
I fixed that. Connector and FFAPI with betterend running on a SpongeNeo server.
But I havn't test too much, and it semms caused some tag problem and I have to fix it.
- Ngôn ngữ chính
- Java
- Star
- 181
- Fork
- 41
- Merge trung bình
- 19 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Sinytra/ForgifiedFabricAPI
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Sinytra/ForgifiedFabricAPI#298 ·
-
Missing mixin in fabric-registry-sync-v0 suspected to break modded registry loadingCó thể làm lại được @Su5eD đã nhận 87 ngày trước và không có pull request nào đang mở. Đang mở26.1.x bug
Sinytra/ForgifiedFabricAPI#280 · 6 bình luận · 1 người được giao ·
-
1.21.x bug
Sinytra/ForgifiedFabricAPI#276 ·
-
1.21.x bug
Sinytra/ForgifiedFabricAPI#269 ·
-
1.21.x bug
Sinytra/ForgifiedFabricAPI#267 ·
Tất cả issue của Sinytra/ForgifiedFabricAPI
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sqlcipher/sqlcipher-android#97 · 1 bình luận ·
-
bug IIIF interoperability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Netcracker/qubership-integration-platform#1046 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100