当前位置: 首页>>代码示例>>Java>>正文


Java FMLLog.info方法代码示例

本文整理汇总了Java中cpw.mods.fml.common.FMLLog.info方法的典型用法代码示例。如果您正苦于以下问题:Java FMLLog.info方法的具体用法?Java FMLLog.info怎么用?Java FMLLog.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cpw.mods.fml.common.FMLLog的用法示例。


在下文中一共展示了FMLLog.info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dumpMaterials

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
public static void dumpMaterials() {
    if (MinecraftServer.getServer().cauldronConfig.dumpMaterials.getValue())
    {
        FMLLog.info("Cauldron Dump Materials is ENABLED. Starting dump...");
        for (int i = 0; i < 32000; i++)
        {
            Material material = Material.getMaterial(i);
            if (material != null)
            {
                FMLLog.info("Found material " + material + " with ID " + i);
            }
        }
        FMLLog.info("Cauldron Dump Materials complete.");
        FMLLog.info("To disable these dumps, set cauldron.dump-materials to false in bukkit.yml.");
    }
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:17,代码来源:CraftBlock.java

示例2: detectOptifine

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
private void detectOptifine()
{
    try
    {
        Class<?> optifineConfig = Class.forName("Config", false, Loader.instance().getModClassLoader());
        String optifineVersion = (String) optifineConfig.getField("VERSION").get(null);
        Map<String,Object> dummyOptifineMeta = ImmutableMap.<String,Object>builder().put("name", "Optifine").put("version", optifineVersion).build();
        ModMetadata optifineMetadata = MetadataCollection.from(getClass().getResourceAsStream("optifinemod.info"),"optifine").getMetadataForId("optifine", dummyOptifineMeta);
        optifineContainer = new DummyModContainer(optifineMetadata);
        FMLLog.info("Forge Mod Loader has detected optifine %s, enabling compatibility features",optifineContainer.getVersion());
    }
    catch (Exception e)
    {
        optifineContainer = null;
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:17,代码来源:FMLClientHandler.java

示例3: checkModList

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
public static String checkModList(Map<String,String> listData, Side side)
{
    List<ModContainer> rejects = Lists.newArrayList();
    for (Entry<ModContainer, NetworkModHolder> networkMod : NetworkRegistry.INSTANCE.registry().entrySet())
    {
        boolean result = networkMod.getValue().check(listData, side);
        if (!result)
        {
            rejects.add(networkMod.getKey());
        }
    }
    if (rejects.isEmpty())
    {
        return null;
    }
    else
    {
        FMLLog.info("Rejecting connection %s: %s", side, rejects);
        return String.format("Mod rejections %s",rejects);
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:22,代码来源:FMLNetworkHandler.java

示例4: SpaceStationRecipe

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
/**
 * @param objMap a map of the items required. Each entry should be an object of
 *               ItemStack, Item/Block or String(OreDict) and the amount of
 *               that item required
 */
public SpaceStationRecipe(HashMap<Object, Integer> objMap)
{
    for (final Object obj : objMap.keySet())
    {
        final Integer amount = objMap.get(obj);

        if (obj instanceof ItemStack)
        {
            this.input.put(((ItemStack) obj).copy(), amount);
        }
        else if (obj instanceof Item)
        {
            this.input.put(new ItemStack((Item) obj), amount);
        }
        else if (obj instanceof Block)
        {
            this.input.put(new ItemStack((Block) obj), amount);
        }
        else if (obj instanceof String)
        {
            FMLLog.info("While registering space station recipe, found " + OreDictionary.getOres((String) obj).size() + " type(s) of " + obj);
            this.input.put(OreDictionary.getOres((String) obj), amount);
        }
        else if (obj instanceof ArrayList)
        {
            this.input.put(obj, amount);
        }
        else
        {
            throw new RuntimeException("INVALID SPACE STATION RECIPE");
        }
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:39,代码来源:SpaceStationRecipe.java

示例5: fromBytes

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buffer)
{
    serverProtocolVersion = buffer.readByte();
    // Extended dimension support during login
    if (serverProtocolVersion > 1)
    {
        overrideDimension = buffer.readInt();
        FMLLog.fine("Server FML protocol version %d, 4 byte dimension received %d", serverProtocolVersion, overrideDimension);
    }
    else
    {
        FMLLog.info("Server FML protocol version %d, no additional data received", serverProtocolVersion);
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:16,代码来源:FMLHandshakeMessage.java

示例6: completeClientSideConnection

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
private void completeClientSideConnection(ConnectionType type)
{
    this.connectionType = type;
    FMLLog.info("[%s] Client side %s connection established", Thread.currentThread().getName(), this.connectionType.name().toLowerCase(Locale.ENGLISH));
    this.state = ConnectionState.CONNECTED;
    FMLCommonHandler.instance().bus().post(new FMLNetworkEvent.ClientConnectedToServerEvent(manager, this.connectionType.name()));
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:8,代码来源:NetworkDispatcher.java

示例7: completeServerSideConnection

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
private void completeServerSideConnection(ConnectionType type)
{
    this.connectionType = type;
    FMLLog.info("[%s] Server side %s connection established", Thread.currentThread().getName(), this.connectionType.name().toLowerCase(Locale.ENGLISH));
    this.state = ConnectionState.CONNECTED;
    FMLCommonHandler.instance().bus().post(new FMLNetworkEvent.ServerConnectionFromClientEvent(manager));
    scm.func_72355_a(manager, player, serverHandler);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:9,代码来源:NetworkDispatcher.java

示例8: handleVanilla

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
private boolean handleVanilla(Packet msg)
{
    if (state == ConnectionState.AWAITING_HANDSHAKE && msg instanceof S01PacketJoinGame)
    {
        handshakeChannel.pipeline().fireUserEventTriggered(msg);
    }
    else
    {
        FMLLog.info("Unexpected packet during modded negotiation - assuming vanilla or keepalives : %s", msg.getClass().getName());
    }
    return false;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:13,代码来源:NetworkDispatcher.java

示例9: userEventTriggered

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
{
    if (evt instanceof ConnectionType && side == Side.SERVER)
    {
        FMLLog.info("Timeout occurred, assuming a vanilla client");
        kickVanilla();
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:10,代码来源:NetworkDispatcher.java

示例10: testMessageValidity

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
@Override
protected void testMessageValidity(FMLProxyPacket msg)
{
    if (msg.payload().getByte(0) == 0 && msg.payload().readableBytes() > 2)
    {
        FMLLog.severe("The connection appears to have sent an invalid FML packet of type 0, this is likely because it think's it's talking to 1.6.4 FML");
        FMLLog.info("Bad data :");
        for (String l : Splitter.on('\n').split(ByteBufUtils.getContentDump(msg.payload()))) {
            FMLLog.info("\t%s",l);
        }
        throw new FMLNetworkException("Invalid FML packet");
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:14,代码来源:FMLRuntimeCodec.java

示例11: explore

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
public List<ModContainer> explore(ASMDataTable table)
{
    this.table = table;
    this.mods = sourceType.findMods(this, table);
    if (!baseModCandidateTypes.isEmpty())
    {
        FMLLog.info("Attempting to reparse the mod container %s", getModContainer().getName());
        this.mods = sourceType.findMods(this, table);
    }
    return this.mods;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:12,代码来源:ModCandidate.java

示例12: getPriority

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
private static int getPriority(IRecipe recipe)
{
    Class<?> cls = recipe.getClass();
    Integer ret = priorities.get(cls);

    if (ret == null)
    {
        if (!warned.contains(cls))
        {
            FMLLog.info("  Unknown recipe class! %s Modder please refer to %s", cls.getName(), RecipeSorter.class.getName());
            warned.add(cls);
        }
        cls = cls.getSuperclass();
        while (cls != Object.class)
        {
            ret = priorities.get(cls);
            if (ret != null)
            {
                priorities.put(recipe.getClass(), ret);
                FMLLog.fine("    Parent Found: %d - %s", ret.intValue(), cls.getName());
                return ret.intValue();
            }
        }
    }

    return ret == null ? 0 : ret.intValue();
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:28,代码来源:RecipeSorter.java

示例13: requestTicket

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
/**
 * Request a chunkloading ticket of the appropriate type for the supplied mod
 *
 * @param mod The mod requesting a ticket
 * @param world The world in which it is requesting the ticket
 * @param type The type of ticket
 * @return A ticket with which to register chunks for loading, or null if no further tickets are available
 */
public static Ticket requestTicket(Object mod, World world, Type type)
{
    ModContainer container = getContainer(mod);
    if (container == null)
    {
        FMLLog.log(Level.ERROR, "Failed to locate the container for mod instance %s (%s : %x)", mod, mod.getClass().getName(), System.identityHashCode(mod));
        return null;
    }
    String modId = container.getModId();
    if (!callbacks.containsKey(modId))
    {
        FMLLog.severe("The mod %s has attempted to request a ticket without a listener in place", modId);
        throw new RuntimeException("Invalid ticket request");
    }

    int allowedCount = getMaxTicketLengthFor(modId);

    if (tickets.get(world).get(modId).size() >= allowedCount)
    {
        if (!warnedMods.contains(modId))
        {
            FMLLog.info("The mod %s has attempted to allocate a chunkloading ticket beyond it's currently allocated maximum : %d", modId, allowedCount);
            warnedMods.add(modId);
        }
        return null;
    }
    Ticket ticket = new Ticket(modId, type, world);
    tickets.get(world).put(modId, ticket);

    return ticket;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:40,代码来源:ForgeChunkManager.java

示例14: setWorld

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
public static void setWorld(int id, WorldServer world)
{
    if (world != null)
    {
        worlds.put(id, world);
        weakWorldMap.put(world, world);
        MinecraftServer.func_71276_C().worldTickTimes.put(id, new long[100]);
        FMLLog.info("Loading dimension %d (%s) (%s)", id, world.func_72912_H().func_76065_j(), world.func_73046_m());
    }
    else
    {
        worlds.remove(id);
        MinecraftServer.func_71276_C().worldTickTimes.remove(id);
        FMLLog.info("Unloading dimension %d", id);
    }

    ArrayList<WorldServer> tmp = new ArrayList<WorldServer>();
    if (worlds.get( 0) != null)
        tmp.add(worlds.get( 0));
    if (worlds.get(-1) != null)
        tmp.add(worlds.get(-1));
    if (worlds.get( 1) != null)
        tmp.add(worlds.get( 1));

    for (Entry<Integer, WorldServer> entry : worlds.entrySet())
    {
        int dim = entry.getKey();
        if (dim >= -1 && dim <= 1)
        {
            continue;
        }
        tmp.add(entry.getValue());
    }

    MinecraftServer.func_71276_C().field_71305_c = tmp.toArray(new WorldServer[tmp.size()]);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:37,代码来源:DimensionManager.java

示例15: scan

import cpw.mods.fml.common.FMLLog; //导入方法依赖的package包/类
private static void scan(final LaunchClassLoader loader, final List<DiscoverCandidate> candidates, final DataScanner scanner) {
    for (final DiscoverCandidate candidate : candidates) {
        FastDiscoverer.sNeedInjection = false;
        for (final InputStream is : candidate) {
            scanner.scanClass(is);
        }
        if (FastDiscoverer.sNeedInjection) {
            FMLLog.info("Found Fan in " + candidate + ", injecting into classloader...", new Object[0]);
            candidate.injectClassLoader(loader);
        }
    }
}
 
开发者ID:CyberdyneCC,项目名称:ThermosRebased,代码行数:13,代码来源:FastDiscoverer.java


注:本文中的cpw.mods.fml.common.FMLLog.info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。