{0}
{1}
dialog.preferences.entry_description={0}\:
{1}
@@ -533,14 +533,14 @@ dialog.update_notify.more_recent_build=有一個針對 {0}
dialog.update_notify.error_failed_check_internet_message=無法檢查更新。 原因\:沒有網路
dialog.update_notify.error_failed_check_internet_title=沒有網路連線
dialog.update_notify.no_update_message=你已安裝了最新版 MCreator!
-dialog.update_notify.no_pluin_update_message=目前沒有可用的插件更新!
+dialog.update_notify.no_pluin_update_message=目前沒有可用的外掛程式更新!
dialog.update_notify.no_update_title=沒有更新
dialog.update_notify.open_download_page=開啟下載頁面
dialog.update_notify.remind_later=稍後提醒我
-dialog.plugin_update_notify.message=MCreator 檢測到以下插件可更新\:
-dialog.plugin_update_notify.update=更新插件
+dialog.plugin_update_notify.message=MCreator 檢測到以下外掛程式可更新\:
+dialog.plugin_update_notify.update=更新外掛程式
dialog.plugin_update_notify.close=關閉此視窗
-dialog.plugin_update_notify.update_title=插件更新
+dialog.plugin_update_notify.update_title=外掛程式更新
dialog.plugin_update_notify.version_message={0}
目前安裝的版本\:{1},新版本\:{2}
dialog.plugin_update_notify.changes_message=最新版本中的變更\:
dialog.setup_workspace.title=對選定的生成器設定工作空間
@@ -786,6 +786,8 @@ blockly.category.heightplacements=高度位置
blockly.category.orefeatures=礦石地物
blockly.category.placements=常見位置
blockly.category.treefeatures=树木地物
+blockly.category.trees=樹
+blockly.category.treedecorators=根與裝飾
blockly.category.arg_types=引數
blockly.category.actions=操作
blockly.block.action_result_type=類型 %1 的操作結果
@@ -905,7 +907,6 @@ blockly.block.entity_data_integer_get=對於類型 %2 的自訂實體 %1 取得
blockly.block.entity_data_integer_set=對於類型 %2 的自訂實體 %1 將對應整數資料 %3 的值設為 %4
blockly.block.entity_data_string_get=對於類型 %2 的自訂實體 %1 取得對應字串資料 %3 的值
blockly.block.entity_data_string_set=對於類型 %2 的自訂實體 %1 將對應字串資料 %3 的值設為 %4
-blockly.block.entity_deal_custom_damage=對 %2 造成 %1 點傷害,其鍵名為 death.attack.%3(.player/.item)
blockly.block.entity_despawn=清除 %1 %2
blockly.block.entity_dimension_id=所在的維度 %1 的 ID
blockly.block.entity_direction=以 %1 的南方向(yaw)為準的角度大小
@@ -1512,7 +1513,7 @@ dialog.workspace.export_deobf.title=匯出反混淆的模組
dialog.workspace.export_deobf.message=反混淆後的模組不能在標準安裝下的Minecraft中使用。
僅在有充分理由使用此選項時才使用此選項。
確定要使用此選項嗎?
dialog.workspace.export.option.donate_and_export=捐贈並匯出模組
dialog.workspace.export.option.just_export=匯出模組而不捐贈
-dialog.workspace.export.error.message=你的工作空間包含無法編譯且無法匯出的模組元素。
未生成任何模組檔案。
+dialog.workspace.export.error.message=無法匯出工作空間。
沒有模組檔案生成。
dialog.workspace.export.error.title=匯出失敗
action.workspace.import_from_zip=將工作空間ZIP檔案匯入此工作空間...
action.workspace.new=新增工作空間…
@@ -1710,8 +1711,8 @@ preferences.notifications.checkAndNotifyForPatches=在 MCreator 啟動時通知
preferences.notifications.checkAndNotifyForPatches.description=如果你不希望收到修補程式(小更新) 更新的通知,請取消勾選此框。
注意\: 即使你取消勾選該核取方塊,如果發現了可用的更新,在 MCreator 啟動時仍會有小通知。
preferences.notifications.showWebsiteNewsNotifications=啟動時顯示官網新聞通知
preferences.notifications.showWebsiteNewsNotifications.description=啟用該項時,工作空間選擇器將在 MCreator 啟動時顯示官網新聞的通知。
-preferences.notifications.checkAndNotifyForPluginUpdates=通知社群插件更新
-preferences.notifications.checkAndNotifyForPluginUpdates.description=如果你不想收到第三方插件更新的通知,請取消勾選此项。
注意\:如果第三方插件更新伺服器出現故障或速度緩慢,此選項可能會減慢 MCreator 的啟動速度,而且此選項允許
我們無法控制的第三方插件在 MCreator 啟動期間訪問其更新伺服器。
+preferences.notifications.checkAndNotifyForPluginUpdates=通知社群外掛程式更新
+preferences.notifications.checkAndNotifyForPluginUpdates.description=如果你不想收到第三方外掛程式更新的通知,請取消勾選此项。
注意\:如果第三方外掛程式更新伺服器出現故障或速度緩慢,此選項可能會減慢 MCreator 的啟動速度,而且此選項允許
我們無法控制的第三方外掛程式在 MCreator 啟動期間訪問其更新伺服器。
preferences.themes.select_theme=選擇要使用的主題
preferences.themes.select_theme.description=該主題包含 MCreator 所使用的資源。
dialog.workspace.regenerate_and_build.title=重新生成程式碼並建置
@@ -1782,8 +1783,9 @@ dialog.workspace.is_not_valid_message=工作空間開啟失敗!該工作空間使用不支援的生成器類型\:{0}
為該工作空間選擇一個支援的生成器。
dialog.workspace.unknown_generator_title=不支援的生成器
+dialog.workspace.missing_plugins_title=缺少外掛程式
action.check_for_updates=檢查更新
-action.check_for_plugin_updates=檢查插件更新
+action.check_for_plugin_updates=檢查外掛程式更新
action.open_java_edition_dir=開啟Java版安裝路徑
dialog.open_java_edition_dir.fail.message=無法開啟Java版安裝路徑!
dialog.open_java_edition_dir.fail.title=路徑開啟失敗
@@ -2795,8 +2797,8 @@ dialog.workspace_settings.picture=模組圖示/圖片\:
在“
dialog.workspace_settings.credits.error=鳴謝不能以包含引號
dialog.workspace_settings.section.external_apis=外部 API 支援
dialog.workspace_settings.section.external_apis.tooltip=勾選此核取方塊以添加對所支援的第三方 API 的支援和依賴項
警告\: 如果你的模組使用了第三方 API,一旦你匯出它,沒有它們就無法執行。
-dialog.workspace_settings.explore_plugins=探索插件
-dialog.workspace_settings.plugins_tip=尋找更多 API?請看看 MCreator 插件。
+dialog.workspace_settings.explore_plugins=探索外掛程式
+dialog.workspace_settings.plugins_tip=尋找更多 API?請看看 MCreator 外掛程式。
dialog.workspace_settings.version_check=Forge 版本檢查
dialog.workspace_settings.section.version_check=是否停用 Minecraft Forge 版本檢查?
如果要確保用戶使用正確的 Minecraft Forge 版本,請
取消勾選並啟用 Minecraft Forge 版本檢查。
dialog.workspace_settings.section.advanced=進階設定
@@ -2809,13 +2811,13 @@ dialog.workspace_settings.dependants=其它依賴项\:
使用逗
dialog.workspace_settings.error_list=工作空間設定存在以下問題\:
dialog.workspace_settings.dialog.error.title=無效的工作空間設定
dialog.workspace_settings.dialog.error=錯誤在窗口上用紅色和錯誤圖示標記,因此你可以根據此處的註釋找到它們並進行修復。
-dialog.new_workspace.spigot.display_name=插件顯示名稱\:
僅用於MCreator
-dialog.new_workspace.spigot.plugin_name=插件名稱\:
用於插件識別
+dialog.new_workspace.spigot.display_name=外掛程式顯示名稱\:
僅用於MCreator
+dialog.new_workspace.spigot.plugin_name=外掛程式名稱\:
用於外掛程式識別
dialog.new_workspace.spigot.generator=Minecraft版本(生成器)\:
目標Java版版本
-dialog.new_workspace.spigot.package=插件 Java 包名稱\:
用於程式碼生成器的根
+dialog.new_workspace.spigot.package=外掛程式 Java 包名稱\:
用於程式碼生成器的根
dialog.new_workspace.spigot.folder=工作空間檔案夾\:
-dialog.new_workspace.spigot.notice=Spigot插件是基於Java伺服器端的插件,可在Minecraft Java版本上執行,
並且需要安裝Spigot伺服器API,但不需要對客戶端進行任何特殊修改。
-dialog.new_workspace.spigot.toggle=\ Spigot 伺服器插件
+dialog.new_workspace.spigot.notice=Spigot外掛程式是基於Java伺服器端的外掛程式,可在Minecraft Java版本上執行,
並且需要安裝Spigot伺服器API,但不需要對客戶端進行任何特殊修改。
+dialog.new_workspace.spigot.toggle=\ Spigot 伺服器外掛程式
dialog.new_workspace.forge.display_name=模組顯示名稱\:
此名稱顯示在遊戲中
dialog.new_workspace.forge.modid=模組 ID / 名稱空間\:
用於模組識別
dialog.new_workspace.forge.generator=Minecraft 版本(生成器)\:
目標 Java 版版本
@@ -2857,9 +2859,9 @@ dialog.new_workspace.datapack.generator=Minecraft版本 (生成器)\:<
dialog.new_workspace.datapack.folder=工作空間檔案夾\:
dialog.new_workspace.datapack.notice=Minecraft資料包是可在Minecraft Java 版上執行且無需安裝任何
附加軟體或模組載入器(modloader),但功能有限。
dialog.new_workspace.datapack.toggle=\ Minecraft 資料包
-dialog.new_workspace.disabled.tooltip=你需要安裝至少一個支援此生成器類型的插件。
-dialog.new_workspace.dialog_plugin_needed.title=需要插件
-dialog.new_workspace.dialog_plugin_needed.text=當前未安裝支援此生成器類型的插件。
你是否要瀏覽 MCreator 的插件庫以取得插件?
+dialog.new_workspace.disabled.tooltip=你需要安裝至少一個支援此生成器類型的外掛程式。
+dialog.new_workspace.dialog_plugin_needed.title=需要外掛程式
+dialog.new_workspace.dialog_plugin_needed.text=當前未安裝支援此生成器類型的外掛程式。
你是否要瀏覽 MCreator 的外掛程式庫以取得外掛程式?
dialog.new_workspace.error_list=你的工作空間設定存在以下問題\:
dialog.new_workspace.main_title_html=建立新的工作空間
再下方輸入工作空間詳細資訊
elementgui.particle.animated_frame_duration=動態紋理幀持續時間(以遊戲刻為單位)\:
@@ -3274,14 +3276,14 @@ dialog.bedrock.failed.title=執行客戶端失敗
dialog.bedrock.unsupported=你似乎未从商店安裝基岩版。
dialog.bedrock.unsupported.windows=基岩版目前僅在 Windows 10+ 上支援
dialog.bedrock.unsupported.title=不支援執行客戶端
-dialog.plugin_load_failed.msg1=一些插件載入失敗\:
-dialog.plugin_load_failed.msg2=部分功能可能無法正常工作。請檢查 MCreator 日志檔案以取得詳細訊息。
我們建議聯係插件作者以取得更多訊息和支援。
-dialog.plugin_load_failed.title=一些插件載入失敗
-notification.plugin_load_failed.msg=下列插件載入失敗\:
+dialog.plugin_load_failed.msg1=一些外掛程式載入失敗\:
+dialog.plugin_load_failed.msg2=部分功能可能無法正常工作。請檢查 MCreator 日志檔案以取得詳細訊息。
我們建議聯係外掛程式作者以取得更多訊息和支援。
+dialog.plugin_load_failed.title=一些外掛程式載入失敗
+notification.plugin_load_failed.msg=下列外掛程式載入失敗\:
notification.common.more_info=更多資訊
notification.update_available.msg=MCreator 有新版本可用。
已安裝版本\: {0}
新版本\: {1}
notification.patch_available.msg=有新版本 {0} 可用。
已安裝版本\: {0}.{1}
新版本\: {0}.{2}
-notification.plugin_updates.msg=有可用的插件更新
+notification.plugin_updates.msg=有可用的外掛程式更新
notification.news.title=來自官網的新聞\:{0}
notification.news.read_more=瞭解更多
notification.news.hide=隱藏此通知
From 45cc72f1ac0cec9bfdcb9a9a3aa6f20026bc38ca Mon Sep 17 00:00:00 2001
From: KlemenDEV <16374228+KlemenDEV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 17:42:23 +0100
Subject: [PATCH 2/9] Specify Axis import directly for geckolib compatibility
(there are some other Axis classes too)
---
.../templates/projectile/projectile_renderer.java.ftl | 2 ++
.../templates/projectile/projectile_renderer.java.ftl | 2 ++
2 files changed, 4 insertions(+)
diff --git a/plugins/generator-1.19.4/forge-1.19.4/templates/projectile/projectile_renderer.java.ftl b/plugins/generator-1.19.4/forge-1.19.4/templates/projectile/projectile_renderer.java.ftl
index be72a4f070e..25eb5384054 100644
--- a/plugins/generator-1.19.4/forge-1.19.4/templates/projectile/projectile_renderer.java.ftl
+++ b/plugins/generator-1.19.4/forge-1.19.4/templates/projectile/projectile_renderer.java.ftl
@@ -31,6 +31,8 @@
<#-- @formatter:off -->
package ${package}.client.renderer;
+import com.mojang.math.Axis;
+
public class ${name}Renderer extends EntityRenderer<${name}Entity> {
private static final ResourceLocation texture = new ResourceLocation("${modid}:textures/entities/${data.customModelTexture}");
diff --git a/plugins/generator-1.20.1/forge-1.20.1/templates/projectile/projectile_renderer.java.ftl b/plugins/generator-1.20.1/forge-1.20.1/templates/projectile/projectile_renderer.java.ftl
index be72a4f070e..25eb5384054 100644
--- a/plugins/generator-1.20.1/forge-1.20.1/templates/projectile/projectile_renderer.java.ftl
+++ b/plugins/generator-1.20.1/forge-1.20.1/templates/projectile/projectile_renderer.java.ftl
@@ -31,6 +31,8 @@
<#-- @formatter:off -->
package ${package}.client.renderer;
+import com.mojang.math.Axis;
+
public class ${name}Renderer extends EntityRenderer<${name}Entity> {
private static final ResourceLocation texture = new ResourceLocation("${modid}:textures/entities/${data.customModelTexture}");
From cc72a8d8a6235972beca01077e9f6bc229f10fd7 Mon Sep 17 00:00:00 2001
From: KlemenDEV <16374228+KlemenDEV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 17:42:42 +0100
Subject: [PATCH 3/9] Some more validators
---
.../ui/validation/validators/JavaMemberNameValidator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/mcreator/ui/validation/validators/JavaMemberNameValidator.java b/src/main/java/net/mcreator/ui/validation/validators/JavaMemberNameValidator.java
index d973aa69098..338718f8bb9 100644
--- a/src/main/java/net/mcreator/ui/validation/validators/JavaMemberNameValidator.java
+++ b/src/main/java/net/mcreator/ui/validation/validators/JavaMemberNameValidator.java
@@ -91,7 +91,7 @@ public JavaMemberNameValidator(VTextField textField, boolean requireFirstLetterU
"Clock", "Shield", "Overworld", "Nether", "World", "Living", "Mob", "Monster", "Animal", "End",
"Stairs", "Slab", "Fence", "Wall", "Leaves", "TrapDoor", "Pane", "Door", "FenceGate", "Creature",
"Item", "Block", "BoneMeal", "Diamond", "Ore", "Gem", "Gold", "Iron", "Stack", "Emerald", "Entity",
- "Surface", "WoodButton", "StoneButton", "Flower", "Falling", "Furnace", "Bush", "Crop",
- "Structure"));
+ "Surface", "WoodButton", "StoneButton", "Flower", "Falling", "Furnace", "Bush", "Crop", "Structure",
+ "Blocks", "Items", "Biomes"));
}
From ab71347ab9671d92b3740155d7a667844b16c20d Mon Sep 17 00:00:00 2001
From: Will Z <65963376+willpill@users.noreply.github.com>
Date: Fri, 19 Jan 2024 11:47:39 -0500
Subject: [PATCH 4/9] add key (#4515)
---
platform/mac/Info.plist | 2 ++
1 file changed, 2 insertions(+)
diff --git a/platform/mac/Info.plist b/platform/mac/Info.plist
index 66c1ebee096..ed2debec3a6 100644
--- a/platform/mac/Info.plist
+++ b/platform/mac/Info.plist
@@ -18,6 +18,8 @@
mcreatorapp.icns
LSMinimumSystemVersion
11
+ LSRequiresNativeExecution
+
CFBundleInfoDictionaryVersion
6.0
From 0c789b0b7d9533c49763fd88ad465959ee0916d8 Mon Sep 17 00:00:00 2001
From: KlemenDEV <16374228+KlemenDEV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 21:17:55 +0100
Subject: [PATCH 5/9] Fix #4513
---
build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 1244cd1c800..90098634ed0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -121,7 +121,7 @@ dependencies {
}
javafx {
- version = '21.0.1'
+ version = '21.0.2'
modules = ['javafx.web', 'javafx.swing']
configurations = ['provided', 'win64', 'macX64', 'macAarch64', 'linux64'] // we provide natives during deployment or with SDK
}
From 07f5f473f01635ed8e4b415d9ce7336b2d2640aa Mon Sep 17 00:00:00 2001
From: KlemenDEV <16374228+KlemenDEV@users.noreply.github.com>
Date: Sun, 21 Jan 2024 11:09:35 +0100
Subject: [PATCH 6/9] Fix #4518
---
.../forge-1.19.4/templates/modbase/mod.java.ftl | 8 ++++++--
.../forge-1.19.4/templates/modbase/mods.toml.ftl | 3 +++
.../forge-1.20.1/templates/modbase/mod.java.ftl | 8 ++++++--
.../forge-1.20.1/templates/modbase/mods.toml.ftl | 3 +++
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mod.java.ftl b/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mod.java.ftl
index 262f1aa0e45..da8db58592e 100644
--- a/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mod.java.ftl
+++ b/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mod.java.ftl
@@ -49,8 +49,12 @@ import org.apache.logging.log4j.Logger;
}
private static final String PROTOCOL_VERSION = "1";
- public static final SimpleChannel PACKET_HANDLER = NetworkRegistry.newSimpleChannel(new ResourceLocation(MODID, MODID),
- () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals);
+ public static final SimpleChannel PACKET_HANDLER = NetworkRegistry.newSimpleChannel(
+ new ResourceLocation(MODID, MODID),
+ () -> PROTOCOL_VERSION,
+ PROTOCOL_VERSION::equals,
+ <#if settings.isServerSideOnly()>clientVersion -> true<#else>PROTOCOL_VERSION::equals#if>
+ );
private static int messageID = 0;
diff --git a/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl b/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl
index 8bc878ca72e..edd9eb60383 100644
--- a/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl
+++ b/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl
@@ -24,6 +24,9 @@ authors="${settings.getAuthor()}"
<#if settings.getDescription()?has_content>
description="${settings.getDescription()}"
#if>
+<#if settings.isServerSideOnly()>
+displayTest="IGNORE_SERVER_VERSION"
+#if>
[[dependencies.${settings.getModID()}]]
modId="minecraft"
diff --git a/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mod.java.ftl b/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mod.java.ftl
index 990bc5fd96e..d6ce8d18b80 100644
--- a/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mod.java.ftl
+++ b/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mod.java.ftl
@@ -50,8 +50,12 @@ import org.apache.logging.log4j.Logger;
}
private static final String PROTOCOL_VERSION = "1";
- public static final SimpleChannel PACKET_HANDLER = NetworkRegistry.newSimpleChannel(new ResourceLocation(MODID, MODID),
- () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals);
+ public static final SimpleChannel PACKET_HANDLER = NetworkRegistry.newSimpleChannel(
+ new ResourceLocation(MODID, MODID),
+ () -> PROTOCOL_VERSION,
+ PROTOCOL_VERSION::equals,
+ <#if settings.isServerSideOnly()>clientVersion -> true<#else>PROTOCOL_VERSION::equals#if>
+ );
private static int messageID = 0;
diff --git a/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl b/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl
index cf2847b2926..6e1668b835b 100644
--- a/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl
+++ b/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl
@@ -24,6 +24,9 @@ authors="${settings.getAuthor()}"
<#if settings.getDescription()?has_content>
description="${settings.getDescription()}"
#if>
+<#if settings.isServerSideOnly()>
+displayTest="IGNORE_SERVER_VERSION"
+#if>
[[dependencies.${settings.getModID()}]]
modId="minecraft"
From 2101af1d5736202cb30b3657236c36c4d3381492 Mon Sep 17 00:00:00 2001
From: KlemenDEV <16374228+KlemenDEV@users.noreply.github.com>
Date: Sun, 21 Jan 2024 11:26:10 +0100
Subject: [PATCH 7/9] [Bugfix] Changes to the workspace settings do not apply
to the mod files until workspace is re-opened or MCreator restarted + minor
refactor
---
.../template/base/BaseDataModelProvider.java | 37 +++++++++++--------
.../workspace/AbstractWorkspacePanel.java | 8 ++--
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/src/main/java/net/mcreator/generator/template/base/BaseDataModelProvider.java b/src/main/java/net/mcreator/generator/template/base/BaseDataModelProvider.java
index e445cd1efeb..64025a3b766 100644
--- a/src/main/java/net/mcreator/generator/template/base/BaseDataModelProvider.java
+++ b/src/main/java/net/mcreator/generator/template/base/BaseDataModelProvider.java
@@ -34,27 +34,32 @@ public class BaseDataModelProvider {
private static final Logger TEMPLATE_LOG = LogManager.getLogger("Template Generator LOG");
- private final Map providedData;
+ private final Map providedData = new HashMap<>();
+
+ private final Generator generator;
@SuppressWarnings("InstantiationOfUtilityClass") public BaseDataModelProvider(Generator generator) {
- Map providedDataBuilder = new HashMap<>();
- providedDataBuilder.put("generator", new GeneratorWrapper(generator));
- providedDataBuilder.put("w", generator.getWorkspace().getWorkspaceInfo());
- providedDataBuilder.put("modid", generator.getWorkspaceSettings().getModID());
- providedDataBuilder.put("JavaModName", generator.getWorkspaceSettings().getJavaModName());
- providedDataBuilder.put("package", generator.getWorkspaceSettings().getModElementsPackage());
- providedDataBuilder.put("settings", generator.getWorkspaceSettings());
- providedDataBuilder.put("fp", new FileProvider(generator));
- providedDataBuilder.put("mcc", generator.getMinecraftCodeProvider());
- providedDataBuilder.put("JavaConventions", new JavaConventions());
- providedDataBuilder.put("thelper", new TemplateHelper());
- providedDataBuilder.put("Log", TEMPLATE_LOG);
- providedDataBuilder.put("opt", new ProcedureCodeOptimizer());
- this.providedData = Collections.unmodifiableMap(providedDataBuilder);
+ this.generator = generator;
+
+ // Static helpers
+ providedData.put("Log", TEMPLATE_LOG);
+ providedData.put("thelper", new TemplateHelper());
+ providedData.put("opt", new ProcedureCodeOptimizer());
+ providedData.put("JavaConventions", new JavaConventions());
+
+ // Data that does not change for the current generator (BaseDataModelProvider is generator specific)
+ providedData.put("generator", new GeneratorWrapper(generator));
+ providedData.put("w", generator.getWorkspace().getWorkspaceInfo());
+ providedData.put("fp", new FileProvider(generator));
+ providedData.put("mcc", generator.getMinecraftCodeProvider());
}
public Map provide() {
- return providedData;
+ providedData.put("settings", generator.getWorkspaceSettings()); // workspaceSettings is not final!
+ providedData.put("modid", generator.getWorkspaceSettings().getModID());
+ providedData.put("JavaModName", generator.getWorkspaceSettings().getJavaModName());
+ providedData.put("package", generator.getWorkspaceSettings().getModElementsPackage());
+ return Collections.unmodifiableMap(providedData);
}
}
diff --git a/src/main/java/net/mcreator/ui/dialogs/workspace/AbstractWorkspacePanel.java b/src/main/java/net/mcreator/ui/dialogs/workspace/AbstractWorkspacePanel.java
index f4a4a821860..bd8842bb199 100644
--- a/src/main/java/net/mcreator/ui/dialogs/workspace/AbstractWorkspacePanel.java
+++ b/src/main/java/net/mcreator/ui/dialogs/workspace/AbstractWorkspacePanel.java
@@ -40,10 +40,10 @@
public abstract class AbstractWorkspacePanel extends JPanel {
- protected final WorkspaceDialogs.WorkspaceDialogPanel workspaceDialogPanel;
- protected final ValidationGroup validationGroup = new ValidationGroup();
- protected final VTextField workspaceFolder = new VTextField();
- protected final JButton selectWorkspaceFolder = new JButton("...");
+ final WorkspaceDialogs.WorkspaceDialogPanel workspaceDialogPanel;
+ final ValidationGroup validationGroup = new ValidationGroup();
+ final VTextField workspaceFolder = new VTextField();
+ final JButton selectWorkspaceFolder = new JButton("...");
private boolean workspaceFolderAltered = false;
From de4d164e333e3185514c0543dceacbebd48522ec Mon Sep 17 00:00:00 2001
From: Defeatomizer
Date: Sun, 21 Jan 2024 15:32:23 +0300
Subject: [PATCH 8/9] Multiple advancement triggers (#4339)
* Initial (all changes to the blocks, allow multiple triggers)
* Unnecessary field
* Invert builder
* Unneeded index
* XML fixes
* Changes
* "Criterion" is not regular word
* Bump
* Bump
* Bump
* FV bump
---------
Co-authored-by: KlemenDEV <16374228+KlemenDEV@users.noreply.github.com>
---
.../jsontriggers/biome_entered.json.ftl | 4 +-
.../jsontriggers/block_placed.json.ftl | 4 +-
.../jsontriggers/custom_trigger.json.ftl | 4 +-
.../jsontriggers/dimension_entered.json.ftl | 4 +-
.../jsontriggers/dimension_left.json.ftl | 4 +-
.../jsontriggers/item_consumed.json.ftl | 4 +-
.../jsontriggers/item_damaged.json.ftl | 4 +-
.../jsontriggers/item_in_inventory.json.ftl | 4 +-
.../jsontriggers/tick.json.ftl | 4 +-
.../templates/advancement.json.ftl | 2 +-
.../templates/json/advancement.json.ftl | 2 +-
.../jsontriggers/biome_entered.json.ftl | 4 +-
.../jsontriggers/block_placed.json.ftl | 4 +-
.../jsontriggers/custom_trigger.json.ftl | 4 +-
.../jsontriggers/dimension_entered.json.ftl | 4 +-
.../jsontriggers/dimension_left.json.ftl | 4 +-
.../jsontriggers/item_consumed.json.ftl | 4 +-
.../jsontriggers/item_damaged.json.ftl | 4 +-
.../jsontriggers/item_in_inventory.json.ftl | 4 +-
.../jsontriggers/tick.json.ftl | 4 +-
.../templates/advancement.json.ftl | 2 +-
.../templates/json/advancement.json.ftl | 2 +-
.../blockly/js/mcreator_blocks.js | 4 +-
.../jsontriggers/biome_entered.json | 1 +
.../jsontriggers/block_placed.json | 1 +
.../jsontriggers/custom_trigger.json | 7 +-
.../jsontriggers/dimension_entered.json | 1 +
.../jsontriggers/dimension_left.json | 1 +
.../jsontriggers/item_consumed.json | 1 +
.../jsontriggers/item_damaged.json | 1 +
.../jsontriggers/item_in_inventory.json | 1 +
plugins/mcreator-core/jsontriggers/tick.json | 7 +-
.../lang/texts.properties | 5 +-
.../datapack/BlocklyToJSONTrigger.java | 39 ++----
.../mcreator/element/GeneratableElement.java | 2 +-
.../element/converter/ConverterRegistry.java | 4 +-
.../converter/v2020_1/AchievementFixer.java | 4 +-
.../v2024_1/AdvancementTriggerInverter.java | 112 ++++++++++++++++++
.../mcreator/element/types/Achievement.java | 3 +-
.../TestWorkspaceDataProvider.java | 6 +-
40 files changed, 194 insertions(+), 86 deletions(-)
create mode 100644 src/main/java/net/mcreator/element/converter/v2024_1/AdvancementTriggerInverter.java
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/biome_entered.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/biome_entered.json.ftl
index 32c12b91bcb..f1841e6f717 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/biome_entered.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/biome_entered.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:location",
"conditions": {
"player": [
@@ -13,4 +13,4 @@
}
]
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/block_placed.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/block_placed.json.ftl
index a8e849036f0..dda21de828b 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/block_placed.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/block_placed.json.ftl
@@ -1,6 +1,6 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "${input$block}"
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/custom_trigger.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/custom_trigger.json.ftl
index a247648756a..60858acc265 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/custom_trigger.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/custom_trigger.json.ftl
@@ -1,3 +1,3 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:impossible"
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_entered.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_entered.json.ftl
index b5a17f34533..46f57fb251c 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_entered.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_entered.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:changed_dimension",
"conditions": {
<#if field$dimension == "Surface">
@@ -11,4 +11,4 @@
"to": "${generator.getResourceLocationForModElement(field$dimension.toString().replace("CUSTOM:", ""))}"
#if>
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_left.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_left.json.ftl
index a17b6b9d2aa..26717bf0bbe 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_left.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/dimension_left.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:changed_dimension",
"conditions": {
<#if field$dimension == "Surface">
@@ -11,4 +11,4 @@
"from": "${generator.getResourceLocationForModElement(field$dimension.toString().replace("CUSTOM:", ""))}"
#if>
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_consumed.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_consumed.json.ftl
index a495b1c45b2..ae06baa2a65 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_consumed.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_consumed.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:consume_item",
"conditions": {
"item": {
@@ -7,4 +7,4 @@
]
}
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_damaged.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_damaged.json.ftl
index 0d81bc52b33..9d492348770 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_damaged.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_damaged.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:item_durability_changed",
"conditions": {
"item": {
@@ -11,4 +11,4 @@
}
}
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_in_inventory.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_in_inventory.json.ftl
index ce0c2c394b7..73ee89d703a 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_in_inventory.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/item_in_inventory.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
@@ -13,4 +13,4 @@
}
]
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/tick.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/tick.json.ftl
index 763607c42b0..f374c0d6142 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/tick.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/jsontriggers/tick.json.ftl
@@ -1,3 +1,3 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:tick"
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.19.4/datapack-1.19.4/templates/advancement.json.ftl b/plugins/generator-1.19.4/datapack-1.19.4/templates/advancement.json.ftl
index 968e4f776fb..0a5715b7bd3 100644
--- a/plugins/generator-1.19.4/datapack-1.19.4/templates/advancement.json.ftl
+++ b/plugins/generator-1.19.4/datapack-1.19.4/templates/advancement.json.ftl
@@ -22,7 +22,7 @@
},
#if>
"criteria": {
- "${registryname}": ${triggercode}
+ ${triggercode?keep_before_last(",")}
}
<#if data.hasRewards()>,
"rewards": {
diff --git a/plugins/generator-1.19.4/forge-1.19.4/templates/json/advancement.json.ftl b/plugins/generator-1.19.4/forge-1.19.4/templates/json/advancement.json.ftl
index 2a6433394fa..87378f1d7d2 100644
--- a/plugins/generator-1.19.4/forge-1.19.4/templates/json/advancement.json.ftl
+++ b/plugins/generator-1.19.4/forge-1.19.4/templates/json/advancement.json.ftl
@@ -26,7 +26,7 @@
},
#if>
"criteria": {
- "${registryname}": ${triggercode}
+ ${triggercode?keep_before_last(",")}
}
<#if data.hasRewards()>,
"rewards": {
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/biome_entered.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/biome_entered.json.ftl
index 32c12b91bcb..f1841e6f717 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/biome_entered.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/biome_entered.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:location",
"conditions": {
"player": [
@@ -13,4 +13,4 @@
}
]
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/block_placed.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/block_placed.json.ftl
index 7e3eedbd51c..49e0b3a8773 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/block_placed.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/block_placed.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:placed_block",
"conditions": {
"location": [
@@ -8,4 +8,4 @@
}
]
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/custom_trigger.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/custom_trigger.json.ftl
index a247648756a..60858acc265 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/custom_trigger.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/custom_trigger.json.ftl
@@ -1,3 +1,3 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:impossible"
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_entered.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_entered.json.ftl
index b5a17f34533..46f57fb251c 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_entered.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_entered.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:changed_dimension",
"conditions": {
<#if field$dimension == "Surface">
@@ -11,4 +11,4 @@
"to": "${generator.getResourceLocationForModElement(field$dimension.toString().replace("CUSTOM:", ""))}"
#if>
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_left.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_left.json.ftl
index a17b6b9d2aa..26717bf0bbe 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_left.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/dimension_left.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:changed_dimension",
"conditions": {
<#if field$dimension == "Surface">
@@ -11,4 +11,4 @@
"from": "${generator.getResourceLocationForModElement(field$dimension.toString().replace("CUSTOM:", ""))}"
#if>
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_consumed.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_consumed.json.ftl
index a495b1c45b2..ae06baa2a65 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_consumed.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_consumed.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:consume_item",
"conditions": {
"item": {
@@ -7,4 +7,4 @@
]
}
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_damaged.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_damaged.json.ftl
index 0d81bc52b33..9d492348770 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_damaged.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_damaged.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:item_durability_changed",
"conditions": {
"item": {
@@ -11,4 +11,4 @@
}
}
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_in_inventory.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_in_inventory.json.ftl
index ce0c2c394b7..73ee89d703a 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_in_inventory.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/item_in_inventory.json.ftl
@@ -1,4 +1,4 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
@@ -13,4 +13,4 @@
}
]
}
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/tick.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/tick.json.ftl
index 763607c42b0..f374c0d6142 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/tick.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/jsontriggers/tick.json.ftl
@@ -1,3 +1,3 @@
-{
+"${registryname}_${cbi}": {
"trigger": "minecraft:tick"
-}
\ No newline at end of file
+},
\ No newline at end of file
diff --git a/plugins/generator-1.20.1/datapack-1.20.1/templates/advancement.json.ftl b/plugins/generator-1.20.1/datapack-1.20.1/templates/advancement.json.ftl
index 968e4f776fb..0a5715b7bd3 100644
--- a/plugins/generator-1.20.1/datapack-1.20.1/templates/advancement.json.ftl
+++ b/plugins/generator-1.20.1/datapack-1.20.1/templates/advancement.json.ftl
@@ -22,7 +22,7 @@
},
#if>
"criteria": {
- "${registryname}": ${triggercode}
+ ${triggercode?keep_before_last(",")}
}
<#if data.hasRewards()>,
"rewards": {
diff --git a/plugins/generator-1.20.1/forge-1.20.1/templates/json/advancement.json.ftl b/plugins/generator-1.20.1/forge-1.20.1/templates/json/advancement.json.ftl
index 2a6433394fa..87378f1d7d2 100644
--- a/plugins/generator-1.20.1/forge-1.20.1/templates/json/advancement.json.ftl
+++ b/plugins/generator-1.20.1/forge-1.20.1/templates/json/advancement.json.ftl
@@ -26,7 +26,7 @@
},
#if>
"criteria": {
- "${registryname}": ${triggercode}
+ ${triggercode?keep_before_last(",")}
}
<#if data.hasRewards()>,
"rewards": {
diff --git a/plugins/mcreator-core/blockly/js/mcreator_blocks.js b/plugins/mcreator-core/blockly/js/mcreator_blocks.js
index 910c6413b24..f4396f07b52 100644
--- a/plugins/mcreator-core/blockly/js/mcreator_blocks.js
+++ b/plugins/mcreator-core/blockly/js/mcreator_blocks.js
@@ -96,9 +96,9 @@ Blockly.Blocks['args_start'] = {
Blockly.Blocks['advancement_trigger'] = {
init: function () {
this.appendDummyInput().appendField(javabridge.t("blockly.block.advancement_trigger"));
- this.setPreviousStatement(true);
+ this.setStyle('hat_blocks');
+ this.setNextStatement(true);
this.setColour(150);
- this.setTooltip(javabridge.t("blockly.block.advancement_trigger.tooltip"));
}
};
diff --git a/plugins/mcreator-core/jsontriggers/biome_entered.json b/plugins/mcreator-core/jsontriggers/biome_entered.json
index 10eaf290337..0b3cf80e71f 100644
--- a/plugins/mcreator-core/jsontriggers/biome_entered.json
+++ b/plugins/mcreator-core/jsontriggers/biome_entered.json
@@ -7,6 +7,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 35,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/block_placed.json b/plugins/mcreator-core/jsontriggers/block_placed.json
index 516081604f0..7e3e4a442e6 100644
--- a/plugins/mcreator-core/jsontriggers/block_placed.json
+++ b/plugins/mcreator-core/jsontriggers/block_placed.json
@@ -7,6 +7,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 60,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/custom_trigger.json b/plugins/mcreator-core/jsontriggers/custom_trigger.json
index edc28044d89..6ed51639ad2 100644
--- a/plugins/mcreator-core/jsontriggers/custom_trigger.json
+++ b/plugins/mcreator-core/jsontriggers/custom_trigger.json
@@ -1,9 +1,12 @@
{
"args0": [],
"inputsInline": true,
- "nextStatement": null,
+ "previousStatement": null,
"colour": 150,
"mcreator": {
- "toolbox_id": "utility"
+ "toolbox_id": "utility",
+ "warnings": [
+ "utility_adv_trigger"
+ ]
}
}
\ No newline at end of file
diff --git a/plugins/mcreator-core/jsontriggers/dimension_entered.json b/plugins/mcreator-core/jsontriggers/dimension_entered.json
index dfeeb245462..ea44e7cac93 100644
--- a/plugins/mcreator-core/jsontriggers/dimension_entered.json
+++ b/plugins/mcreator-core/jsontriggers/dimension_entered.json
@@ -7,6 +7,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 35,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/dimension_left.json b/plugins/mcreator-core/jsontriggers/dimension_left.json
index dfeeb245462..ea44e7cac93 100644
--- a/plugins/mcreator-core/jsontriggers/dimension_left.json
+++ b/plugins/mcreator-core/jsontriggers/dimension_left.json
@@ -7,6 +7,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 35,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/item_consumed.json b/plugins/mcreator-core/jsontriggers/item_consumed.json
index 226f1a36e91..6efae9bc6f7 100644
--- a/plugins/mcreator-core/jsontriggers/item_consumed.json
+++ b/plugins/mcreator-core/jsontriggers/item_consumed.json
@@ -7,6 +7,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 60,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/item_damaged.json b/plugins/mcreator-core/jsontriggers/item_damaged.json
index 5a2474e4c23..641fc75a1bd 100644
--- a/plugins/mcreator-core/jsontriggers/item_damaged.json
+++ b/plugins/mcreator-core/jsontriggers/item_damaged.json
@@ -17,6 +17,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 60,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/item_in_inventory.json b/plugins/mcreator-core/jsontriggers/item_in_inventory.json
index 58a9b6a8d52..1ee70ebb120 100644
--- a/plugins/mcreator-core/jsontriggers/item_in_inventory.json
+++ b/plugins/mcreator-core/jsontriggers/item_in_inventory.json
@@ -17,6 +17,7 @@
}
],
"inputsInline": true,
+ "previousStatement": null,
"nextStatement": null,
"colour": 60,
"mcreator": {
diff --git a/plugins/mcreator-core/jsontriggers/tick.json b/plugins/mcreator-core/jsontriggers/tick.json
index edc28044d89..6ed51639ad2 100644
--- a/plugins/mcreator-core/jsontriggers/tick.json
+++ b/plugins/mcreator-core/jsontriggers/tick.json
@@ -1,9 +1,12 @@
{
"args0": [],
"inputsInline": true,
- "nextStatement": null,
+ "previousStatement": null,
"colour": 150,
"mcreator": {
- "toolbox_id": "utility"
+ "toolbox_id": "utility",
+ "warnings": [
+ "utility_adv_trigger"
+ ]
}
}
\ No newline at end of file
diff --git a/plugins/mcreator-localization/lang/texts.properties b/plugins/mcreator-localization/lang/texts.properties
index 7d6fabc084b..95168b89bf2 100644
--- a/plugins/mcreator-localization/lang/texts.properties
+++ b/plugins/mcreator-localization/lang/texts.properties
@@ -803,6 +803,7 @@ blockly.category.villagetasks=Village related tasks
blockly.category.blocks=Block related triggers
blockly.category.items=Item related triggers
blockly.category.utility=Utility triggers
+blockly.category.utility.description=These triggers should not be used in combination with others.
blockly.category.world=World related triggers
blockly.category.minecraft_components=Minecraft components
blockly.category.custom_variables=Custom variables
@@ -1450,8 +1451,7 @@ blockly.block.aitasks_container=AI task / goals list
blockly.block.aitasks_container.tip=Tasks higher on the list have a higher priority
blockly.block.aitasks_container.tooltip=This is the starting point of the AI task list.
blockly.block.cmdargs_start=Command entry point
-blockly.block.advancement_trigger=Grant this advancement to the player
-blockly.block.advancement_trigger.tooltip=Connect one trigger block that triggers this advancement to this block
+blockly.block.advancement_trigger=Grant if all criteria below are met
blockly.block.feature_container=Configured feature
blockly.block.feature_container.tooltip=This is the type of feature to define
blockly.block.feature_container.with_placement=with placement
@@ -3370,6 +3370,7 @@ blockly.warning.no_side_sync=Block {0} is not synced between client and server a
blockly.warning.no_more_argument=Adding more arguments after the message argument will make this branch of the command not work.
blockly.warning.no_item_extension_fuel=Getting the fuel power from a procedure triggered from a fuel item extension condition will crash the game due to recursive call.
blockly.warning.state_provider_int_property_warning=Data pack validation will FAIL if the block doesn't have the given property, or if the value is out of bounds.
+blockly.warning.utility_adv_trigger=Trigger {0} is a utility advancement trigger and should not be used in combination with other triggers.
blockly.warnings.binary_operations=One of dual input blocks input is empty. Using default type value for it.
blockly.warnings.boolean=Failed to find logic block value, using true as value.
blockly.warnings.flow_control=Failed to find loop break type. {0}
diff --git a/src/main/java/net/mcreator/blockly/datapack/BlocklyToJSONTrigger.java b/src/main/java/net/mcreator/blockly/datapack/BlocklyToJSONTrigger.java
index 80615290853..7b88caaf621 100644
--- a/src/main/java/net/mcreator/blockly/datapack/BlocklyToJSONTrigger.java
+++ b/src/main/java/net/mcreator/blockly/datapack/BlocklyToJSONTrigger.java
@@ -34,23 +34,19 @@
import org.apache.logging.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathFactory;
import java.io.StringReader;
-import java.util.Collections;
+import java.text.ParseException;
import java.util.List;
public class BlocklyToJSONTrigger extends BlocklyToCode {
private static final Logger LOG = LogManager.getLogger("Blockly2JSONTrigger");
- private boolean hasTrigger;
+ private boolean hasTrigger = false;
public BlocklyToJSONTrigger(Workspace workspace, ModElement parent, String sourceXML,
TemplateGenerator templateGenerator, IBlockGenerator... externalGenerators)
@@ -67,32 +63,15 @@ public BlocklyToJSONTrigger(Workspace workspace, ModElement parent, String sourc
Document doc = dBuilder.parse(new InputSource(new StringReader(sourceXML)));
doc.getDocumentElement().normalize();
- XPathFactory xpathFactory = XPathFactory.newInstance();
- XPath xpath = xpathFactory.newXPath();
+ Element start_block = BlocklyBlockUtil.getStartBlock(doc, editorType.startBlockName());
- NodeList blocks = (NodeList) xpath.evaluate("block", doc.getDocumentElement(), XPathConstants.NODESET);
+ // if there is no start block, we return empty string
+ if (start_block == null)
+ throw new ParseException("Could not find start block!", -1);
- hasTrigger = false;
-
- Element start_block = null;
- for (int i = 0; i < blocks.getLength(); i++) {
- Element start_block_candidate = (Element) blocks.item(i);
-
- List children = BlocklyBlockUtil.getBlockProcedureStartingWithNext(start_block_candidate);
- if (children.size() == 1) {
- if (children.get(0).getAttribute("type").equals(editorType.startBlockName())) {
- start_block = start_block_candidate;
- }
- }
- }
-
- if (start_block != null) {
- String type = start_block.getAttribute("type");
- if (!type.equals(editorType.startBlockName())) {
- hasTrigger = true;
- processBlockProcedure(Collections.singletonList(start_block));
- }
- }
+ List base_blocks = BlocklyBlockUtil.getBlockProcedureStartingWithNext(start_block);
+ hasTrigger = !base_blocks.isEmpty();
+ processBlockProcedure(base_blocks);
} catch (TemplateGeneratorException e) {
throw e;
} catch (Exception e) {
diff --git a/src/main/java/net/mcreator/element/GeneratableElement.java b/src/main/java/net/mcreator/element/GeneratableElement.java
index bbd61efee8c..d98de237dc0 100644
--- a/src/main/java/net/mcreator/element/GeneratableElement.java
+++ b/src/main/java/net/mcreator/element/GeneratableElement.java
@@ -42,7 +42,7 @@
public abstract class GeneratableElement {
- public static final int formatVersion = 58;
+ public static final int formatVersion = 59;
private static final Logger LOG = LogManager.getLogger("Generatable Element");
diff --git a/src/main/java/net/mcreator/element/converter/ConverterRegistry.java b/src/main/java/net/mcreator/element/converter/ConverterRegistry.java
index 98a7f01e838..2ebcb72768a 100644
--- a/src/main/java/net/mcreator/element/converter/ConverterRegistry.java
+++ b/src/main/java/net/mcreator/element/converter/ConverterRegistry.java
@@ -47,6 +47,7 @@
import net.mcreator.element.converter.v2023_2.PaintingFieldsFixer;
import net.mcreator.element.converter.v2023_3.*;
import net.mcreator.element.converter.v2023_4.*;
+import net.mcreator.element.converter.v2024_1.AdvancementTriggerInverter;
import net.mcreator.element.converter.v2024_1.ProcedureCustomDamageRemover;
import java.util.HashMap;
@@ -60,7 +61,8 @@ public class ConverterRegistry {
private static final Map, List> converters = new HashMap<>() {{
put(ModElementType.ADVANCEMENT, List.of(
new AchievementFixer(),
- new AdvancementTextureConverter()
+ new AdvancementTextureConverter(),
+ new AdvancementTriggerInverter()
));
put(ModElementType.ARMOR, List.of(
new ArmorTexturesConverter(),
diff --git a/src/main/java/net/mcreator/element/converter/v2020_1/AchievementFixer.java b/src/main/java/net/mcreator/element/converter/v2020_1/AchievementFixer.java
index 1b04d6beb07..29a4c4f58eb 100644
--- a/src/main/java/net/mcreator/element/converter/v2020_1/AchievementFixer.java
+++ b/src/main/java/net/mcreator/element/converter/v2020_1/AchievementFixer.java
@@ -32,8 +32,8 @@ public GeneratableElement convert(Workspace workspace, GeneratableElement input,
Achievement achievement = (Achievement) input;
achievement.showPopup = true;
achievement.announceToChat = true;
- achievement.triggerxml = ""
- + "";
+ achievement.triggerxml = ""
+ + "";
return achievement;
}
diff --git a/src/main/java/net/mcreator/element/converter/v2024_1/AdvancementTriggerInverter.java b/src/main/java/net/mcreator/element/converter/v2024_1/AdvancementTriggerInverter.java
new file mode 100644
index 00000000000..252d17008d7
--- /dev/null
+++ b/src/main/java/net/mcreator/element/converter/v2024_1/AdvancementTriggerInverter.java
@@ -0,0 +1,112 @@
+/*
+ * MCreator (https://mcreator.net/)
+ * Copyright (C) 2012-2020, Pylo
+ * Copyright (C) 2020-2023, Pylo, opensource contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.mcreator.element.converter.v2024_1;
+
+import com.google.gson.JsonElement;
+import net.mcreator.blockly.BlocklyBlockUtil;
+import net.mcreator.element.GeneratableElement;
+import net.mcreator.element.converter.IConverter;
+import net.mcreator.element.types.Achievement;
+import net.mcreator.ui.blockly.BlocklyEditorType;
+import net.mcreator.util.BlocklyHelper;
+import net.mcreator.util.XMLUtil;
+import net.mcreator.workspace.Workspace;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.List;
+
+public class AdvancementTriggerInverter implements IConverter {
+ private static final Logger LOG = LogManager.getLogger("AdvancementTriggerInverter");
+
+ @Override
+ public GeneratableElement convert(Workspace workspace, GeneratableElement input, JsonElement jsonElementInput) {
+ Achievement advancement = (Achievement) input;
+ try {
+ advancement.triggerxml = fixXML(advancement.triggerxml);
+ } catch (Exception e) {
+ LOG.warn("Failed to convert advancement " + input.getModElement().getName(), e);
+ }
+ return advancement;
+ }
+
+ @Override public int getVersionConvertingTo() {
+ return 59;
+ }
+
+ private String fixXML(String xml) throws Exception {
+ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+ Document doc = dBuilder.parse(new InputSource(new StringReader(xml)));
+ doc.getDocumentElement().normalize();
+ BlocklyHelper bh = new BlocklyHelper(doc);
+
+ XPathFactory xpathFactory = XPathFactory.newInstance();
+ XPath xpath = xpathFactory.newXPath();
+ NodeList blocks = (NodeList) xpath.evaluate("block", doc.getDocumentElement(), XPathConstants.NODESET);
+
+ Element trigger = null;
+ for (int i = 0; i < blocks.getLength(); i++) {
+ Element candidate = (Element) blocks.item(i);
+
+ List children = BlocklyBlockUtil.getBlockProcedureStartingWithNext(candidate);
+ if (children.size() == 1 && children.get(0).getAttribute("type")
+ .equals(BlocklyEditorType.JSON_TRIGGER.startBlockName())) {
+ trigger = candidate;
+ break;
+ }
+ }
+
+ Element start_block = bh.createBlock(BlocklyEditorType.JSON_TRIGGER.startBlockName());
+ start_block.setAttribute("deletable", "false");
+ start_block.setAttribute("x", "40");
+ start_block.setAttribute("y", "80");
+ Element next = doc.createElement("next");
+ if (trigger != null)
+ trigger.removeChild(XMLUtil.getFirstChildrenWithName(trigger, "next"));
+ else
+ trigger = bh.createBlock("custom_trigger");
+ next.appendChild(trigger);
+ start_block.appendChild(next);
+ doc.getDocumentElement().appendChild(start_block);
+
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ Transformer transformer = transformerFactory.newTransformer();
+ StringWriter writer = new StringWriter();
+ transformer.transform(new DOMSource(doc), new StreamResult(writer));
+
+ return writer.getBuffer().toString();
+ }
+}
diff --git a/src/main/java/net/mcreator/element/types/Achievement.java b/src/main/java/net/mcreator/element/types/Achievement.java
index f49f6aa82af..cd6b3055677 100644
--- a/src/main/java/net/mcreator/element/types/Achievement.java
+++ b/src/main/java/net/mcreator/element/types/Achievement.java
@@ -102,7 +102,8 @@ public boolean hasRewards() {
String triggerCode = blocklyToJSONTrigger.getGeneratedCode();
if (triggerCode.isEmpty())
- triggerCode = "{\"trigger\": \"minecraft:impossible\"}";
+ triggerCode = "\"%s\": {\"trigger\": \"minecraft:impossible\"}".formatted(
+ getModElement().getRegistryName());
additionalData.put("triggercode", triggerCode);
additionalData.put("triggerblocks", blocklyToJSONTrigger.getUsedBlocks());
diff --git a/src/test/java/net/mcreator/integration/TestWorkspaceDataProvider.java b/src/test/java/net/mcreator/integration/TestWorkspaceDataProvider.java
index 0c81c8be590..7900cd641db 100644
--- a/src/test/java/net/mcreator/integration/TestWorkspaceDataProvider.java
+++ b/src/test/java/net/mcreator/integration/TestWorkspaceDataProvider.java
@@ -322,9 +322,9 @@ private static GeneratableElement getExampleFor(ModElement modElement, boolean u
achievement.rewardRecipes.add("ExampleRecipe1");
achievement.rewardRecipes.add("ExampleRecipe2");
}
- achievement.triggerxml =
- ""
- + "";
+ achievement.triggerxml = ""
+ + ""
+ + "";
return achievement;
} else if (ModElementType.BIOME.equals(modElement.getType())) {
Biome biome = new Biome(modElement);
From 07c90a861244c90eb89d7e9aa1751908c05d4b96 Mon Sep 17 00:00:00 2001
From: Klemen <16374228+KlemenDEV@users.noreply.github.com>
Date: Sun, 21 Jan 2024 19:31:39 +0100
Subject: [PATCH 9/9] Remove Forge version lock (#4519)
---
.../forge-1.19.4/templates/modbase/mods.toml.ftl | 9 ---------
.../forge-1.20.1/templates/modbase/mods.toml.ftl | 9 ---------
plugins/mcreator-localization/lang/texts.properties | 4 ----
.../ui/dialogs/workspace/WorkspaceDialogs.java | 13 -------------
.../workspace/settings/WorkspaceSettings.java | 10 ----------
5 files changed, 45 deletions(-)
diff --git a/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl b/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl
index edd9eb60383..6d62093986a 100644
--- a/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl
+++ b/plugins/generator-1.19.4/forge-1.19.4/templates/modbase/mods.toml.ftl
@@ -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}"
diff --git a/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl b/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl
index 6e1668b835b..6deb228d612 100644
--- a/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl
+++ b/plugins/generator-1.20.1/forge-1.20.1/templates/modbase/mods.toml.ftl
@@ -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}"
diff --git a/plugins/mcreator-localization/lang/texts.properties b/plugins/mcreator-localization/lang/texts.properties
index 95168b89bf2..82ab49849d9 100644
--- a/plugins/mcreator-localization/lang/texts.properties
+++ b/plugins/mcreator-localization/lang/texts.properties
@@ -2932,10 +2932,6 @@ dialog.workspace_settings.section.external_apis.tooltip=Checkboxes to add
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=Disable Minecraft Forge version check?\
-
If you want to make sure users use the right Minecraft Forge version,\
-
uncheck this and enable Minecraft Forge version checking.
dialog.workspace_settings.section.advanced=Advanced settings
dialog.workspace_settings.server_side_only=Is this mod server-side only?
dialog.workspace_settings.lock_base_files_label=Lock base mod files?
Use ONLY if needed and you understand Java
diff --git a/src/main/java/net/mcreator/ui/dialogs/workspace/WorkspaceDialogs.java b/src/main/java/net/mcreator/ui/dialogs/workspace/WorkspaceDialogs.java
index 228887b8ac3..40507224522 100644
--- a/src/main/java/net/mcreator/ui/dialogs/workspace/WorkspaceDialogs.java
+++ b/src/main/java/net/mcreator/ui/dialogs/workspace/WorkspaceDialogs.java
@@ -152,7 +152,6 @@ static class WorkspaceDialogPanel extends JPanel {
JComboBox 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;
@@ -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() {
@@ -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")));
@@ -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());
@@ -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());
diff --git a/src/main/java/net/mcreator/workspace/settings/WorkspaceSettings.java b/src/main/java/net/mcreator/workspace/settings/WorkspaceSettings.java
index 2b29f0d49ae..0cb57379cb0 100644
--- a/src/main/java/net/mcreator/workspace/settings/WorkspaceSettings.java
+++ b/src/main/java/net/mcreator/workspace/settings/WorkspaceSettings.java
@@ -43,7 +43,6 @@
private String websiteURL;
private String license;
- private boolean disableForgeVersionCheck = true;
private boolean serverSideOnly = false;
private String updateURL;
@@ -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;
@@ -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;
}
@@ -232,10 +226,6 @@ public boolean isServerSideOnly() {
return serverSideOnly;
}
- public boolean isDisableForgeVersionCheck() {
- return disableForgeVersionCheck;
- }
-
public String getUpdateURL() {
return updateURL;
}