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


Java FMLLog类代码示例

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


FMLLog类属于cpw.mods.fml.common包,在下文中一共展示了FMLLog类的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: transform

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
@Override
public void transform(final ImagineASM asm) {
    if (asm.is("climateControl.utils.ChunkGeneratorExtractor")) {
        boolean undergroundBiomesInstalled = false;
        try {
            Class.forName("exterminatorJeff.undergroundBiomes.worldGen.ChunkProviderWrapper");
            undergroundBiomesInstalled = true;
        } catch (Exception ignored) {
        }
        if (!undergroundBiomesInstalled) {
            FMLLog.log(Level.INFO, "Uranium: Patching " + asm.getActualName() + " for compatibility with Climate Control");
            extractFrom(asm, asm.method("extractFrom",
                    "(Lnet/minecraft/world/WorldServer;)Lnet/minecraft/world/chunk/IChunkProvider;").instructions());
        }
    }
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:17,代码来源:UraniumClassTransformer.java

示例3: syncConfig

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
private static void syncConfig(boolean load) {
	List<String> propOrder = new ArrayList<String>();
	try {
		Property prop = null;
		if(!config.isChild) {
			if(load) {
				config.load();
			}
		}
		
		biomeIDSpace = getIntegerConfigNode(config, prop, propOrder, Constants.CONFIG_CATEGORY_DIMENSIONS, "biomeIDSpace", "Biome ID for Space.", 100);
		
		config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder);

           if (config.hasChanged())
           {
               config.save();
           }
	}catch (final Exception ex) {
		FMLLog.log(Level.ERROR, ex, "Trappist-1 has a problem loading it's config, this can have negative repercussions.");
	}
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:23,代码来源:TPBiomeConfig.java

示例4: syncConfig

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
private static void syncConfig(boolean load) {
	List<String> propOrder = new ArrayList<String>();
	try {
		Property prop = null;
		if(!config.isChild) {
			if(load) {
				config.load();
			}
		}
		
		dimensionIDTrappistOneB = getIntegerConfigNode(config, prop, propOrder, Constants.CONFIG_CATEGORY_DIMENSIONS, "dimensionIDTrappistOneB", "Dimension ID for Trappist-1B.", -35);
		dimensionIDTrappistOneC = getIntegerConfigNode(config, prop, propOrder, Constants.CONFIG_CATEGORY_DIMENSIONS, "dimensionIDTrappistOneC", "Dimension ID for Trappist-1C.", -36);
		
		config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder);

           if (config.hasChanged())
           {
               config.save();
           }
	}catch (final Exception ex) {
		FMLLog.log(Level.ERROR, ex, "Trappist-1 has a problem loading it's config, this can have negative repercussions.");
	}
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:24,代码来源:TPDimensionConfig.java

示例5: updateEntity

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
public void updateEntity() {
	FMLLog.log(Level.INFO, "A");
	if(!worldObj.isRemote) {
		useItemToGetEnergy();
		if(canCraft()) {
			FMLLog.log(Level.INFO, "C");
			progress++;
			currentEnergy--;
			if(progress >= totalTime) {
				FMLLog.log(Level.INFO, "D");
				craftItem();
			}
		}
	}
	
	FMLLog.log(Level.INFO, "N");
	this.markDirty();
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:TileEntityAutoWorkBench.java

示例6: useItemToGetEnergy

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
public boolean useItemToGetEnergy() {
	if(machineItemStacks[0] == null) {
		return false;
	}
	if(getItemBurnTimeBurning(machineItemStacks[0]) > 0 && currentEnergy + getItemBurnTimeBurning(machineItemStacks[0]) < maxEnergy) {
		currentEnergy += getItemBurnTimeBurning(machineItemStacks[0]);
		machineItemStacks[0].stackSize--;
		FMLLog.log(Level.INFO, "B" + true);
		return true;
	}
	if(getItemBurnTimeElectrical(machineItemStacks[0]) > 0 && currentEnergy + getItemBurnTimeElectrical(machineItemStacks[0]) < maxEnergy) {
		currentEnergy += getItemBurnTimeElectrical(machineItemStacks[0]);
		machineItemStacks[0].stackSize--;
		FMLLog.log(Level.INFO, "B" + true);
		return true;
	}
	FMLLog.log(Level.INFO, "B" + false);
	return false;
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:20,代码来源:TileEntityAutoWorkBench.java

示例7: canCraft

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
public boolean canCraft() {
	if(currentEnergy <= 0) {
		FMLLog.log(Level.INFO, "Ba");
		currentEnergy = 0;
		return false;
	} else {
		FMLLog.log(Level.INFO, "Bb");
		InventoryCrafting inv = new InventoryCrafting(new ContainerAutoWorkBench(new InventoryPlayer(null), this), 3, 3);
		for(int i = 1; i < machineItemStacks.length - 1; i++) {
			inv.setInventorySlotContents(i - 1, machineItemStacks[i - 1]);
			FMLLog.log(Level.INFO, "Bc" + (i - 1));
		}
		ItemStack stack = AutoWorkBenchRecipes.smelting().getSmeltingResult(inv, worldObj, Tier.normal)[0];
		FMLLog.log(Level.INFO, "Bd" + (stack != null));
		return stack != null;
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:18,代码来源:TileEntityAutoWorkBench.java

示例8: removeStone

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
private void removeStone(World world, Random random, int x, int z) {
	int id = world.getBiomeGenForCoords(x, z).biomeID;
	Block block = Blocks.stone;

	if(id == 35 || id == 163 || id == 29 || id == 157 || id == 6 || id == 134 || id == 160 || id == 161 || id == 32 || id == 33) {
		block = Granite;
	} else if(id == 36 || id == 164 || id == 16 || id == 14 || id == 15 || id == 0 || id == 24 || id == 26) {
		block = Basalt;
	} else if(id == 2 || id == 1 || id == 7 || id == 129 || id == 5 || id == 30 || id == 11) {
		block = Limestone;
	} else if(id == 130 || id == 17 || id == 21 || id == 149 || id == 23 || id == 151 || id == 22 || id == 133 || id == 155 || id == 19 || id == 31 || id == 158 || id == 27) {
		block = Shale;
	} else if(id == 37 || id == 165 || id == 132 || id == 4 || id == 3 || id == 131 || id == 34 || id == 162 || id == 28 || id == 156 || id == 25) {
		block = Slate;
	} else if(id == 39 || id == 167 || id == 38 || id == 166 || id == 18 || id == 13 || id == 12 || id == 140) {
		block = Gneiss;
	} else {
		FMLLog.log(Level.ERROR, Technical.modName + ": TechnicalWorldGenerator could not find stone type for " + world.getBiomeGenForCoords(x, z).biomeName + " (id " + id + "). Please report this to the mod author(s)");
	}

	for(int y = 0; y < world.getActualHeight(); y++) {
		if(world.getBlock(x, y, z) == Blocks.stone)
			world.setBlock(x, y, z, block, 0, 0);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:26,代码来源:TechnicalWorldGenerator.java

示例9: getSlotToPushTo

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
protected int getSlotToPushTo(IInventory inventory) {
	int slot = 0;
	for(; slot < inventory.getSizeInventory(); ++slot) {
		if(debug) {
			FMLLog.log(Level.INFO, "E " + (inventory.getStackInSlot(slot) != null));
			if(inventory.getStackInSlot(slot) != null) {
				FMLLog.log(Level.INFO, "E " + slot + " " + inventory.getStackInSlot(slot).toString());
				FMLLog.log(Level.INFO, "E-true " + (inventory.getStackInSlot(slot) == null));
				FMLLog.log(Level.INFO, "E-true " + (inventory.getStackInSlot(slot).getItem() == blockItemStack.getItem()));
				FMLLog.log(Level.INFO, "E-true " + (inventory.getStackInSlot(slot).getItemDamage() == blockItemStack.getItemDamage()));
				FMLLog.log(Level.INFO, "E-true " + inventory.getStackInSlot(slot).stackSize + " < " + inventory.getStackInSlot(slot).getItem().getItemStackLimit(inventory.getStackInSlot(slot)));
			}
		}
		if(inventory.getStackInSlot(slot) == null || inventory.getStackInSlot(slot).getItem() == blockItemStack.getItem() && inventory.getStackInSlot(slot).getItemDamage() == blockItemStack.getItemDamage()
				&& inventory.getStackInSlot(slot).stackSize < inventory.getStackInSlot(slot).getItem().getItemStackLimit(inventory.getStackInSlot(slot)))
			break;
	}

	if(slot > inventory.getSizeInventory() - 1)
		slot = inventory.getSizeInventory() - 1;

	if(debug)
		FMLLog.log(Level.INFO, "E" + slot);

	return slot;
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:27,代码来源:TileEntityGrabber.java

示例10: pushItemIInventory

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
protected boolean pushItemIInventory(IInventory inventory, int slot) {
	if(inventory.getStackInSlot(slot) == null) {
		if(debug)
			FMLLog.log(Level.INFO, "F");
		inventory.setInventorySlotContents(slot, blockItemStack.copy());
		blockItemStack = null;
		markDirty = true;
	} else if(inventory.getStackInSlot(slot).getItem() == blockItemStack.getItem() && inventory.getStackInSlot(slot).stackSize < inventory.getInventoryStackLimit() && inventory.getStackInSlot(slot).stackSize < inventory.getStackInSlot(slot).getMaxStackSize()) {
		if(debug)
			FMLLog.log(Level.INFO, "G");
		blockItemStack.stackSize = blockItemStack.stackSize + inventory.getStackInSlot(slot).stackSize;
		inventory.setInventorySlotContents(slot, blockItemStack.copy());
		blockItemStack = null;
		markDirty = true;
	} else {
		if(debug)
			FMLLog.log(Level.INFO, "Ga");
	}
	return markDirty;
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:21,代码来源:TileEntityGrabber.java

示例11: pushItemTechnicalAutoTileEntity

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
protected boolean pushItemTechnicalAutoTileEntity() {
	if(debug)
		FMLLog.log(Level.INFO, "fC");
	TechnicalAutoTileEntity pushTileEntity = (TechnicalAutoTileEntity) pushTileEntity();
	if(blockItemStack.stackSize > 1) {
		ItemStack oldStack = blockItemStack.copy();
		ItemStack newStack = blockItemStack.splitStack(1);
		newStack = pushTileEntity.pushItem(newStack, -1);
		if(newStack == null || newStack.stackSize == 0) {
			if(debug)
				FMLLog.log(Level.INFO, "fDa");
			markDirty = true;
		} else {
			blockItemStack = oldStack;
		}
	}
	return markDirty;
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:TileEntityGrabberFiltering.java

示例12: pullItemTechnicalAutoTileEntity

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
protected boolean pullItemTechnicalAutoTileEntity() {
	if(debug)
		FMLLog.log(Level.INFO, "fI");
	TechnicalAutoTileEntity pullTileEntity = (TechnicalAutoTileEntity) pullTileEntity();
	if(blockItemStack == null || blockItemStack.stackSize == 0) {
		blockItemStack = pullTileEntity.pullItem(-1, 1);
		markDirty = true;
	} else {
		ItemStack pulledItem = pullTileEntity.pullItem(-1, 1, blockItemStack);
		if(pulledItem != null)
			blockItemStack.stackSize += pulledItem.stackSize;
		pulledItem = null;
		markDirty = true;
	}
	return markDirty;
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:17,代码来源:TileEntityGrabberFiltering.java

示例13: requestPlayerTicket

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
public static Ticket requestPlayerTicket(Object mod, String player, World world, Type type)
{
    ModContainer mc = getContainer(mod);
    if (mc == 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;
    }
    if (playerTickets.get(player).size()>playerTicketLength)
    {
        FMLLog.warning("Unable to assign further chunkloading tickets to player %s (on behalf of mod %s)", player, mc.getModId());
        return null;
    }
    Ticket ticket = new Ticket(mc.getModId(),type,world,player);
    playerTickets.put(player, ticket);
    tickets.get(world).put("Forge", ticket);
    return ticket;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:19,代码来源:ForgeChunkManager.java

示例14: registerProvider

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
/***
 * Now returns a boolean to indicate whether registration of the WorldProvider type was successful.
 * (If it failed, you should probably set the CelestialBody as unreachable.)
 * 
 * @param id
 * @param provider
 * @param keepLoaded
 * @return <boolean> success
 */
public static boolean registerProvider(int id, Class<? extends WorldProvider> provider, boolean keepLoaded, int defaultID)
{
	boolean flag = DimensionManager.registerProviderType(id, provider, keepLoaded);
	if (flag)
	{
		GalacticraftRegistry.worldProviderIDs.add(id);
		return true;
	}
	else
	{
		GalacticraftRegistry.worldProviderIDs.add(defaultID);  //Adding the 0 here preserves the order, important for network compatibility between GC versions
		FMLLog.severe("Could not register dimension " + id + " - does it clash with another mod?  Change the ID in config.");
		return false;
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:25,代码来源:GalacticraftRegistry.java

示例15: loadModel

import cpw.mods.fml.common.FMLLog; //导入依赖的package包/类
/**
 * Load the model from the supplied classpath resolvable resource name
 * @param resource The resource name
 * @return A model
 * @throws IllegalArgumentException if the resource name cannot be understood
 * @throws ModelFormatException if the underlying model handler cannot parse the model format
 */
public static IModelCustom loadModel(ResourceLocation resource) throws IllegalArgumentException, ModelFormatException
{
    String name = resource.func_110623_a();
    int i = name.lastIndexOf('.');
    if (i == -1)
    {
        FMLLog.severe("The resource name %s is not valid", resource);
        throw new IllegalArgumentException("The resource name is not valid");
    }
    String suffix = name.substring(i+1);
    IModelCustomLoader loader = instances.get(suffix);
    if (loader == null)
    {
        FMLLog.severe("The resource name %s is not supported", resource);
        throw new IllegalArgumentException("The resource name is not supported");
    }

    return loader.loadInstance(resource);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:27,代码来源:AdvancedModelLoader.java


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