Skip to content

Commit

Permalink
Remove Forge version lock (MCreator#4519)
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenDEV authored Jan 21, 2024
1 parent de4d164 commit 07c90a8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ displayTest="IGNORE_SERVER_VERSION"
ordering="NONE"
side="BOTH"

<#if !settings.isDisableForgeVersionCheck()>
[[dependencies.${settings.getModID()}]]
modId="forge"
mandatory=true
versionRange="[${generator.getGeneratorBuildFileVersion()}]"
ordering="NONE"
side="BOTH"
</#if>

<#list settings.getRequiredMods() as e>
[[dependencies.${settings.getModID()}]]
modId="${e}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ displayTest="IGNORE_SERVER_VERSION"
ordering="NONE"
side="BOTH"

<#if !settings.isDisableForgeVersionCheck()>
[[dependencies.${settings.getModID()}]]
modId="forge"
mandatory=true
versionRange="[${generator.getGeneratorBuildFileVersion()}]"
ordering="NONE"
side="BOTH"
</#if>

<#list settings.getRequiredMods() as e>
[[dependencies.${settings.getModID()}]]
modId="${e}"
Expand Down
4 changes: 0 additions & 4 deletions plugins/mcreator-localization/lang/texts.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2932,10 +2932,6 @@ dialog.workspace_settings.section.external_apis.tooltip=<html>Checkboxes to add
<br><small>WARNING: If your mod uses external APIs, it won''t work without them once you export it
dialog.workspace_settings.explore_plugins=Explore plugins
dialog.workspace_settings.plugins_tip=Looking for more APIs? Check MCreator plugins.
dialog.workspace_settings.version_check=Forge version check
dialog.workspace_settings.section.version_check=<html>Disable Minecraft Forge version check?\
<br><small>If you want to make sure users use the right Minecraft Forge version,\
<br>uncheck this and enable Minecraft Forge version checking.
dialog.workspace_settings.section.advanced=Advanced settings
dialog.workspace_settings.server_side_only=<html>Is this mod server-side only?
dialog.workspace_settings.lock_base_files_label=<html>Lock base mod files?<br><small>Use ONLY if needed and you understand Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ static class WorkspaceDialogPanel extends JPanel {
JComboBox<String> modPicture = new JComboBox<>();
JCheckBox lockBaseModFiles = L10N.checkbox("dialog.workspace_settings.lock_base_files");
JCheckBox serverSideOnly = L10N.checkbox("dialog.workspace_settings.server_side_mod");
JCheckBox disableForgeVersionCheck = new JCheckBox();
JTextField updateJSON = new JTextField(24);
JStringListField requiredMods, dependencies, dependants;

Expand Down Expand Up @@ -350,8 +349,6 @@ public void replace(DocumentFilter.FilterBypass fb, int offset, int length, Stri
author.setText(System.getProperty("user.name") + ", MCreator");
version.setText("1.0.0");

disableForgeVersionCheck.setSelected(true);

generator.setUI(new BasicComboBoxUI() {
@Override protected JButton createArrowButton() {
return new JButton() {
Expand Down Expand Up @@ -522,14 +519,6 @@ public void replace(DocumentFilter.FilterBypass fb, int offset, int length, Stri
_external_apis.add(apiSettings);
}

JComponent forgeVersionCheckPan = PanelUtils.westAndEastElement(
L10N.label("dialog.workspace_settings.section.version_check"), disableForgeVersionCheck);
forgeVersionCheckPan.setBorder(
BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.gray, 1),
L10N.t("dialog.workspace_settings.version_check")));
_advancedSettings.add(forgeVersionCheckPan);
_advancedSettings.add(new JEmptyBox(5, 5));

JPanel advancedSettings = new JPanel(new GridLayout(3, 2, 5, 2));
advancedSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.gray, 1),
L10N.t("dialog.workspace_settings.section.advanced")));
Expand Down Expand Up @@ -571,7 +560,6 @@ public void replace(DocumentFilter.FilterBypass fb, int offset, int length, Stri
workspace.getWorkspaceSettings().getModPicture());
serverSideOnly.setSelected(workspace.getWorkspaceSettings().isServerSideOnly());
lockBaseModFiles.setSelected(workspace.getWorkspaceSettings().isLockBaseModFiles());
disableForgeVersionCheck.setSelected(workspace.getWorkspaceSettings().isDisableForgeVersionCheck());
updateJSON.setText(workspace.getWorkspaceSettings().getUpdateURL());
credits.setText(workspace.getWorkspaceSettings().getCredits());
packageName.setText(workspace.getWorkspaceSettings().getModElementsPackage());
Expand Down Expand Up @@ -608,7 +596,6 @@ public WorkspaceSettings getWorkspaceSettings(@Nullable Workspace workspace) {
retVal.setModElementsPackage(packageName.getText().isEmpty() ? null : packageName.getText());
retVal.setServerSideOnly(serverSideOnly.isSelected());
retVal.setLockBaseModFiles(lockBaseModFiles.isSelected());
retVal.setDisableForgeVersionCheck(disableForgeVersionCheck.isSelected());
retVal.setUpdateURL(updateJSON.getText().isEmpty() ? null : updateJSON.getText());
retVal.setCurrentGenerator(
((GeneratorConfiguration) Objects.requireNonNull(generator.getSelectedItem())).getGeneratorName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
private String websiteURL;
private String license;

private boolean disableForgeVersionCheck = true;
private boolean serverSideOnly = false;
private String updateURL;

Expand Down Expand Up @@ -74,7 +73,6 @@ public WorkspaceSettings(WorkspaceSettings other) {
this.author = other.author;
this.license = other.license;
this.websiteURL = other.websiteURL;
this.disableForgeVersionCheck = other.disableForgeVersionCheck;
this.serverSideOnly = other.serverSideOnly;
this.updateURL = other.updateURL;
this.modPicture = other.modPicture;
Expand Down Expand Up @@ -118,10 +116,6 @@ public void setWebsiteURL(String websiteURL) {
this.websiteURL = websiteURL;
}

public void setDisableForgeVersionCheck(boolean disableForgeVersionCheck) {
this.disableForgeVersionCheck = disableForgeVersionCheck;
}

public void setServerSideOnly(boolean serverSideOnly) {
this.serverSideOnly = serverSideOnly;
}
Expand Down Expand Up @@ -232,10 +226,6 @@ public boolean isServerSideOnly() {
return serverSideOnly;
}

public boolean isDisableForgeVersionCheck() {
return disableForgeVersionCheck;
}

public String getUpdateURL() {
return updateURL;
}
Expand Down

0 comments on commit 07c90a8

Please sign in to comment.