ExclamationHelpNeed help recompiling a mod

Posts 1–15 of 22 · Page 1 of 2
Need help recompiling a mod
I have decompiled and modified the CBJ Xray to bypass the server protection but i cant recompile it...

Here is the src:
Code:
************/#!k5sRgJLA!EwSqoHu6d6MnWhsK-Ucksm5E930A_WagT-FsGKcul_g
Im getting this error:

Code:
== ERRORS FOUND ==

src\minecraft\cjb\rebirth\xray\client\XRayClientTick.java:60: error: not a state
ment
/*  64 */       for (r : renderers) {
                     ^

src\minecraft\cjb\rebirth\xray\client\XRayClientTick.java:60: error: ';' expecte
d
/*  64 */       for (r : renderers) {
                      ^

src\minecraft\cjb\rebirth\xray\client\XRayClientTick.java:60: error: illegal sta
rt of expression
/*  64 */       for (r : renderers) {
                       ^

src\minecraft\cjb\rebirth\xray\client\XRayClientTick.java:60: error: ';' expecte
d
/*  64 */       for (r : renderers) {
                        ^

4 errors
==================
Most people obfuscate their code. If it's obfuscates a simple decompile will not work.
Well this isnt obfuscated but i still dont get why people just dont override it in a normal client and add the mod as a lib.
Quote Originally Posted by hackroj View Post
Well this isnt obfuscated but i still dont get why people just dont override it in a normal client and add the mod as a lib.
You mean decompiling it and add the client as lib at the projet to compile?
Quote Originally Posted by eilex View Post
You mean decompiling it and add the client as lib at the projet to compile?
no i meant disabling the check in a base class with a few lines.
So i have to override this with one that always return false?

Code:
func_71356_B,isSingleplayer,0,"Returns true if there is only one player playing, and the current server is the integrated one."
Code:
pastebin.com/m7EJJc7S
I've never did anything java related before, if someone could help me i would be really grateful.
Quote Originally Posted by eilex View Post
So i have to override this with one that always return false?

Code:
func_71356_B,isSingleplayer,0,"Returns true if there is only one player playing, and the current server is the integrated one."
Code:
pastebin.com/m7EJJc7S
I've never did anything java related before, if someone could help me i would be really grateful.
Yea set that to false somewhere onUpdate() and be sure to import the mod by
Code:
import cjb.rebirth.*
or just
Code:
 cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() {
                return false;
        }
Im useless...

How it shoud be, like this?

Code:
 package cbx;

 import cjb.rebirth.*;

 public class cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() {
                return true;
        }
		
 public class cjb.rebirth.xray.client.Renderer.isSingleplayer() {
                return true;
        }
Note: It has to be true xD
lol i read your thing wrong then and yes but you should place it somewhere thats constantly loaded in minecraft (not gonna tell you where because you need to learn something yourself)
Quote Originally Posted by hackroj View Post
lol i read your thing wrong then and yes but you should place it somewhere thats constantly loaded in minecraft (not gonna tell you where because you need to learn something yourself)

Please tell me how is the working code and ill find the place to put this my shelf :S
Code:
cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() {
                return true;
        }

P.D: Im gonna hate java xDDD
Quote Originally Posted by eilex View Post
Please tell me how is the working code and ill find the place to put this my shelf :S
Code:
cjb.rebirth.xray.client.XRayClientTick.isSinglepla yer() {
return true;
}

P.D: Im gonna hate java xDDD
You got it working it should be
Code:
cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() {
                return true;
        }
		
 cjb.rebirth.xray.client.Renderer.isSingleplayer() {
                return true;
        }
Got this errors:
Code:
== ERRORS FOUND ==

src\minecraft\net\minecraft\client\Minecraft.java:2540: error: ';' expected
        cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() {
                                                               ^

src\minecraft\net\minecraft\client\Minecraft.java:2544: error: ';' expected
        cjb.rebirth.xray.client.Renderer.isSingleplayer() {
                                                         ^

2 errors
==================
Quote Originally Posted by eilex View Post
Got this errors:
Code:
== ERRORS FOUND ==

src\minecraft\net\minecraft\client\Minecraft.java:2540: error: ';' expected
        cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() {
                                                               ^

src\minecraft\net\minecraft\client\Minecraft.java:2544: error: ';' expected
        cjb.rebirth.xray.client.Renderer.isSingleplayer() {
                                                         ^

2 errors
==================
try
Code:
cjb.rebirth.xray.client.XRayClientTick.isSingleplayer() = true;
"The left-hand side of an assignment must be a variable"

---------- Post added at 10:47 AM ---------- Previous post was at 10:15 AM ----------

is there any way to check from wich file is "isSingleplayer()" being called?

So i could modify that class and do this:

Code:
    public boolean isSingleplayer()
    {
    	if (callback == "cjb.rebirth.xray.client.XRayClientTick" || callback == "cjb.rebirth.xray.client.Renderer")
    	{
    		return true;
    	}
    	else
    	{
    		return this.integratedServerIsRunning && this.theIntegratedServer != null;
    	}	
    }
ah here put this
Code:
if(lol)
		{
cjb.rebirth.xray.client.XRayClientTick.isSingleplayer();
}
make a
Code:
public boolean lol = true;
on the start
if that doesnt work im not much use then i would have to look at the src.
Posts 1–15 of 22 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us