本文整理汇总了Java中net.minecraftforge.fml.common.LoadController类的典型用法代码示例。如果您正苦于以下问题:Java LoadController类的具体用法?Java LoadController怎么用?Java LoadController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoadController类属于net.minecraftforge.fml.common包,在下文中一共展示了LoadController类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: injectLoader
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Unsafe(Unsafe.REFLECT_API)
protected void injectLoader() {
List<ModContainer> mods = $(Loader.instance(), "mods");
$(Loader.instance(), "mods<", ImmutableList.builder().addAll(mods).add(this).build());
$(Loader.instance(), "namedMods<", Maps.uniqueIndex(mods, ModContainer::getModId));
LoadController modController = $(Loader.instance(), "modController");
Multimap<String, ModState> modStates = $(modController, "modStates");
modStates.put(getModId(), ModState.AVAILABLE);
Map<String, String> modNames = $(modController, "modNames");
modNames.put(getModId(), getName());
List<ModContainer> activeModList = $(modController, "activeModList");
activeModList = Lists.newArrayList(activeModList);
activeModList.add(this);
$(modController, "activeModList<", activeModList);
ImmutableMap<String,EventBus> eventChannels = $(modController, "eventChannels");
$(modController, "eventChannels<", ImmutableMap.builder().putAll(eventChannels).put(getModId(), new EventBus()).build());
}
示例2: setActiveContainer
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
/**
* Warning, this method break into the Loader and LoadController. It will change the current active ModContainer.
*
* @param container The mod container will be changed into.
*/
public static void setActiveContainer(ModContainer container)
{
ReflectionHelper.setPrivateValue(LoadController.class,
(LoadController) ReflectionHelper.getPrivateValue(Loader.class,
Loader.instance(),
"modController"),
container,
"activeContainer");
}
示例3: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller) {
return true;
}
示例4: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller) {
bus.register(this);
return true;
}
示例5: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller)
{
return true;
}
示例6: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller) {
return true;
}
示例7: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller)
{
bus.register(this);
return true;
}
示例8: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller) {
bus.register(this);
return true;
}
示例9: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller)
{
return false;
}
示例10: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller)
{
return true;
}
示例11: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller) { return true; }
示例12: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController controller) {
bus.register(this);
return true;
}
示例13: registerBus
import net.minecraftforge.fml.common.LoadController; //导入依赖的package包/类
@Override
public boolean registerBus(EventBus bus, LoadController lc)
{
bus.register(this);
return true;
}