Jump to content

1.3 Migration Confusion! (or, Why We're In For A Wait)


Recommended Posts

Posted

I suggested as much on their Reddit suggestions thing, but I was flamed into the ground.

Not surprising, considering the orgasms that were had over sandstone and coloured planks. There are probably as many behind-the-scenes-conspiracy stories going around at their little campfires as there are about Elvis Presley.

Posted

Now I'm disappointed.

After some testing, the SidedProxy thing results in only a single instantiation per invocation: If you are running locally, either simple singleplayer or open to LAN, only the client side is instantiated, and if you are running a dedicated server, only the server side is instantiated.

This means, for example, it's impossible to use the proxy system to handle cases such as spawning item entities that get thrown in random directions. Oh well: Even Forge isn't perfect.

For the record, the functions to use are:

[world object] . isRemote ( ) - false on dedicated server, true otherwise (which should include integrated server)

[entityliving object] . isClientWorld ( ) - false on dedicated server, true otherwise (which should include integrated server)

MinecraftServer . getServer ( ) . isDedicatedServer ( ) and MinecraftServer . getServer ( ) . isIntegratedServer ( )

Minecraft is such a mess. I even tried to figure out a way to delay Block/Item initialization so that I could request block/item IDs from a server instead of requiring the user to configure them to match their server manually (which means they'd have to keep a .cfg file for every server they play with a mod), but there's no way to reliably exchange packet data with a server before block and item data start being sent. Such a mess.

Posted

So, to put in simpler English you cant spawn and throw items at friends in a local server anymore

No, I'm talking about how the game engine works, not how Minecraft works. The server is the "boss", meaning it has the final say on where things are and how they move, but the client predicts what happens before the server responds, because it takes some time to send the command to the server and have the response come back. This works a lot of the time (like placing blocks), but for anything that uses random numbers (like items flying in random directions), the client and server can't synchronize perfectly, meaning they'd both have different guesses, so crap would randomly warp around your screen too much. So, the client simply doesn't spawn random stuff until the server responds, and you have visual lag instead of warping.

The issue with SidedProxy is that it is on its own not enough to differentiate between the three possibilities: "Hosting a dedicated server", "Connected to a dedicated server", "Playing on the local integrated server (whether or not is' open to LAN)", so you have to also use the commands above. Ordinarily, I would say "only spawn random stuff if the Server proxy is active", but that doesn't work for the integrated server.

The end-user doesn't have to worry about any of this: It's a modding issue only.

Posted

No, I'm talking about how the game engine works, not how Minecraft works. The server is the "boss", meaning it has the final say on where things are and how they move, but the client predicts what happens before the server responds, because it takes some time to send the command to the server and have the response come back. This works a lot of the time (like placing blocks), but for anything that uses random numbers (like items flying in random directions), the client and server can't synchronize perfectly, meaning they'd both have different guesses, so crap would randomly warp around your screen too much. So, the client simply doesn't spawn random stuff until the server responds, and you have visual lag instead of warping.

The issue with SidedProxy is that it is on its own not enough to differentiate between the three possibilities: "Hosting a dedicated server", "Connected to a dedicated server", "Playing on the local integrated server (whether or not is' open to LAN)", so you have to also use the commands above. Ordinarily, I would say "only spawn random stuff if the Server proxy is active", but that doesn't work for the integrated server.

The end-user doesn't have to worry about any of this: It's a modding issue only.

My mistake, but for the sake of the Hellen Kellers and other non- "integrated" people you might want to just say there will be major visual lag unless a certain function of the server is on and working after the detailed instruction

Posted

Yes, that is something to keep in mind. Another of 1.3's little growing pains for everyone who hasn't already been doing SMP programming.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...