![]() ![]() For example, if you want to damage the player every time they click your block, or have your machine process dirt into diamonds, you should only do so after ensuring #isClientSide is false. Use this check whenever you need to determine if game logic and other mechanics should be run. ![]() It follows that the physical server will always contain false in this field, but we cannot assume that false implies a physical server, since this field can also be false for the logical server inside a physical client (in other words, a single player world). If the field is false, the level is running on the logical server. That is, if this field is true, the level is currently running on the logical client. Querying this field on a Level object establishes the logical side the level belongs to. This boolean check will be your most used way to check sides. Performing Side-Specific Operations Level#isClientSide In the MinecraftForge codebase, the physical side is represented by an enum called Dist, while the logical side is represented by an enum called LogicalSide. The logical client runs in the Render Thread, though often several other threads are spawned to handle things like audio and chunk render batching. In addition, it also receives information from the logical server and makes it available graphically to the player. Logical client - The logical client is what accepts input from the player and relays it to the logical server.The logical server always runs in a thread named the Server Thread. The logical server is present within a physical server, but it also can run inside a physical client together with a logical client, as a single player world. Logical server - The logical server is what runs game logic: mob spawning, weather, updating inventories, health, AI, and all other game mechanics.Physical server - Often known as the dedicated server, the physical server is the entire program that runs whenever you launch any sort of minecraft_server.jar that does not bring up a playable GUI.All threads, processes, and services that run during the game’s graphical, interactable lifetime are part of the physical client. Physical client - The physical client is the entire program that runs whenever you launch Minecraft from the launcher.Here we disambiguate the four possible meanings of “client” and “server”: Easy, right?Īs it turns out, there can be some ambiguity even with two such terms. After all, a client is what the user interacts with, and a server is where the user connects for a multiplayer game. When we say “client” or “server”, it usually follows with a fairly intuitive understanding of what part of the game we are talking about. There are many, many common misconceptions and mistakes regarding siding, which can lead to bugs that might not crash the game, but can rather have unintended and often unpredictable effects. A very important concept to understand when modding Minecraft are the two sides: client and server. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |