Minecraft Modding Forge .isRemote() and worldObj

5.8k views Asked by At

I am very new to minecraft modding and for the most part I understand a lot of it, but for some reason, I can't grasp what worldObj.isRemote() means.

isRemote() returns if the world is client or server sided. But what does that mean? I just don't understand.

2

There are 2 answers

2
Brian_Entei On BEST ANSWER

Usually, when something is remote, that means that it is on the other end of a network, or not on the client side. I did actually do a little coding with forge, and if I remember correctly, world.isRemote() is usually used to tell if a world is on the server that the client is connected to, or if it is on the computer that Minecraft is running on(the client). For example, say you are playing SinglePlayer. None of the available worlds would be remote because they are all on the client, so isRemote() would never return true for these. If, however, you were logged in to a server, the worlds would most likely be remote worlds. Hope I made some sense!

0
Skgland On

The function world.isRemote() returns true if the current side is the logical client. If on a dedicated Server this will always be false. On a client this can both be true or false based on the current situation. A detailed description of sidedness can be found in the Forge Documentation