Terasology / PolyWorld

A world generator that is based on Voronoi diagrams
81 stars 19 forks source link

refactor: component field visibility public #43

Closed jdrueckert closed 11 months ago

jdrueckert commented 11 months ago

Newer Java versions are stricter with regards to access restrictions when using reflection. This affects in particular the serialization of non-public fields in our component classes. For this reason, we decided to exclude non-public component fields from serialization and refactor all non-public component fields to be public instead to ensure not breaking any game and especially saving/loading behavior.

A future module overhaul may have a more detailed look into the components and make considerate decisions to use non-public fields.

Relates to https://github.com/MovingBlocks/Terasology/pull/5191