mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
[BugFix] Wrong parameter in MappingData, and Vanilla not load
This commit is contained in:
1 parent
66fcce19b5
commit
d3d52afa61
3 files changed
+9
-3
No files matched your search
@@ -1,4 +1,6 @@
|
||||
package cn.xiaozhou233.orangex;
|
||||
import cn.xiaozhou233.orangex.mapping.MappingData;
|
||||
import cn.xiaozhou233.orangex.mapping.MappingReader;
|
||||
import cn.xiaozhou233.orangex.runtime.RuntimeInfo;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -9,6 +11,7 @@ public class OrangeX {
|
||||
@Setter
|
||||
private RuntimeInfo runtime = null;
|
||||
public static final OrangeX INSTANCE = new OrangeX();
|
||||
MappingData mappingData;
|
||||
|
||||
private final EventBus eventBus = EventBus.builder()
|
||||
.logNoSubscriberMessages(false)
|
||||
@@ -23,6 +26,8 @@ public class OrangeX {
|
||||
if(runtime==null) {
|
||||
throw new RuntimeException("Runtime not set.");
|
||||
}
|
||||
mappingData = MappingReader.getInstance().load(runtime.getLoaderType(), runtime.getMinecraftVersion());
|
||||
|
||||
System.out.println("OrangeX started.");
|
||||
}
|
||||
|
||||
|
||||
@@ -27,17 +27,17 @@ public class MappingData {
|
||||
|
||||
// Add
|
||||
|
||||
public void addClass(String readable, String obfuscated) {
|
||||
public void addClass(String obfuscated, String readable) {
|
||||
className.put(readable, obfuscated);
|
||||
classNameReversed.put(obfuscated, readable);
|
||||
}
|
||||
|
||||
public void addMethod(String readable, String obfuscated) {
|
||||
public void addMethod(String obfuscated, String readable) {
|
||||
methodName.put(readable, obfuscated);
|
||||
methodNameReversed.put(obfuscated, readable);
|
||||
}
|
||||
|
||||
public void addField(String readable, String obfuscated) {
|
||||
public void addField(String obfuscated, String readable) {
|
||||
fieldName.put(readable, obfuscated);
|
||||
fieldNameReversed.put(obfuscated, readable);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ public final class MappingReader {
|
||||
private String switchLoaderDir(LoaderType loaderType) {
|
||||
switch (loaderType) {
|
||||
case VANILLA:
|
||||
return "vanilla";
|
||||
case MCP:
|
||||
return null;
|
||||
case FORGE:
|
||||
|
||||
Reference in new issue
Block a user