Closed Krutoy242 closed 10 months ago
I dont know Java well, but considering latest commit, maybe this function should be changed too? https://github.com/friendlyhj/ZenUtils/blob/ac9e64a86ff2cc98d9996c3825e9983bd5da8dbb/src/main/java/youyihj/zenutils/api/util/StaticString.java#L735-L738
This method is no problem. The issue is string[]
is not Object[]
, ZS needs to cast string[]
to another array, but there is other methods that accept int[]
float[]
. string[]
can be cast to these array type, too. So ZS doesn't know which array type to cast to, and use which method then.
Is that means i cant use startIndex
and endIndex
for joining string[]
array at all?
This zs code have error too:
print(mods.zenutils.StaticString.join(['a','b'] as string[], ',', 0, 1));
12 methods available but none matches the parameters (string[], string, int, int)
Oh, there also is conflicted method that accept int[], string, int, int
. Is this problem urgent? If not, I'm going to fix it in next update.
No, its not urgent. I will use my own implementation of join 😀 https://github.com/Krutoy242/Craft.zs/blob/885c0ee8e0029fa3b8303242d0d468c393d4161e/serialize.zs#L34-L43
Seems like
mods.zenutils.StaticString.join
should work with any types of CraftTweaker arrays, but it cant work withstring[]
Both this lines erroring:
Error in
crafttweaker.log
: