MCPcopy Create free account
hub / github.com/Garten/sourcecraft / initSetup

Method initSetup

src/main/GuiLogic.java:172–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 }
171
172 private void initSetup() {
173 this.gui.setMinecraftPath(Minecraft.getMinecraftPath());
174 this.updatedMinecraftPath();
175 this.gui.setEditedTextFieldMinecraftPath(this::updatedMinecraftPath);
176
177 // steam path
178 this.gui.setSourcePath(Steam.getSteamPath());
179 this.updateDisplayForSteam();
180 this.gui.setEditedTextFieldSourcePath(this::updateDisplayForSteam);
181
182 this.gui.setSelectMinecraftPath(path -> {
183 File newPath = this.changePath(new File(path));
184 this.gui.setMinecraftPath(newPath);
185 Periphery.CONFIG.setMinecraftPath(newPath);
186 Periphery.write();
187 });
188
189 this.gui.setSelectSourcePath(path -> {
190 File newPath = this.changePath(new File(path));
191 this.gui.setSourcePath(newPath);
192 Periphery.CONFIG.setSteamPath(newPath);
193 Periphery.write();
194 });
195 }
196
197 private void updatedMinecraftPath() {
198 String minecraftPathString = this.gui.getMincraftPath();

Callers 1

runMethod · 0.95

Calls 13

getMinecraftPathMethod · 0.95
updatedMinecraftPathMethod · 0.95
getSteamPathMethod · 0.95
updateDisplayForSteamMethod · 0.95
changePathMethod · 0.95
writeMethod · 0.95
setSteamPathMethod · 0.80
setMinecraftPathMethod · 0.45
setSourcePathMethod · 0.45

Tested by

no test coverage detected