Skip to content

Commit

Permalink
A small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
I-No-oNe committed Jun 18, 2024
1 parent 31cebeb commit 1c395b4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
Binary file modified assets/gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 21 additions & 15 deletions src/main/java/net/i_no_am/viewmodel/gui/ViewModelSettings.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

package net.i_no_am.viewmodel.gui;


import io.github.itzispyder.improperui.ImproperUIAPI;
import io.github.itzispyder.improperui.config.ConfigReader;
import net.i_no_am.viewmodel.client.Global;

public class ViewModelSettings implements Global {
Expand All @@ -26,23 +28,27 @@ public class ViewModelSettings implements Global {
private static float off_position_y;

public static void loadConfigValues() {
ConfigReader VmConfig = ImproperUIAPI.getConfigReader(modId, "config.properties");
// view model
main_rotation_x = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("main-rotation-x", 0.0F);
main_position_x = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("main_position_x",0.0F)/normal_division;
main_rotation_z = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("main-rotation-z",0.0F);
main_position_z = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("main-position-z",0.0F) / normal_division;
main_rotation_y = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("main-rotation-y",0.0F);
main_position_y = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("main-position-y",0.0F) / normal_division;
off_rotation_x = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("off-rotation-x",0.0F);
off_position_x = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("off-position-x",0.0F) / normal_division;
off_rotation_z = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("off-rotation-z",0.0F);
off_position_z = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("off-position-z",0.0F) / normal_division;
off_rotation_y = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("off-rotation-y",0.0F);
off_position_y = (float) ImproperUIAPI.getConfigReader(modId, "config.properties").readFloat("off-position-y",0.0F) / normal_division;
no_swing = ImproperUIAPI.getConfigReader(modId, "config.properties").readBool("no-hand-swing",false);
no_food_swing = ImproperUIAPI.getConfigReader(modId, "config.properties").readBool("no-food-swing",false);
main_rotation_x = (float) VmConfig.readFloat("main-rotation-x", 0.0F);
main_position_x = (float) VmConfig.readFloat("main_position_x", 0.0F) / normal_division;
main_rotation_z = (float) VmConfig.readFloat("main-rotation-z", 0.0F);
main_position_z = (float) VmConfig.readFloat("main-position-z", 0.0F) / normal_division;
main_rotation_y = (float) VmConfig.readFloat("main-rotation-y", 0.0F);
main_position_y = (float) VmConfig.readFloat("main-position-y", 0.0F) / normal_division;
off_rotation_x = (float) VmConfig.readFloat("off-rotation-x", 0.0F);
off_position_x = (float) VmConfig.readFloat("off-position-x", 0.0F) / normal_division;
off_rotation_z = (float) VmConfig.readFloat("off-rotation-z", 0.0F);
off_position_z = (float) VmConfig.readFloat("off-position-z", 0.0F) / normal_division;
off_rotation_y = (float) VmConfig.readFloat("off-rotation-y", 0.0F);
off_position_y = (float) VmConfig.readFloat("off-position-y", 0.0F) / normal_division;
// No Hand Swing Animation
no_swing = VmConfig.readBool("no-hand-swing", false);
// No Eating Hand Animation
no_food_swing = VmConfig.readBool("no-food-swing", false);
}


public static float getMainRotationX() {
return main_rotation_x;
}
Expand Down Expand Up @@ -90,4 +96,4 @@ public static float getOffRotationY() {
public static float getOffPositionY() {
return off_position_y;
}
}
}

0 comments on commit 1c395b4

Please sign in to comment.