Jump to content

Recommended Posts

Posted

I was edit Minecraft.class in net.minecraft.client package but it working wrong.

 

Code from line 1899

 

if (Keyboard.getEventKey() == 48 && Keyboard.isKeyDown(61))
{
RenderManager.debugBoundingBox = !RenderManager.debugBoundingBox;
}

 

I was replaced to

 

if (Keyboard.getEventKey() == 48)
{
if (Keyboard.isKeyDown(61)) {
RenderManager.debugBoundingBox = !RenderManager.debugBoundingBox;
} else {
this.thePlayer.sendChatMessage("/spawn");
}
}

 

But when I play on selected singleplayer map or join any server, it binded command executes automatically (once), even if I don't pressed B (id 48) button...

 

Also I was trying to add this command to controls menu settings (GameSettings.class), Minecraft is crashes when I start playing (on selected singleplayer map or on any server) if Smart Moving mod is installed (but I not sure about this mod).

Posted

In Forge, there are events.

If you subscribe a void to an event, it is called whenever the event is. So there is an event for the player being alive. Every tick the player is alive, all subscribers are ran.

You want every tick, and you want to make sure your on the client.

But yes, do NOT edit base classes or you will get your topics locked, your mods looked down upon, and possibly your account removed.

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

I don't think your account will get removed if you edit base classes, but less people are going to help you.

Editing base classes is not good,

 

If you only edit the base class in your editor,

it may work fine in eclipse but will not work outside your editor because the base codes aren't edited there.

And what if two modders would have edited a base class? Than you can only use 1 of the mods and using mods will me more difficult for players.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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