The Minecraft code is based around a handful of Classes with different responsibilities. Most of them are split into two parts - the Client side and the Server side; communication between the two is by
Packets. When writing mods it is usually vitally important to
know which "side" your code is running on. If you try to run client code on the server side (or vica versa) it will cause crashes or loss of client-server synchronisation (eg items which disappear).
The diagram below shows the most significant Classes responsible for storing, maintaining and synchronising the game state.
Other significant Classes are
- Block and its derived classes
- Item and its derived classes
- Entity and its derived classes
- Container and its derived classes
- TileEntity and its derived classes
For more information, see
here. The game loops are in Minecraft and MinecraftServer, described in more detail
here.
No comments:
Post a Comment