mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 15:33:18 +00:00
Net handling pass 2. Tidied up login packet sourcing, generate registry packets.
This commit is contained in:
1 parent
9f2c7c881c
commit
abacf8e141
17 files changed
+787
-220
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package net.minecraftforge.fml.util;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Three-consumer version of consumer. Allows wrapping methods with three arguments.
|
||||
*/
|
||||
public interface ThreeConsumer<T, U, V>
|
||||
{
|
||||
|
||||
/**
|
||||
* Bind arguments to the three consumer to generate a consumer.
|
||||
*
|
||||
* <pre>
|
||||
* {@code
|
||||
* ThreeConsumer.bindArgs(MyClass::instanceMethodReference, arg1, arg2).apply(myClassInstance)
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @return a Consumer which has the second and third arguments bound.
|
||||
*/
|
||||
static <T, U, V> Consumer<T> bindArgs(ThreeConsumer<? super T, U, V> c, U arg2, V arg3)
|
||||
{
|
||||
return (arg1) -> c.accept(arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
void accept(T t, U u, V v);
|
||||
}
|
||||
Reference in new issue
Block a user