@@ -56,6 +56,10 @@ func copyFileSecurityInfo(source string, target string) error {
5656// FindStandardMojangDir returns path to the com.mojang folder in the standard
5757// Minecraft build.
5858func FindStandardMojangDir () (string , error ) {
59+ comMojang := os .Getenv ("COM_MOJANG" )
60+ if comMojang != "" {
61+ return comMojang , nil
62+ }
5963 result := filepath .Join (
6064 os .Getenv ("LOCALAPPDATA" ), "Packages" ,
6165 "Microsoft.MinecraftUWP_8wekyb3d8bbwe" , "LocalState" , "games" ,
@@ -72,6 +76,10 @@ func FindStandardMojangDir() (string, error) {
7276// FindPreviewDir returns path to the com.mojang folder in the preview
7377// Minecraft build.
7478func FindPreviewDir () (string , error ) {
79+ comMojang := os .Getenv ("COM_MOJANG_PREVIEW" )
80+ if comMojang != "" {
81+ return comMojang , nil
82+ }
7583 result := filepath .Join (
7684 os .Getenv ("LOCALAPPDATA" ), "Packages" ,
7785 "Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe" , "LocalState" , "games" ,
@@ -89,6 +97,10 @@ func FindPreviewDir() (string, error) {
8997// FindEducationDir returns path to the com.mojang folder in the education
9098// edition Minecraft build.
9199func FindEducationDir () (string , error ) {
100+ comMojang := os .Getenv ("COM_MOJANG_EDU" )
101+ if comMojang != "" {
102+ return comMojang , nil
103+ }
92104 result := filepath .Join (
93105 os .Getenv ("APPDATA" ), "Minecraft Education Edition" , "games" ,
94106 "com.mojang" )
0 commit comments