Terasology / LightAndShadow

Light & Shadow is an experimental game type set in a quirky Alice in Wonderland inspired setting
Apache License 2.0
8 stars 22 forks source link

refactor: component field visibility public #259

Closed jdrueckert closed 10 months ago

jdrueckert commented 10 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