Jump to content

[1.7.10] Problem patching ServerConfigurationManager.


Flegyas

Recommended Posts

Hello there!

I'm trying to patch the method "allowUserToConnect" of the class "net.minecraft.server.management.ServerConfigurationManager". I'm adding a new level of authentication, in this way:

This is the original method:

/**
     * checks ban-lists, then white-lists, then space for the server. Returns null on success, or an error message
     */
    public String allowUserToConnect(SocketAddress p_148542_1_, GameProfile p_148542_2_)
    {
        String s;

        if (this.bannedPlayers.func_152702_a(p_148542_2_))
        {
            UserListBansEntry userlistbansentry = (UserListBansEntry)this.bannedPlayers.func_152683_b(p_148542_2_);
            s = "You are banned from this server!\nReason: " + userlistbansentry.getBanReason();

            if (userlistbansentry.getBanEndDate() != null)
            {
                s = s + "\nYour ban will be removed on " + dateFormat.format(userlistbansentry.getBanEndDate());
            }

            return s;
        }
        else if (!this.func_152607_e(p_148542_2_))
        {
            return "You are not white-listed on this server!";
        }
        else if (this.bannedIPs.func_152708_a(p_148542_1_))
        {
            IPBanEntry ipbanentry = this.bannedIPs.func_152709_b(p_148542_1_);
            s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getBanReason();

            if (ipbanentry.getBanEndDate() != null)
            {
                s = s + "\nYour ban will be removed on " + dateFormat.format(ipbanentry.getBanEndDate());
            }

            return s;
        }
        else
        {
            return this.playerEntityList.size() >= this.maxPlayers ? "The server is full!" : null;
        }
    } 

 

This is the modified:

	/**
 * checks ban-lists, then white-lists, then space for the server. Returns null on success, or an error message
 */
public String allowUserToConnect(SocketAddress p_148542_1_, GameProfile p_148542_2_) {
	String s;

	if (this.bannedPlayers.func_152702_a(p_148542_2_)) {
		UserListBansEntry userlistbansentry = (UserListBansEntry) this.bannedPlayers.func_152683_b(p_148542_2_);
		s = "You are banned from this server!\nReason: " + userlistbansentry.getBanReason();

		if (userlistbansentry.getBanEndDate() != null) {
			s = s + "\nYour ban will be removed on " + dateFormat.format(userlistbansentry.getBanEndDate());
		}

		return s;
	} else if (!this.func_152607_e(p_148542_2_)) {
		return "You are not white-listed on this server!";
	} else if (this.bannedIPs.func_152708_a(p_148542_1_)) {
		IPBanEntry ipbanentry = this.bannedIPs.func_152709_b(p_148542_1_);
		s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getBanReason();

		if (ipbanentry.getBanEndDate() != null) {
			s = s + "\nYour ban will be removed on " + dateFormat.format(ipbanentry.getBanEndDate());
		}

		return s;
	} 
                /* Here my changes.
                else if (AuthManager.requestLogin(p_148542_2_).getStatus() != AuthRequestStatus.CORRECT)
		return "Login not allowed!";
                */
	else
		return this.playerEntityList.size() >= this.maxPlayers ? "The server is full!" : null;
} 

 

This is the not obfuscated method and it's working fine in the dev environment (it gets patched perfectly), the problems come with the obfuscated one, of the class "oi".

When my IClassTransformer is called, the oi.class is correctly recognized and his patching method is called but when it's called because of a player login, it seems that it hasn't received the patch, no matter what instruction I patch, it seems the vanilla one.

 

Have you any ideas about this problem?

Link to comment
Share on other sites

The Transformer:

public class PNClassTransformer implements IClassTransformer {

@Override
public byte[] transform(String vanillaClassName, String customClassName, byte[] bytecodeChunk) {
	if (vanillaClassName.equals("jw")) {
		bytecodeChunk = new C00PacketLoginStartPatcher().patch(bytecodeChunk, true);
	} else if (vanillaClassName.equals("net.minecraft.network.login.client.C00PacketLoginStart")) {
		bytecodeChunk = new C00PacketLoginStartPatcher().patch(bytecodeChunk, false);
	} else if (vanillaClassName.equals("oi")) {
		bytecodeChunk = new ServerConfigurationManagerPatcher().patch(bytecodeChunk, true);
	} else if (vanillaClassName.equals("net.minecraft.server.management.ServerConfigurationManager")) {
		bytecodeChunk = new ServerConfigurationManagerPatcher().patch(bytecodeChunk, false);
	}

	return bytecodeChunk;
}

} 

 

ServerConfigurationManagerPatcher:

 public class ServerConfigurationManagerPatcher extends Patcher {

protected void patchNotObfuscated(ClassNode classNode) {
	for (MethodNode method : classNode.methods) {
		String methodName = method.name;
		if (methodName.equals("allowUserToConnect")) {
			method.instructions.clear();
			method.localVariables.clear();
			method.visitCode();
			Label l0 = new Label();
			method.visitLabel(l0);
			method.visitLineNumber(324, l0);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/server/management/ServerConfigurationManager", "bannedPlayers", "Lnet/minecraft/server/management/UserListBans;");
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/UserListBans", "func_152702_a", "(Lcom/mojang/authlib/GameProfile;)Z", false);
			Label l1 = new Label();
			method.visitJumpInsn(Opcodes.IFEQ, l1);
			Label l2 = new Label();
			method.visitLabel(l2);
			method.visitLineNumber(325, l2);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/server/management/ServerConfigurationManager", "bannedPlayers", "Lnet/minecraft/server/management/UserListBans;");
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/UserListBans", "func_152683_b", "(Ljava/lang/Object;)Lnet/minecraft/server/management/UserListEntry;", false);
			method.visitTypeInsn(Opcodes.CHECKCAST, "net/minecraft/server/management/UserListBansEntry");
			method.visitVarInsn(Opcodes.ASTORE, 4);
			Label l3 = new Label();
			method.visitLabel(l3);
			method.visitLineNumber(326, l3);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitLdcInsn("You are banned from this server!\nReason: ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/UserListBansEntry", "getBanReason", "()Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			Label l4 = new Label();
			method.visitLabel(l4);
			method.visitLineNumber(328, l4);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/UserListBansEntry", "getBanEndDate", "()Ljava/util/Date;", false);
			Label l5 = new Label();
			method.visitJumpInsn(Opcodes.IFNULL, l5);
			Label l6 = new Label();
			method.visitLabel(l6);
			method.visitLineNumber(329, l6);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitLdcInsn("\nYour ban will be removed on ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitFieldInsn(Opcodes.GETSTATIC, "net/minecraft/server/management/ServerConfigurationManager", "dateFormat", "Ljava/text/SimpleDateFormat;");
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/UserListBansEntry", "getBanEndDate", "()Ljava/util/Date;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/text/SimpleDateFormat", "format", "(Ljava/util/Date;)Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			method.visitLabel(l5);
			method.visitLineNumber(332, l5);
			method.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/String", "net/minecraft/server/management/UserListBansEntry"}, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l1);
			method.visitLineNumber(333, l1);
			method.visitFrame(Opcodes.F_CHOP, 2, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/ServerConfigurationManager", "func_152607_e", "(Lcom/mojang/authlib/GameProfile;)Z", false);
			Label l7 = new Label();
			method.visitJumpInsn(Opcodes.IFNE, l7);
			Label l8 = new Label();
			method.visitLabel(l8);
			method.visitLineNumber(334, l8);
			method.visitLdcInsn("You are not white-listed on this server!");
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l7);
			method.visitLineNumber(335, l7);
			method.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/server/management/ServerConfigurationManager", "bannedIPs", "Lnet/minecraft/server/management/BanList;");
			method.visitVarInsn(Opcodes.ALOAD, 1);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/BanList", "func_152708_a", "(Ljava/net/SocketAddress;)Z", false);
			Label l9 = new Label();
			method.visitJumpInsn(Opcodes.IFEQ, l9);
			Label l10 = new Label();
			method.visitLabel(l10);
			method.visitLineNumber(336, l10);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/server/management/ServerConfigurationManager", "bannedIPs", "Lnet/minecraft/server/management/BanList;");
			method.visitVarInsn(Opcodes.ALOAD, 1);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/BanList", "func_152709_b", "(Ljava/net/SocketAddress;)Lnet/minecraft/server/management/IPBanEntry;", false);
			method.visitVarInsn(Opcodes.ASTORE, 4);
			Label l11 = new Label();
			method.visitLabel(l11);
			method.visitLineNumber(337, l11);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitLdcInsn("Your IP address is banned from this server!\nReason: ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/IPBanEntry", "getBanReason", "()Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			Label l12 = new Label();
			method.visitLabel(l12);
			method.visitLineNumber(339, l12);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/IPBanEntry", "getBanEndDate", "()Ljava/util/Date;", false);
			Label l13 = new Label();
			method.visitJumpInsn(Opcodes.IFNULL, l13);
			Label l14 = new Label();
			method.visitLabel(l14);
			method.visitLineNumber(340, l14);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitLdcInsn("\nYour ban will be removed on ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitFieldInsn(Opcodes.GETSTATIC, "net/minecraft/server/management/ServerConfigurationManager", "dateFormat", "Ljava/text/SimpleDateFormat;");
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "net/minecraft/server/management/IPBanEntry", "getBanEndDate", "()Ljava/util/Date;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/text/SimpleDateFormat", "format", "(Ljava/util/Date;)Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			method.visitLabel(l13);
			method.visitLineNumber(343, l13);
			method.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/String", "net/minecraft/server/management/IPBanEntry"}, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l9);
			method.visitLineNumber(344, l9);
			method.visitFrame(Opcodes.F_CHOP, 2, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKESTATIC, "pnmod/test/skills/server/authentication/AuthManager", "requestLogin", "(Lcom/mojang/authlib/GameProfile;)Lpnmod/test/skills/server/authentication/AuthResponse;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "pnmod/test/skills/server/authentication/AuthResponse", "getStatus", "()Lpnmod/test/skills/server/authentication/AuthRequestStatus;", false);
			method.visitFieldInsn(Opcodes.GETSTATIC, "pnmod/test/skills/server/authentication/AuthRequestStatus", "CORRECT", "Lpnmod/test/skills/server/authentication/AuthRequestStatus;");
			Label l15 = new Label();
			method.visitJumpInsn(Opcodes.IF_ACMPEQ, l15);
			Label l16 = new Label();
			method.visitLabel(l16);
			method.visitLineNumber(345, l16);
			method.visitLdcInsn("Login not allowed!");
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l15);
			method.visitLineNumber(347, l15);
			method.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/server/management/ServerConfigurationManager", "playerEntityList", "Ljava/util/List;");
			method.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I", true);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/server/management/ServerConfigurationManager", "maxPlayers", "I");
			Label l17 = new Label();
			method.visitJumpInsn(Opcodes.IF_ICMPLT, l17);
			method.visitLdcInsn("The server is full!");
			Label l18 = new Label();
			method.visitJumpInsn(Opcodes.GOTO, l18);
			method.visitLabel(l17);
			method.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
			method.visitInsn(Opcodes.ACONST_NULL);
			method.visitLabel(l18);
			method.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/String"});
			method.visitInsn(Opcodes.ARETURN);
			Label l19 = new Label();
			method.visitLabel(l19);
			method.visitLocalVariable("userlistbansentry", "Lnet/minecraft/server/management/UserListBansEntry;", null, l3, l1, 4);
			method.visitLocalVariable("s", "Ljava/lang/String;", null, l4, l1, 3);
			method.visitLocalVariable("ipbanentry", "Lnet/minecraft/server/management/IPBanEntry;", null, l11, l9, 4);
			method.visitLocalVariable("s", "Ljava/lang/String;", null, l12, l9, 3);
			method.visitLocalVariable("this", "Lnet/minecraft/server/management/ServerConfigurationManager;", null, l0, l19, 0);
			method.visitLocalVariable("p_148542_1_", "Ljava/net/SocketAddress;", null, l0, l19, 1);
			method.visitLocalVariable("p_148542_2_", "Lcom/mojang/authlib/GameProfile;", null, l0, l19, 2);
			method.visitMaxs(3, 5);
			method.visitEnd();
		}
	}
}

protected void patchObfuscated(ClassNode classNode) {
	for (MethodNode method : classNode.methods) {
		String methodName = method.name;
		if (methodName.equals("a") && method.desc.equals("(Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Ljava/lang/String;")) {
			method.instructions.clear();
			method.localVariables.clear();
			method.visitCode();
			Label l0 = new Label();
			method.visitLabel(l0);
			method.visitLineNumber(24, l0);
			method.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;");
			method.visitLdcInsn("*********** METHOD CALLED **********");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false);
			Label l1 = new Label();
			method.visitLabel(l1);
			method.visitLineNumber(26, l1);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "oi", "j", "Lop;");
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "op", "a", "(Lcom/mojang/authlib/GameProfile;)Z", false);
			Label l2 = new Label();
			method.visitJumpInsn(Opcodes.IFEQ, l2);
			Label l3 = new Label();
			method.visitLabel(l3);
			method.visitLineNumber(27, l3);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "oi", "j", "Lop;");
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "op", "b", "(Ljava/lang/Object;)Lol;", false);
			method.visitTypeInsn(Opcodes.CHECKCAST, "oq");
			method.visitVarInsn(Opcodes.ASTORE, 4);
			Label l4 = new Label();
			method.visitLabel(l4);
			method.visitLineNumber(28, l4);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitLdcInsn("You are banned from this server!\nReason: ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "oq", "d", "()Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			Label l5 = new Label();
			method.visitLabel(l5);
			method.visitLineNumber(29, l5);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "oq", "c", "()Ljava/util/Date;", false);
			Label l6 = new Label();
			method.visitJumpInsn(Opcodes.IFNULL, l6);
			Label l7 = new Label();
			method.visitLabel(l7);
			method.visitLineNumber(30, l7);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitLdcInsn("\nYour ban will be removed on ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitFieldInsn(Opcodes.GETSTATIC, "oi", "h", "Ljava/text/SimpleDateFormat;");
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "oq", "c", "()Ljava/util/Date;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/text/SimpleDateFormat", "format", "(Ljava/util/Date;)Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			method.visitLabel(l6);
			method.visitLineNumber(33, l6);
			method.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/String", "oq"}, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l2);
			method.visitLineNumber(34, l2);
			method.visitFrame(Opcodes.F_CHOP, 2, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "oi", "e", "(Lcom/mojang/authlib/GameProfile;)Z", false);
			Label l8 = new Label();
			method.visitJumpInsn(Opcodes.IFNE, l8);
			Label l9 = new Label();
			method.visitLabel(l9);
			method.visitLineNumber(35, l9);
			method.visitLdcInsn("You are not white-listed on this server!");
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l8);
			method.visitLineNumber(36, l8);
			method.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "oi", "k", "Lnx;");
			method.visitVarInsn(Opcodes.ALOAD, 1);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "nx", "a", "(Ljava/net/SocketAddress;)Z", false);
			Label l10 = new Label();
			method.visitJumpInsn(Opcodes.IFEQ, l10);
			Label l11 = new Label();
			method.visitLabel(l11);
			method.visitLineNumber(37, l11);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "oi", "k", "Lnx;");
			method.visitVarInsn(Opcodes.ALOAD, 1);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "nx", "b", "(Ljava/net/SocketAddress;)Lny;", false);
			method.visitVarInsn(Opcodes.ASTORE, 4);
			Label l12 = new Label();
			method.visitLabel(l12);
			method.visitLineNumber(38, l12);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitLdcInsn("Your IP address is banned from this server!\nReason: ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "ny", "d", "()Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			Label l13 = new Label();
			method.visitLabel(l13);
			method.visitLineNumber(39, l13);
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "ny", "c", "()Ljava/util/Date;", false);
			Label l14 = new Label();
			method.visitJumpInsn(Opcodes.IFNULL, l14);
			Label l15 = new Label();
			method.visitLabel(l15);
			method.visitLineNumber(40, l15);
			method.visitTypeInsn(Opcodes.NEW, "java/lang/StringBuilder");
			method.visitInsn(Opcodes.DUP);
			method.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitLdcInsn("\nYour ban will be removed on ");
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitFieldInsn(Opcodes.GETSTATIC, "oi", "h", "Ljava/text/SimpleDateFormat;");
			method.visitVarInsn(Opcodes.ALOAD, 4);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "ny", "c", "()Ljava/util/Date;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/text/SimpleDateFormat", "format", "(Ljava/util/Date;)Ljava/lang/String;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
			method.visitVarInsn(Opcodes.ASTORE, 3);
			method.visitLabel(l14);
			method.visitLineNumber(43, l14);
			method.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/String", "ny"}, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 3);
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l10);
			method.visitLineNumber(44, l10);
			method.visitFrame(Opcodes.F_CHOP, 2, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 2);
			method.visitMethodInsn(Opcodes.INVOKESTATIC, "pnmod/test/skills/server/authentication/AuthManager", "requestLogin", "(Lcom/mojang/authlib/GameProfile;)Lpnmod/test/skills/server/authentication/AuthResponse;", false);
			method.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "pnmod/test/skills/server/authentication/AuthResponse", "getStatus", "()Lpnmod/test/skills/server/authentication/AuthRequestStatus;", false);
			method.visitFieldInsn(Opcodes.GETSTATIC, "pnmod/test/skills/server/authentication/AuthRequestStatus", "CORRECT", "Lpnmod/test/skills/server/authentication/AuthRequestStatus;");
			Label l16 = new Label();
			method.visitJumpInsn(Opcodes.IF_ACMPEQ, l16);
			Label l17 = new Label();
			method.visitLabel(l17);
			method.visitLineNumber(45, l17);
			method.visitLdcInsn("Login not allowed!");
			method.visitInsn(Opcodes.ARETURN);
			method.visitLabel(l16);
			method.visitLineNumber(47, l16);
			method.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "oi", "e", "Ljava/util/List;");
			method.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I", true);
			method.visitVarInsn(Opcodes.ALOAD, 0);
			method.visitFieldInsn(Opcodes.GETFIELD, "oi", "f", "I");
			Label l18 = new Label();
			method.visitJumpInsn(Opcodes.IF_ICMPLT, l18);
			method.visitLdcInsn("The server is full!");
			Label l19 = new Label();
			method.visitJumpInsn(Opcodes.GOTO, l19);
			method.visitLabel(l18);
			method.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
			method.visitInsn(Opcodes.ACONST_NULL);
			method.visitLabel(l19);
			method.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/String"});
			method.visitInsn(Opcodes.ARETURN);
			Label l20 = new Label();
			method.visitLabel(l20);
			method.visitLocalVariable("var5", "Loq;", null, l4, l2, 4);
			method.visitLocalVariable("var4", "Ljava/lang/String;", null, l5, l2, 3);
			method.visitLocalVariable("var3", "Lny;", null, l12, l10, 4);
			method.visitLocalVariable("var4", "Ljava/lang/String;", null, l13, l10, 3);
			method.visitLocalVariable("this", "Loi;", null, l0, l20, 0);
			method.visitLocalVariable("var1", "Ljava/net/SocketAddress;", null, l0, l20, 1);
			method.visitLocalVariable("var2", "Lcom/mojang/authlib/GameProfile;", null, l0, l20, 2);
			method.visitMaxs(3, 5);
			method.visitEnd();
		}
	}
}
}

 

Patcher:

 public abstract class Patcher {

public final byte[] patch(byte[] bytecodeChunk, boolean obfuscated) {
	ClassNode classNode = new ClassNode();
	ClassReader reader = new ClassReader(bytecodeChunk);
	reader.accept(classNode, ClassReader.EXPAND_FRAMES);

	if (obfuscated)
		patchObfuscated(classNode);
	else patchNotObfuscated(classNode);

	ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
	classNode.accept(cw);
	return cw.toByteArray();
}

protected abstract void patchObfuscated(ClassNode classNode);

protected abstract void patchNotObfuscated(ClassNode classNode);
}

Link to comment
Share on other sites

No... no no no. Don't just clear the entire method... that defeats the purpose of coremods.

The patch you need (the additional if statement) is like 2 bytecodes... inject them into the existing code.

I didn't know how to inject only a part of the method so I recreated the class and added the code, then I took the ASM instructions and replaced all (I thought it would be the same result). Ok, now I'll find how to inject only a few instructions.

 

Also the parameter names for your transform method are not quite correct, and checking for the mojang names is not needed.

Can you explain this?

Link to comment
Share on other sites

You should not ever have to deal with the completely obfuscated names, even methods and fields are deobfuscated to func_xxx at runtime.

So, why in the ServerConfigurationManager.patchObfuscated(...) 

methodName.equals("a") && method.desc.equals("(Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Ljava/lang/String;")

has true value?

Is it called before the FML deobfuscation? Could it be the problem?

Link to comment
Share on other sites

  • 2 weeks later...

Okay, I tried in this way:

 

ServerConfigurationManagerPatcher:

package pnmod.test.skills.asm.patchers;

import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.*;

public class ServerConfigurationManagerPatcher extends Patcher {

protected void patchNotObfuscated(ClassNode classNode) {
	for (MethodNode method : classNode.methods) {
		String methodName = method.name;
		if (methodName.equals("allowUserToConnect")) {
			InsnList injectList = new InsnList();
			LabelNode l42 = new LabelNode();
			injectList.add(l42);
			injectList.add(new LineNumberNode(14, l42));
			injectList.add(new FieldInsnNode(Opcodes.GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"));
			injectList.add(new LdcInsnNode("********** IT'S WORKING **********"));
			injectList.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false));

			method.instructions.insert(injectList);

			/*
			InsnList needle = new InsnList();
			needle.add(new FrameNode(Opcodes.F_APPEND, 2, new Object[]{"java/lang/String", "net/minecraft/server/management/IPBanEntry"}, 0, null));
			needle.add(new VarInsnNode(Opcodes.ALOAD, 3));
			needle.add(new InsnNode(Opcodes.ARETURN));
			LabelNode l9 = new LabelNode();
			needle.add(l9);
			needle.add(new LineNumberNode(401, l9));


			AbstractInsnNode insertPoint = ASMHelper.findLastNodeFromNeedle(method.instructions, needle);

			InsnList injectList = new InsnList();
			injectList.add(new FrameNode(Opcodes.F_CHOP, 2, null, 0, null));
			injectList.add(new VarInsnNode(Opcodes.ALOAD, 2));
			injectList.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "pnmod/test/skills/server/authentication/AuthManager", "requestLogin", "(Lcom/mojang/authlib/GameProfile;)Lpnmod/test/skills/server/authentication/AuthResponse;", false));
			injectList.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "pnmod/test/skills/server/authentication/AuthResponse", "getStatus", "()Lpnmod/test/skills/server/authentication/AuthRequestStatus;", false));
			injectList.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "pnmod/test/skills/server/authentication/AuthRequestStatus", "isCorrect", "()Z", false));


			LabelNode l15 = new LabelNode();
			injectList.add(new JumpInsnNode(Opcodes.IFNE, l15));
			LabelNode l16 = new LabelNode();
			injectList.add(l16);
			injectList.add(new LdcInsnNode("Phoenix Network Authenticator: login not allowed!"));
			injectList.add(new InsnNode(Opcodes.ARETURN));

			method.instructions.insert(insertPoint, injectList);
			*/
		}
	}
}

protected void patchObfuscated(ClassNode classNode) {
	for (MethodNode method : classNode.methods) {
		String methodName = method.name;
		if (methodName.equals("a") && method.desc.equals("(Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Ljava/lang/String;")) {
			InsnList injectList = new InsnList();
			LabelNode l42 = new LabelNode();
			injectList.add(l42);
			injectList.add(new LineNumberNode(14, l42));
			injectList.add(new FieldInsnNode(Opcodes.GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"));
			injectList.add(new LdcInsnNode("********** IT'S WORKING **********"));
			injectList.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false));

			method.instructions.insert(injectList);
		}
	}
}
}

 

I'm just adding a print to see if the method gets the changes but again it only works in a dev environment, nothing happens when builded.

Link to comment
Share on other sites

1. It's the one posted before (in the previous post).

2. I thought I had to patch both environments, I'll try keeping only "patchNotObfuscated" combined with @SortingIndex(1001).

3. I tried with that annotation, it tried to call the "patchNotObfuscated" method, meaning that it found the class "net.minecraft.server.management.ServerConfigurationManager" and not "oi" but where can I find the "func like" matches? I searched in notch-mcp.srg but I found:

oi/a (Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Ljava/lang/String; net/minecraft/server/management/ServerConfigurationManager/allowUserToConnect (Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Ljava/lang/String;

Link to comment
Share on other sites

This is the patch method now:

protected void patchNotObfuscated(ClassNode classNode) {
	for (MethodNode method : classNode.methods) {
		String methodName = method.name;
		if (methodName.equals("func_148542_a") || methodName.equals("allowUserToConnect")) {
			System.out.println("********** PATCHING METHOD! **********");
			InsnList injectList = new InsnList();
			LabelNode l42 = new LabelNode();
			injectList.add(l42);
			injectList.add(new LineNumberNode(14, l42));
			injectList.add(new FieldInsnNode(Opcodes.GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"));
			injectList.add(new LdcInsnNode("********** IT'S WORKING **********"));
			injectList.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false));

			method.instructions.insert(injectList);
		}
	}
}

I successfully get the print "********** PATCHING METHOD! **********" but still no changes on the server...  :-\

Link to comment
Share on other sites

I set a new server, downloaded a new jar etc to send you a clean stuff and... Now it seems to get called also outside the dev environment (I don't know how it is possible). However, I'm still a bit confused about how to patch the method correctly.

This time, I'm trying to find the right insert point for the instructions (using @SanAndreasP classes https://github.com/SanAndreasP/SAPManagerPack/tree/master/java/de/sanandrew/core/manpack/transformer, if you'll read this thank you man) but I didn't understand which method I'm going to modify when I add the SortingIndex annotation. Am I patching the deobfuscated class (with "func like" names for methods/fields etc) ? If yes, why do I get an error saying that this needle isn't contained in the method instructions set?

InsnList needle = new InsnList();
			needle.add(new FrameNode(Opcodes.F_APPEND, 2, new Object[]{"java/lang/String", "net/minecraft/server/management/IPBanEntry"}, 0, null));
			needle.add(new VarInsnNode(Opcodes.ALOAD, 3));
			needle.add(new InsnNode(Opcodes.ARETURN));
			LabelNode l9 = new LabelNode();
			needle.add(l9);
			needle.add(new LineNumberNode(401, l9));

			AbstractInsnNode insertPoint = ASMHelper.findLastNodeFromNeedle(method.instructions, needle);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • हथियार व्यापारियों की चमक आज के समय में भारत और दुनिया के विभिन्न हिस्सों में तेजी से बढ़ रही है। स्वीडन की स्थित संस्था सिपरी की नवीनतम रिपोर्ट के अनुसार, विश्व भर में विभिन्न देश अब पूर्व कभी नहीं देखे गए हथियारों और सैन्य सामग्रियों पर धन का व्यय कर रहे हैं। वैश्विक संघर्षों के बढ़ते संकेतों के कारण, विश्व के कई हिस्सों में युद्ध की संभावनाएं बढ़ रही हैं। पश्चिमी एशिया में युद्ध की आग फैल रही है, जबकि दक्षिण चीन सागर और ताइवान में भी तनाव बढ़ रहा है। भारत-चीन सीमा पर भी स्थिति चिंताजनक है। इन घटनाओं के परिणामस्वरूप, विभिन्न देशों की प्राथमिकताएं बदल रही हैं, और हथियार व्यापारियों का धंधा आजकल चमक उठा है। सिपरी की रिपोर्ट के अनुसार, 2023 में वैश्विक सैन्य खर्च एक नया रिकॉर्ड स्थापित किया गया है। 2022 की तुलना में, 2023 में सैन्य खर्च 6.8 फीसदी बढ़कर 24.4 ट्रिलियन डॉलर पर पहुंच गया। इसके पीछे कुछ विशेष कारण हैं, जिनमें दुनिया भर में तनाव बढ़ना और अद्यतित सैन्य तैयारियों की आवश्यकता शामिल है। इस वृद्धि में, भारत जैसे देशों का योगदान भी अधिक है। भारत ने भी अपने सैन्य खर्चों में वृद्धि की है, और यह दुनिया के सबसे बड़े और सबसे प्रभावशाली राष्ट्रों में एक बन गया है। इसके अलावा, अमेरिका, चीन, और रूस भी सैन्य खर्च में वृद्धि की हैं, जिससे विश्व सुरक्षा में नए दायरे खुले हैं। संभावनाओं के इस नए मंच पर, दुनिया के सक्षम देश अब अपने सैन्य तैयारियों में ज्यादा ध्यान दे रहे हैं। यह वृद्धि विकास और प्रगति के बजट पर भी प्रभाव डाल रही है, जिससे विभिन्न देशों के आर्थिक प्रगति में बदलाव आ सकता है।   https://www.nayaindia.com/editorial-column/editorial1/arms-sales-increased-in-the-world-454072.html
    • Hello, Hi and I am making a forge 1.12.2 mod and also trying to get a custom model helmet item (I made a joker mask) and exported it to .json format and put it in the ~/namespace/models/item folder. Though, I'm struggling to get the item to render what I want it to be rendered like as I've positioned it in the 'head' window view in blockbench. How did you render out your model? I checked your code and it looks like no references to the actual model are being made. I'm new to this forge modding stuff (was a fabric modder) and I desperately need some help. Is there a way to standardly render out armor models made using blockbench? any methods that one can use? My model in JSON: ```json { "credit": "Made with Blockbench", "texture_size": [160, 160], "textures": { "0": "ydyrn:items/joker_mask_texture", "particle": "ydyrn:items/joker_mask_texture" }, "elements": [ { "from": [0, 0, 0], "to": [16, 16, 1], "faces": { "north": {"uv": [0, 1.7, 16, 14.2], "texture": "#0"}, "east": {"uv": [0, 4, 0.9, 5.6], "texture": "#0"}, "south": {"uv": [0, 5.8, 1.6, 7.4], "texture": "#0"}, "west": {"uv": [0, 1.9, 1.3, 3.5], "texture": "#0"}, "up": {"uv": [0, 3.4, 1.6, 4.2], "texture": "#0"}, "down": {"uv": [0, 9, 1.6, 9.7], "texture": "#0"} } }, { "from": [15.8, 11, 0.5], "to": [16.2, 13, 15], "faces": { "north": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "east": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "south": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "west": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "up": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"}, "down": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"} } }, { "from": [0.2, 11, 14.6], "to": [15.8, 13, 15], "faces": { "north": {"uv": [7.9, 7.9, 9.46, 8.1], "texture": "#0"}, "east": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "south": {"uv": [7.9, 7.9, 9.46, 8.1], "texture": "#0"}, "west": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "up": {"uv": [7.9, 7.9, 9.46, 7.94], "texture": "#0"}, "down": {"uv": [7.9, 7.9, 9.46, 7.94], "texture": "#0"} } }, { "from": [-0.2, 11, 0.5], "to": [0.2, 13, 15], "faces": { "north": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "east": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "south": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "west": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "up": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"}, "down": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"} } } ], "display": { "thirdperson_righthand": { "translation": [-0.25, -2.75, 0], "scale": [0.3, 0.3, 0.3] }, "thirdperson_lefthand": { "translation": [-0.25, -2.75, 0], "scale": [0.3, 0.3, 0.3] }, "firstperson_righthand": { "rotation": [-9, 115, 15], "translation": [0, 1.25, -1.75], "scale": [0.5, 0.5, 0.5] }, "firstperson_lefthand": { "rotation": [-9, 115, 15], "translation": [0, 1.25, -1.75], "scale": [0.5, 0.5, 0.5] }, "ground": { "rotation": [40, 0, 0], "translation": [0, -2.5, 0], "scale": [0.5, 0.5, 0.5] }, "gui": { "rotation": [0, 180, 0] }, "head": { "translation": [0, 0, 0.25], "scale": [0.82773, 0.73594, 0.9] }, "fixed": { "translation": [0, 0, 8.75] } }, "groups": [ 0, { "name": "straps", "origin": [0, 0, 0], "color": 0, "children": [1, 2, 3] } ] } ```
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
    • In your config folder, delete the sophisticatedcore-common.toml file and test it again
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.