ExclamationHelpNeed help recompiling a mod

Posts 16–22 of 22 · Page 2 of 2
Quote Originally Posted by hackroj View Post
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.
This code alone dont do anything :S
Code:
cjb.rebirth.xray.client.XRayClientTick.isSingleplayer();
Code:
docs.oracle.com/javaee/6/tutorial/doc/bncjk.html
This could work...

---------- Post added at 06:22 AM ---------- Previous post was at 04:31 AM ----------

Finally i got it working modifiying the "minecraft\net\minecraft\client\Minecraft.java "

Line 133
Code:
import cjb.rebirth.xray.client.XRayMod;
And changed two things...
Code:
private void clickMiddleMouseButton()
    {
		boolean flag = this.thePlayer.capabilities.isCreativeMode;
		
		if (!XRayP && !flag)
		{
			XRayMod.setMode(1);
			this.XRayP = true;
		}
		else
		{
			XRayMod.setMode(-1);
			this.XRayP = false;
		}

        if (this.objectMouseOver != null)
        {
            int k;

            if (!ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld))
            {
                return;
            }

            if (flag)
            {
                k = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem;
                this.playerController.sendSlotPacket(this.thePlayer.inventory.getStackInSlot(this.thePlayer.inventory.currentItem), k);
            }
        }
    }
Code:
public boolean XRayP = false;
    public boolean isSingleplayer()
    {
		int mode = XRayMod.xraymode;
		if (XRayP)
		{
			if ((mode >= 0) || (mode <= 3))
			{
				return true;
			}
			else
			{
				return this.integratedServerIsRunning && this.theIntegratedServer != null;
			}
		}
		else
		{
			return this.integratedServerIsRunning && this.theIntegratedServer != null;
		}
    }
wow nice suspected something like that.
As a java noob, I spent about 12 hours on this yesterday and got nowhere with a combination of mcp and BON. When I woke up this morning, in a flash of insight that I didn't know I had, I decided to try using a bytecode editor on the class files. I was able to get xray working in SMP (Hexxit) in about 15 minutes without decompiling or compiling anything. Sometimes you just have to go at things sideways.
so can anyone help me get this xray? maybe with a download link?
Quote Originally Posted by eilex View Post
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
==================
Look where you put for(r : renderers) and make it for(ClassThingy r : renderers). It needs be an object, sorry I'm bad at explaining
Essentially, the decompiler declares r of type Whatever on the line above the java for each loop. You have to remove that line and declare the var in the loop definition. E.g. instead of -

Render r;
for(r : renderers) {

do

for(Renderer r: renderers) {


It is easier to use a java bytecode editor to remove the multiplayer check.
Posts 16–22 of 22 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us