-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd19228
commit 64490f1
Showing
90 changed files
with
733 additions
and
375 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
Common/src/main/java/customskinloader/fake/itf/FakeInterfaceManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 2 additions & 97 deletions
99
Fabric/src/main/java/customskinloader/fabric/MixinConfigPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,11 @@ | ||
package customskinloader.fabric; | ||
|
||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.net.URL; | ||
import java.nio.file.Paths; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import com.google.gson.JsonObject; | ||
import com.google.gson.JsonParser; | ||
import customskinloader.log.LogManager; | ||
import customskinloader.log.Logger; | ||
import org.objectweb.asm.tree.ClassNode; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
public class MixinConfigPlugin implements IMixinConfigPlugin { | ||
public static Logger logger = LogManager.getLogger("Fabric"); | ||
private long world_version; | ||
private long protocol_version; | ||
|
||
public class MixinConfigPlugin extends customskinloader.mixin.core.MixinConfigPlugin { | ||
@Override | ||
public void onLoad(String mixinPackage) { | ||
LogManager.setLogFile(Paths.get("./CustomSkinLoader/CustomSkinLoader.log")); | ||
URL versionJson = this.getClass().getResource("/version.json"); | ||
if (versionJson != null) { | ||
logger.info("\"version.json\": " + versionJson.toString()); | ||
try ( | ||
InputStream is = versionJson.openStream(); | ||
InputStreamReader isr = new InputStreamReader(is) | ||
) { | ||
JsonObject object = new JsonParser().parse(isr).getAsJsonObject(); | ||
String name = object.get("name").getAsString(); | ||
this.world_version = object.get("world_version").getAsLong(); | ||
this.protocol_version = object.get("protocol_version").getAsLong(); | ||
logger.info("MinecraftVersion: {name='" + name + "', world_version='" + this.world_version + "', protocol_version='" + this.protocol_version + "'}"); | ||
} catch (Throwable t) { | ||
logger.warning("An exception occurred when reading \"version.json\"!"); | ||
logger.warning(t); | ||
} | ||
} else { | ||
logger.warning("Can't read \"version.json\"! Ignore this message if the version you start is earlier than 18w47b."); | ||
} | ||
super.onLoad(mixinPackage); | ||
|
||
// This mod will remap extra classes when in the development environment. | ||
DevEnvRemapper.initRemapper(); | ||
} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { | ||
boolean result = true; | ||
if (mixinClassName.endsWith(".MixinIImageBuffer")) { | ||
result = this.world_version <= 2204 && this.protocol_version <= 553; // 18w43b ~ 19w37a | ||
} else if (mixinClassName.endsWith(".MixinLayerCape") || mixinClassName.endsWith(".MixinRenderPlayer")) { | ||
result = this.world_version >= 2210 && this.protocol_version >= 558; // 19w41a+ | ||
} else if (mixinClassName.endsWith(".MixinSkinManager$V1")) { | ||
result = this.world_version <= 3465 && (this.protocol_version <= 763 || (this.protocol_version >= 801 && this.protocol_version <= 803) || (this.protocol_version >= 0x40000001 && this.protocol_version <= 0x4000008E)); // 18w43b ~ 1.20.1 | ||
} else if (mixinClassName.endsWith(".MixinSkinManager$V2") || mixinClassName.endsWith(".MixinSkinManager$1") || mixinClassName.endsWith(".MixinSkinManager$CacheKey") || mixinClassName.endsWith(".MixinSkinManager$TextureCache")) { | ||
result = this.world_version >= 3567 && ((this.protocol_version >= 764 && this.protocol_version < 801) || (this.protocol_version > 803 && this.protocol_version < 0x40000001) || this.protocol_version >= 0x40000090); // 23w31a+ | ||
} else if (mixinClassName.endsWith(".MixinSkinManager$V3")) { | ||
result = this.world_version >= 3684 && ((this.protocol_version >= 765 && this.protocol_version < 801) || (this.protocol_version > 803 && this.protocol_version < 0x40000001) || this.protocol_version >= 0x4000009D); // 23w42a+ | ||
} else if (mixinClassName.endsWith(".MixinThreadDownloadImageData$V1")) { | ||
result = (this.world_version >= 2205 && this.world_version <= 2722) && ((this.protocol_version >= 554 && this.protocol_version <= 754) || (this.protocol_version >= 801 && this.protocol_version <= 803) || (this.protocol_version >= 0x40000001 && this.protocol_version <= 0x40000022)); // 19w38a ~ 1.17-rc1 | ||
} else if (mixinClassName.endsWith(".MixinThreadDownloadImageData$V2")) { | ||
result = this.world_version >= 2723 && ((this.protocol_version >= 755 && this.protocol_version < 801) || (this.protocol_version > 803 && this.protocol_version < 0x40000001) || this.protocol_version >= 0x40000023); // 1.17-rc2+ | ||
} | ||
logger.info("target: " + targetClassName + ", mixin: " + mixinClassName + ", result: " + result); | ||
return result; | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) { | ||
|
||
} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
|
||
} | ||
|
||
@Override | ||
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
|
||
} | ||
|
||
// To be compatible with 0.7.11 | ||
public void preApply(String targetClassName, org.spongepowered.asm.lib.tree.ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
|
||
} | ||
|
||
// To be compatible with 0.7.11 | ||
public void postApply(String targetClassName, org.spongepowered.asm.lib.tree.ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
accessWidener v2 intermediary | ||
accessible method net/minecraft/class_2960 <init> (Ljava/lang/String;Ljava/lang/String;)V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
{ | ||
"compatibilityLevel": "JAVA_8", | ||
"mixinPriority": 1010, | ||
"package": "customskinloader.mixin", | ||
"client": [ | ||
"MixinGuiPlayerTabOverlay", | ||
"MixinIImageBuffer", | ||
"MixinIResource", | ||
"MixinIResourceManager", | ||
"MixinLayerCape", | ||
"MixinMinecraft", | ||
"MixinRenderPlayer", | ||
"MixinSkinManager$1", | ||
"MixinSkinManager$CacheKey", | ||
"MixinSkinManager$TextureCache", | ||
"MixinSkinManager$V1", | ||
"MixinSkinManager$V2", | ||
"MixinSkinManager$V3", | ||
"MixinThreadDownloadImageData$V1", | ||
"MixinThreadDownloadImageData$V2" | ||
], | ||
"refmap": "mixins.customskinloader.refmap.json", | ||
"plugin": "customskinloader.fabric.MixinConfigPlugin", | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
"compatibilityLevel": "JAVA_8", | ||
"mixinPriority": 1010, | ||
"package": "customskinloader.mixin", | ||
"client": [ | ||
"MixinGuiPlayerTabOverlay", | ||
"MixinIImageBuffer", | ||
"MixinIResource", | ||
"MixinIResourceManager", | ||
"MixinLayerCape", | ||
"MixinMinecraft", | ||
"MixinRenderPlayer", | ||
"MixinSkinManager$1", | ||
"MixinSkinManager$CacheKey", | ||
"MixinSkinManager$TextureCache", | ||
"MixinSkinManager$V1", | ||
"MixinSkinManager$V2", | ||
"MixinSkinManager$V3", | ||
"MixinThreadDownloadImageData$V1", | ||
"MixinThreadDownloadImageData$V2" | ||
], | ||
"refmap": "mixins.customskinloader.refmap.json", | ||
"plugin": "customskinloader.fabric.MixinConfigPlugin", | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
Forge/Common/src/main/java/cpw/mods/cl/JarModuleFinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cpw.mods.cl; | ||
|
||
import java.lang.module.ModuleFinder; | ||
|
||
import cpw.mods.jarhandling.SecureJar; | ||
|
||
public class JarModuleFinder implements ModuleFinder { | ||
public static JarModuleFinder of(SecureJar... jars) { | ||
return null; | ||
} | ||
|
||
public static class JarModuleReference { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Forge/Common/src/main/java/cpw/mods/jarhandling/SecureJar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package cpw.mods.jarhandling; | ||
|
||
import java.nio.file.Path; | ||
|
||
public interface SecureJar { | ||
static SecureJar from(final Path... paths) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package java.lang; | ||
|
||
import java.lang.module.Configuration; | ||
|
||
public class ModuleLayer { | ||
public static ModuleLayer boot() { | ||
return null; | ||
} | ||
|
||
public Configuration configuration() { | ||
return null; | ||
} | ||
} |
Oops, something went wrong.