mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-18 05:45:00 +00:00
Support Forge 1.16.x. (#97)
* Support Forge 1.16.x. * Add Minecraft versions.
This commit is contained in:
1 parent
82c2e80e76
commit
8b1400ef0d
5 files changed
+14
-17
No files matched your search
@@ -1,5 +1,5 @@
|
||||
minecraft_version=1.14
|
||||
minecraft_full_versions=1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2
|
||||
minecraft_full_versions=1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2,1.16,1.16.1
|
||||
#forge gradle needs forge version
|
||||
forge_mc_version=1.12.2
|
||||
forge_version=14.23.5.2768
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
minecraft_version=1.12.2
|
||||
minecraft_full_versions=1.8,1.8.8,1.8.9,1.9,1.9.4,1.10,1.10.2,1.11,1.11.2,1.12,1.12.1,1.12.2,1.13.2,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2
|
||||
minecraft_full_versions=1.8,1.8.8,1.8.9,1.9,1.9.4,1.10,1.10.2,1.11,1.11.2,1.12,1.12.1,1.12.2,1.13.2,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2,1.16.1
|
||||
#forge gradle needs forge version
|
||||
forge_mc_version=1.12.2
|
||||
forge_version=14.23.5.2768
|
||||
|
||||
@@ -6,19 +6,6 @@ var VarInsnNode = Java.type('org.objectweb.asm.tree.VarInsnNode');
|
||||
|
||||
var Opcodes = Java.type('org.objectweb.asm.Opcodes');
|
||||
|
||||
function PlayerTabTransformer(cn, mn) {
|
||||
var iterator = mn.instructions.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
var node = iterator.next();
|
||||
if (node instanceof VarInsnNode) {
|
||||
var varNode = node;
|
||||
if (varNode.getOpcode() === Opcodes.ISTORE && varNode.var === 11) {
|
||||
mn.instructions.set(varNode.getPrevious(), new InsnNode(Opcodes.ICONST_1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initializeCoreMod() {
|
||||
return {
|
||||
'PlayerTabTransformer': {
|
||||
@@ -30,8 +17,15 @@ function initializeCoreMod() {
|
||||
},
|
||||
'transformer': function (cn) {
|
||||
cn.methods.forEach(function (mn) {
|
||||
if (mn.name === 'func_175249_a')
|
||||
PlayerTabTransformer(cn, mn);
|
||||
if (mn.name === 'func_175249_a' || mn.name === 'func_238523_a_') {
|
||||
for (var iterator = mn.instructions.iterator(); iterator.hasNext();) {
|
||||
var node = iterator.next();
|
||||
if (node.getOpcode() === Opcodes.INVOKEVIRTUAL && node.name === "func_71387_A") {
|
||||
mn.instructions.insertBefore(node, new InsnNode(Opcodes.POP));
|
||||
mn.instructions.set(node, new InsnNode(Opcodes.ICONST_1));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return cn;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraftforge.fml.common.event.FMLFingerprintViolationEvent;
|
||||
version = "@MOD_FULL_VERSION@",
|
||||
clientSideOnly = true,
|
||||
acceptedMinecraftVersions = "[1.8,)",
|
||||
acceptableRemoteVersions = "*",
|
||||
certificateFingerprint = "52885f395e68f42e9b3b629ba56ecf606f7d4269"
|
||||
)//1.13-
|
||||
public class ForgeMod {
|
||||
|
||||
@@ -22,6 +22,8 @@ public @interface Mod {
|
||||
|
||||
String acceptedMinecraftVersions() default "";
|
||||
|
||||
String acceptableRemoteVersions() default "";
|
||||
|
||||
String certificateFingerprint() default "";
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
Reference in new issue
Block a user