mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Fix forge mixin remapping
Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -76,7 +76,7 @@ public class TinyRemapperService implements SharedService {
|
||||
mappings.add(MappingsService.createDefault(project, from, to).getMappingsProvider());
|
||||
|
||||
if (legacyMixin) {
|
||||
mappings.add(MixinMappingsService.getService(SharedServiceManager.get(project)).getMappingProvider(from, to));
|
||||
mappings.add(MixinMappingsService.getService(SharedServiceManager.get(project)).getMappingProvider(from, extension.isForge() && to.equals("srg") ? "intermediary" : to));
|
||||
}
|
||||
|
||||
return new TinyRemapperService(mappings, !legacyMixin, useKotlinExtension);
|
||||
|
||||
@@ -48,6 +48,7 @@ import net.fabricmc.loom.api.mappings.layered.MappingsNamespace;
|
||||
import net.fabricmc.loom.util.srg.InnerClassRemapper;
|
||||
import net.fabricmc.mappingio.MappingReader;
|
||||
import net.fabricmc.mappingio.tree.MappingTree;
|
||||
import net.fabricmc.mappingio.tree.MappingTreeView;
|
||||
import net.fabricmc.mappingio.tree.MemoryMappingTree;
|
||||
|
||||
/**
|
||||
@@ -160,6 +161,10 @@ public final class TinyRemapperHelper {
|
||||
final int fromId = mappings.getNamespaceId(from);
|
||||
final int toId = mappings.getNamespaceId(to);
|
||||
|
||||
if (toId == MappingTreeView.NULL_NAMESPACE_ID) {
|
||||
System.out.println("Warning: Trying to remap to unknown namespace: " + to);
|
||||
}
|
||||
|
||||
for (MappingTree.ClassMapping classDef : mappings.getClasses()) {
|
||||
String className = classDef.getName(fromId);
|
||||
String dstName = classDef.getName(toId);
|
||||
|
||||
Reference in New Issue
Block a user