Skip to content

Commit

Permalink
Add translation saving and loading
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchlueter committed Jan 15, 2025
1 parent d6023ed commit a44b2e6
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ public boolean read(ConfigurationSection section, String name) {
(float) section.getDouble("scale_z", DEFAULT_SCALE.z)
);

translation = new Vector3f(
(float) section.getDouble("translation_x", DEFAULT_TRANSLATION.x),
(float) section.getDouble("translation_y", DEFAULT_TRANSLATION.y),
(float) section.getDouble("translation_z", DEFAULT_TRANSLATION.z)
);

shadowRadius = (float) section.getDouble("shadow_radius", DEFAULT_SHADOW_RADIUS);
shadowStrength = (float) section.getDouble("shadow_strength", DEFAULT_SHADOW_STRENGTH);

Expand Down Expand Up @@ -169,6 +175,9 @@ public boolean write(ConfigurationSection section, String name) {
section.set("scale_x", scale.x);
section.set("scale_y", scale.y);
section.set("scale_z", scale.z);
section.set("translation_x", translation.x);
section.set("translation_y", translation.y);
section.set("translation_z", translation.z);
section.set("shadow_radius", shadowRadius);
section.set("shadow_strength", shadowStrength);

Expand Down

0 comments on commit a44b2e6

Please sign in to comment.