mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 01:55:06 +00:00
Implement a GUI packet and GUIFACTORY for triggering from the server.
Signed-off-by: cpw <[email protected]>
This commit is contained in:
12 files changed
+98
-74
No files matched your search
@@ -115,11 +115,11 @@ public abstract class ModContainer
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Optional<T> getCustomExtension(ExtensionPoint point) {
|
||||
public <T> Optional<T> getCustomExtension(ExtensionPoint<T> point) {
|
||||
return Optional.ofNullable((T)extensionPoints.getOrDefault(point,()-> null).get());
|
||||
}
|
||||
|
||||
public <T> void registerExtensionPoint(ExtensionPoint point, Supplier<T> extension)
|
||||
public <T> void registerExtensionPoint(ExtensionPoint<T> point, Supplier<T> extension)
|
||||
{
|
||||
extensionPoints.put(point, extension);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user