HelpNeed help recompiling a mod
Code:
docs.oracle.com/javaee/6/tutorial/doc/bncjk.html
---------- 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;
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?
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.
Render r;
for(r : renderers) {
do
for(Renderer r: renderers) {
It is easier to use a java bytecode editor to remove the multiplayer check.
Similar Threads
Combat Arms Mod HelpI need help with my mod please:)
0 Call of Duty Modern Warfare 2 HelpI need help adding a mod to my server!CO 0 Combat Arms Mod DiscussionNeed help making a mod work!
4 Combat Arms Mod DiscussionNeed help with scope modding please!!
7 Combat Arms Mods & Rez ModdingGuys I need help with 1 mod
15
