mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-03 12:49:11 +00:00
Merge branch 'mc-1.19.x' into mc-1.20.x
This commit is contained in:
commit
9a48b53a83
@ -76,7 +76,7 @@ final class MethodSupplierImpl<T> implements MethodSupplier<T> {
|
||||
for (var extra : source.getExtra()) {
|
||||
var extraMethods = getMethods(extra.getClass());
|
||||
if (!extraMethods.isEmpty()) hasMethods = true;
|
||||
for (var method : extraMethods) consumer.accept(object, method.name(), method.method(), method);
|
||||
for (var method : extraMethods) consumer.accept(extra, method.name(), method.method(), method);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class MethodTest {
|
||||
|
||||
@Test
|
||||
public void testExtra() {
|
||||
ComputerBootstrap.run("assert(extra.go, 'go')\nassert(extra.go2, 'go2')",
|
||||
ComputerBootstrap.run("assert(extra.go() == nil, 'go')\nassert(extra.go2() == 456, 'go2')",
|
||||
x -> x.addApi(new ExtraObject()),
|
||||
50);
|
||||
}
|
||||
@ -163,7 +163,8 @@ public class MethodTest {
|
||||
}
|
||||
|
||||
@LuaFunction
|
||||
public final void go2() {
|
||||
public final int go2() {
|
||||
return 456;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user