And why does a entity have an model?
Mostly to make code more readable, flexible and expandable. RAM is not too big problem at objects/models level.
About memory usage, even 64-bit Java use 32-bit references by default to save memory. As far as I know every object in Java must have multiply of 8 size.
Data stored in each object:World
- HashMap<Point, Chunk>Chunk
- 2 references (to the world and location), Entity, boolean repaint, int listIDTile
(only in more RAM-intensive version) - 2 references (to the entity and chunk), 2 bytes (xz and y)
RAM usage caused by other objects is very small.