mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-01 21:17:45 -05:00
Add EventFactory.attachToForge
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package me.shedaniel.architectury.event;
|
||||
|
||||
import com.google.common.reflect.AbstractInvocationHandler;
|
||||
import me.shedaniel.architectury.ExpectPlatform;
|
||||
import net.jodah.typetools.TypeResolver;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
@@ -112,6 +113,11 @@ public final class EventFactory {
|
||||
}));
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static <T> Event<Consumer<T>> attachToForge(Event<Consumer<T>> event) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
private static class EventImpl<T> implements Event<T> {
|
||||
private final Function<T[], T> function;
|
||||
private T invoker = null;
|
||||
|
||||
Reference in New Issue
Block a user