本文整理匯總了Java中net.minecraft.client.resources.IReloadableResourceManager類的典型用法代碼示例。如果您正苦於以下問題:Java IReloadableResourceManager類的具體用法?Java IReloadableResourceManager怎麽用?Java IReloadableResourceManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IReloadableResourceManager類屬於net.minecraft.client.resources包,在下文中一共展示了IReloadableResourceManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
public static void init()
{
if (initialized)
return;
initialized = true;
IResourceManager rm = Minecraft.getMinecraft().getResourceManager();
if (rm instanceof IReloadableResourceManager)
{
((IReloadableResourceManager) rm).registerReloadListener(__ ->
{
loadedModels.clear();
reloadCount++;
});
}
}
示例2: preInit
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void preInit(FMLPreInitializationEvent e) {
super.preInit(e);
ModItems.initClient();
ModelLoaderRegistry.registerLoader(new BakedModelLoader());
ModelLoaderRegistry.registerLoader(ModelSeed.LoaderSeeds.INSTANCE);
ModelLoaderRegistry.registerLoader(ModelWrappedFood.LoaderWrappedFood.INSTANCE);
IResourceManager manager = FMLClientHandler.instance().getClient().getResourceManager();
if(manager !=null && manager instanceof IReloadableResourceManager){
((IReloadableResourceManager)manager).registerReloadListener(new GuidePageLoader());
((IReloadableResourceManager)manager).registerReloadListener(this);
}
MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
MinecraftForge.EVENT_BUS.register(new DisguiseClientHandler());
ModBlocks.initClient();
ModEntites.initClient();
OBJLoader.INSTANCE.addDomain(CrystalMod.MODID);
}
示例3: init
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
void init() {
LiteLoader.getInput().registerKeyBinding(SETTINGS_GUI);
this.config = new PonyConfig();
this.ponyManager = new PonyManager(config);
LiteLoader.getInstance().registerExposable(config, null);
IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
irrm.registerReloadListener(this.ponyManager);
MetadataSerializer ms = Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer;
ms.registerMetadataSectionType(new PonyDataSerialzier(), IPonyData.class);
// This also makes it the default gateway server.
SkinServer.defaultServers.add("legacy:http://minelpskins.voxelmodpack.com;http://minelpskinmanager.voxelmodpack.com");
}
示例4: init
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void init(File configPath) {
// register config
LiteLoader.getInstance().registerExposable(this, null);
// try it initialize voxelmenu button
try {
Class<?> ex = Class.forName("com.thevoxelbox.voxelmenu.GuiMainMenuVoxelBox");
Method mRegisterCustomScreen = ex.getDeclaredMethod("registerCustomScreen", Class.class, String.class);
mRegisterCustomScreen.invoke(null, GuiSkins.class, "HD Skins Manager");
} catch (ClassNotFoundException var4) {
// voxelmenu's not here, man
} catch (Exception var5) {
var5.printStackTrace();
}
IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
irrm.registerReloadListener(HDSkinManager.INSTANCE);
}
示例5: preInit
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
settings.init();
MinecraftForge.EVENT_BUS.register(this);
clientKeyboardHandler = new ClientKeyboardHandler(this);
TaleCraftClientCommands.init();
IReloadableResourceManager resManager = (IReloadableResourceManager) mc.getResourceManager();
resManager.registerReloadListener(this);
clientTickQeue = new ConcurrentLinkedDeque<Runnable>();
clientRenderer = new ClientRenderer(this);
clientRenderer.preInit();
}
示例6: postInit
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
public void postInit()
{
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() {
private boolean ranOnce = false;
public void onResourceManagerReload(IResourceManager resourcemanager) {
if (!this.ranOnce) {
this.ranOnce = true;
return;
}
StructuralLevelClientData.loadBaseTextureData();
if (StructuralLevel.LEVELS != null) {
for (StructuralLevel level : StructuralLevel.LEVELS) {
if (level.levelNum != 0) {
level.clientData.generateIcons();
StringTranslate.inject(new ByteArrayInputStream(("item.upgrade.structural." + String.valueOf(level.levelNum) + ".name=" + StatCollector.translateToLocal("item.upgrade.structural") + " " + Utils.romanNumeral(level.levelNum) + " (" + level.clientData.getMaterialName() + ")").getBytes()));
}
}
}
StructuralLevelClientData.unloadBaseTextureData();
}
});
}
示例7: registerTileEntities
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void registerTileEntities() {
super.registerTileEntities();
IReloadableResourceManager IRRM = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
IRRM.registerReloadListener(this);
RenderManager rm = Minecraft.getMinecraft().getRenderManager();
RenderingRegistry.registerEntityRenderingHandler(EntityStone.class, new RenderEntityStone());
RenderingRegistry.registerEntityRenderingHandler(EntityMobHorse.class, new RenderHorse(rm, new ModelHorse(), 0.75f));
RenderingRegistry.registerEntityRenderingHandler(EntityForestSpider.class, new RenderForestSpider(rm));
RenderingRegistry.registerEntityRenderingHandler(EntityCoalPoweredMinecartVC.class, new RenderMinecart(rm));
RenderingRegistry.registerEntityRenderingHandler(EntityEmptyMinecartVC.class, new RenderMinecart(rm));
RenderingRegistry.registerEntityRenderingHandler(EntityCowVC.class, new RenderCow(rm, new ModelCowVC(), 0.7F));
RenderingRegistry.registerEntityRenderingHandler(EntitySheepVC.class, new RenderSheep(rm, new ModelSheep2(), 0.7F));
}
示例8: init
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
public void init() {
// Set global settings
settings = new TabbySettings();
LiteLoader.getInstance().registerExposable(settings, null);
spellcheck = new Spellcheck(getDataFolder());
// Keeps the current language updated whenever it is changed.
IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
irrm.registerReloadListener(spellcheck);
bus.register(new ChatAddonAntiSpam());
bus.register(new FilterAddon());
bus.register(new ChatLogging(new File("logs/chat")));
}
示例9: postInit
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event)
{
super.postInit(event);
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(resourceManager -> {
HarshenAPIHandler.register();
CauldronBlock.registerModels();
HarshenCastle.LOGGER.info("All recipes loaded");
});
}
示例10: init
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent event) {
super.init(event);
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(ShaderHandler.instance);
ShaderHandler.instance.init();
}
示例11: init
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void init() {
FirstAid.logger.debug("Loading ClientProxy");
MinecraftForge.EVENT_BUS.register(ClientEventHandler.class);
ClientRegistry.registerKeyBinding(showWounds);
GuiIngameForge.renderHealth = FirstAidConfig.overlay.showVanillaHealthBar;
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(manager -> HUDHandler.rebuildTranslationTable());
EventCalendar.checkDate();
}
示例12: registerFontRenderer
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public static void registerFontRenderer(Minecraft mc, FontRenderer renderer) throws Exception {
if (mc.gameSettings.language != null) {
renderer.setUnicodeFlag(mc.isUnicode());
renderer.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
}
((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(renderer);
}
示例13: registerEventHandler
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void registerEventHandler() {
MinecraftForge.EVENT_BUS.register((Object)new EventHandlerClient());
FMLCommonHandler.instance().bus().register((Object)new EventHandlerClient());
((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener((IResourceManagerReloadListener)new LiquidColorRegistry());
((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener((IResourceManagerReloadListener)new ParticleHelperClient());
ExtraUtils.handlesClientMethods = true;
if (Loader.isModLoaded("ForgeMultipart")) {
RenderBlockConnectedTextures.fakeRender = new FakeRenderBlocksMultiPart();
}
ClientCommandHandler.instance.registerCommand((ICommand)new CommandHologram());
ClientCommandHandler.instance.registerCommand((ICommand)new CommandUUID());
KeyHandler.INSTANCE.register();
super.registerEventHandler();
}
示例14: setFont
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
public static void setFont(Minecraft mc, boolean custom) {
if (mc.fontRendererObj == null) return;
ResourceLocation fontLocation = custom? new ResourceLocation(SAOCore.MODID, "textures/ascii.png"): new ResourceLocation("textures/font/ascii.png");
GameSettings gs = mc.gameSettings;
mc.fontRendererObj = new FontRenderer(gs, fontLocation, mc.getTextureManager(), false);
if (gs.language != null) {
mc.fontRendererObj.setUnicodeFlag(mc.isUnicode());
mc.fontRendererObj.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
}
((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(mc.fontRendererObj);
}
示例15: postInit
import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event) {
super.postInit(event);
if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager)
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);
}