From 2c34b8c606a2bc397b05e263ef3b6594c4535615 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Sat, 4 Jan 2025 20:25:04 +0800 Subject: [PATCH] add getCon structorByArgs to documentation --- docs/apidoc/reflect.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/apidoc/reflect.md b/docs/apidoc/reflect.md index 2456270..b8bdd88 100644 --- a/docs/apidoc/reflect.md +++ b/docs/apidoc/reflect.md @@ -59,6 +59,9 @@ Each `ReflectClass` has the following methods: - `instanceOf(object: Object)` - Checks if the `object` is an instance of the class. +- `getConstructorByArgs(...argumentNames) : Function` + - Finds a constructor that matches the specified argument names. Eg: + - `ModAPI.reflect.getClassByName("ItemStack").getConstructorByArgs("blockIn", "amount")` ### ReflectMethod Definition