mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Add in some more stuff for handling key bindings, rendering
This commit is contained in:
1 parent
a1ca27b997
commit
edb0ba811f
16 files changed
+450
-59
No files matched your search
@@ -19,6 +19,7 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
@@ -33,9 +34,11 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.IConsoleHandler;
|
||||
import cpw.mods.fml.common.ICraftingHandler;
|
||||
import cpw.mods.fml.common.IDispenseHandler;
|
||||
import cpw.mods.fml.common.IKeyHandler;
|
||||
import cpw.mods.fml.common.INetworkHandler;
|
||||
import cpw.mods.fml.common.IPickupNotifier;
|
||||
import cpw.mods.fml.common.IPlayerTracker;
|
||||
import cpw.mods.fml.common.IBlockRenderInfo;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.LoaderException;
|
||||
@@ -51,6 +54,9 @@ public class ModLoaderModContainer implements ModContainer
|
||||
private ArrayList<String> dependencies;
|
||||
private ArrayList<String> preDependencies;
|
||||
private ArrayList<String> postDependencies;
|
||||
private ArrayList<IBlockRenderInfo> blockRenderInfos;
|
||||
private ArrayList<IKeyHandler> keyHandlers;
|
||||
|
||||
public ModLoaderModContainer(Class <? extends BaseMod > modClazz, File modSource)
|
||||
{
|
||||
this.modClazz = modClazz;
|
||||
@@ -551,4 +557,28 @@ public class ModLoaderModContainer implements ModContainer
|
||||
{
|
||||
return ticks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param renderId
|
||||
* @param inventoryRenderer
|
||||
*/
|
||||
public void addRenderHandler(IBlockRenderInfo handler)
|
||||
{
|
||||
blockRenderInfos.add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param keyHandler
|
||||
* @param allowRepeat
|
||||
*/
|
||||
public void addKeyHandler(IKeyHandler handler)
|
||||
{
|
||||
keyHandlers.add(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IKeyHandler> getKeys()
|
||||
{
|
||||
return keyHandlers;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user