mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-21 04:42:20 +00:00
Mark all the non optional parameters as optional, to avoid Zenscript warning in logs (#9)
This commit is contained in:
1 parent
a63c24df82
commit
24793fc832
6 files changed
+30
-26
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user