Mark all the non optional parameters as optional, to avoid Zenscript warning in logs (#9)

This commit is contained in:
boubou19 authored and GitHub committed 2026-07-27 20:40:57 +07:00
1 parent a63c24df82
commit 24793fc832
6 files changed
+30 -26

No files matched your search

+10 -10
View File
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e1118b4c7c2858d28154d086dbff010e/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3689d0bcdd77ac01674ba3c9dbbe94d0/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/643f404f769811f5f265fd66f7af5d89/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
toolchainVersion=25
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.26'
}
@@ -96,7 +96,7 @@ public class Grind {
@ZenMethod
public static void addRecipe(IItemStack outputStack, IItemStack inputStack, @Optional IItemStack outputStack2,
@Optional float outputStack2Chance, @Optional IItemStack outputStack3, @Optional float outputStack3Chance,
int inputEnergy) {
@Optional int inputEnergy) {
if (inputStack == null || outputStack == null) {
LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
return;
@@ -33,7 +33,7 @@ public class Casting {
@ZenMethod
public static void addBasinRecipe(IItemStack output, ILiquidStack metal, @Optional IItemStack cast,
@Optional boolean consume, int delay) {
@Optional boolean consume, @Optional int delay) {
if (metal == null || output == null) {
LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
return;
@@ -47,7 +47,7 @@ public class Casting {
@ZenMethod
public static void addTableRecipe(IItemStack output, ILiquidStack metal, @Optional IItemStack cast,
@Optional boolean consume, int delay) {
@Optional boolean consume, @Optional int delay) {
if (metal == null || output == null) {
LogHelper.logError(String.format("Required parameters missing for %s Recipe.", name));
return;
@@ -20,8 +20,9 @@ public class ToolStats {
*/
@java.lang.Deprecated
@ZenMethod
public static void set(String material, @Optional String name, int level, int durability, int speed, int damage,
double handle, int reinforced, double stonebound, String style, String ability) {
public static void set(String material, @Optional String name, @Optional int level, @Optional int durability,
@Optional int speed, @Optional int damage, @Optional double handle, @Optional int reinforced,
@Optional double stonebound, @Optional String style, @Optional String ability) {
if (name == null) name = material + " ";
MineTweakerAPI.apply(
new SetToolStats(
@@ -46,8 +47,9 @@ public class ToolStats {
*/
@java.lang.Deprecated
@ZenMethod
public static void set(String material, @Optional String name, int level, int durability, int speed, int damage,
double handle, int reinforced, double stonebound, String style, int primaryColor) {
public static void set(@Optional String material, @Optional String name, @Optional int level,
@Optional int durability, @Optional int speed, @Optional int damage, @Optional double handle,
@Optional int reinforced, @Optional double stonebound, @Optional String style, @Optional int primaryColor) {
if (name == null) name = material + " ";
MineTweakerAPI.apply(
new SetToolStats(
@@ -68,8 +70,9 @@ public class ToolStats {
}
@ZenMethod
public static void setStats(String material, @Optional String name, int level, int durability, int speed,
int damage, double handle, int reinforced, double stonebound, String style, int primaryColor) {
public static void setStats(String material, @Optional String name, @Optional int level, @Optional int durability,
@Optional int speed, @Optional int damage, @Optional double handle, @Optional int reinforced,
@Optional double stonebound, @Optional String style, @Optional int primaryColor) {
if (name == null) name = material + " ";
MineTweakerAPI.apply(
new SetToolStats(
@@ -78,8 +78,8 @@ public class Research {
}
@ZenMethod
public static void addResearch(String key, String tab, @Optional String aspects, int x, int y, int difficulty,
String domain, String path) {
public static void addResearch(String key, String tab, @Optional String aspects, @Optional int x, @Optional int y,
@Optional int difficulty, @Optional String domain, @Optional String path) {
MineTweakerAPI.apply(
new AddResearch(
@@ -97,8 +97,8 @@ public class Research {
}
@ZenMethod
public static void addResearch(String key, String tab, @Optional String aspects, int x, int y, int difficulty,
IItemStack item) {
public static void addResearch(String key, String tab, @Optional String aspects, @Optional int x, @Optional int y,
@Optional int difficulty, @Optional IItemStack item) {
MineTweakerAPI.apply(
new AddResearch(
@@ -116,8 +116,9 @@ public class Research {
}
@ZenMethod
public static void addResearch(String key, String tab, @Optional String aspects, int x, int y, int difficulty,
IItemStack item, IItemStack[] triggers, String[] entTriggers, String aspectsTrigger) {
public static void addResearch(String key, String tab, @Optional String aspects, @Optional int x, @Optional int y,
@Optional int difficulty, @Optional IItemStack item, @Optional IItemStack[] triggers,
@Optional String[] entTriggers, @Optional String aspectsTrigger) {
MineTweakerAPI.apply(
new AddResearch(