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


Java Meddle类代码示例

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


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

示例1: drawMainMenuBranding

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
public static void drawMainMenuBranding(GuiScreen gui)
{		
	FontRenderer fontRenderer = gui.fontRendererObj;
		
	if (mappingsVersion == null) {
		Meddle.ModContainer mc = Meddle.loadedModsList.get("dynamicmappings");
		if (mc != null) mappingsVersion = mc.meta.version();
		else mappingsVersion = "n/a";
	}
	
	int modCount;
	String modOrMods;		
	
	gui.drawString(fontRenderer, "Meddle " + Meddle.getVersion(),  2,  gui.height - 60,  0xFFFFFF);		
	modCount = Meddle.loadedModsList.size();
	modOrMods = modCount == 1 ? " mod" : " mods";
	gui.drawString(fontRenderer, "  " + modCount + modOrMods + " loaded", 2,  gui.height - 50,  0xAAAAAA);
	
	gui.drawString(fontRenderer, "MeddleAPI " + MeddleAPI.getVersion(),  2,  gui.height - 40,  0xFFFFFF);		
	modCount = MeddleAPI.apiMods.size();
	modOrMods = modCount == 1 ? " mod" : " mods";		
	gui.drawString(fontRenderer, "  " + modCount + modOrMods + " loaded", 2, gui.height - 30, 0xAAAAAA);
	
	gui.drawString(fontRenderer, "DynamicMappings " + mappingsVersion, 2, gui.height - 20, 0xFFFFFF);	
}
 
开发者ID:FyberOptic,项目名称:MeddleAPI,代码行数:26,代码来源:MeddleClientHooks.java

示例2: loadConfig

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private void loadConfig()
{
	ConfigFile config = new ConfigFile(new File(Meddle.getConfigDir(), com.jtrent238.epicproportions.EpicProportionsMod.MODID + ".cfg"));
	config.load();
	
	itemgemofepicproportionsID = config.get(ConfigFile.key("itemgemofepicproportionsID", DEFAULT_ITEM_ID));
	
	if (config.hasChanged()) config.save();
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:10,代码来源:EpicProportionsMod.java

示例3: init

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
public void init()
{
	loadConfig();	
	Meddle.LOGGER.info("[" + com.jtrent238.epicproportions.EpicProportionsMod.MODNAME + "]" + " Using item id " + itemgemofepicproportionsID);
	
	MeddleAPI.registerItem(itemgemofepicproportionsID, "itemgemofepicproportions",  itemgemofepicproportions);
	
	//CraftingManager.getInstance().addRecipe(new ItemStack(journeyStone), " S ", "RER", " S ", Character.valueOf('S'), Blocks.stone, Character.valueOf('R'), Items.redstone, Character.valueOf('E'), Items.ender_pearl); 
	
	proxy = (CommonProxy)MeddleAPI.createProxyInstance("com.jtrent238.epicproportions.meddle.CommonProxy", "com.jtrent238.epicproportions.meddle.ClientProxy");
	proxy.init();		
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:13,代码来源:EpicProportionsMod.java

示例4: getVersion

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
public static String getVersion()
{
	if (meddleAPIVersion == null) {
		Meddle.ModContainer mc = Meddle.loadedModsList.get("meddleapi");
		if (mc != null) meddleAPIVersion = mc.meta.version();
		else meddleAPIVersion = "n/a";
	}
	
	return meddleAPIVersion;
}
 
开发者ID:FyberOptic,项目名称:MeddleAPI,代码行数:11,代码来源:MeddleAPI.java

示例5: loadConfig

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private void loadConfig()
{
	ConfigFile config = new ConfigFile(new File(Meddle.getConfigDir(), "journeystone.cfg"));
	config.load();
	
	journeyStoneID = config.get(ConfigFile.key("journeyStoneID", DEFAULT_ITEM_ID));
	
	if (config.hasChanged()) config.save();
}
 
开发者ID:FyberOptic,项目名称:JourneyStone,代码行数:10,代码来源:JourneyStoneMod.java

示例6: init

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
public void init()
{
	loadConfig();	
	Meddle.LOGGER.info("[JourneyStone] Using item id " + journeyStoneID);
	
	MeddleAPI.registerItem(journeyStoneID, "journeyStone",  journeyStone);
	
	CraftingManager.getInstance().addRecipe(new ItemStack(journeyStone), " S ", "RER", " S ", Character.valueOf('S'), Blocks.stone, Character.valueOf('R'), Items.redstone, Character.valueOf('E'), Items.ender_pearl); 
	
	proxy = (CommonProxy)MeddleAPI.createProxyInstance("net.fybertech.journeystone.CommonProxy", "net.fybertech.journeystone.ClientProxy");
	proxy.init();		
}
 
开发者ID:FyberOptic,项目名称:JourneyStone,代码行数:13,代码来源:JourneyStoneMod.java

示例7: init

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
public void init()
{
	loadConfig();	
	Meddle.LOGGER.info("[JustBackpack] Backpack using item id " + backpackID);
	
	MeddleAPI.registerItem(backpackID, "meddleBackpack", backpackItem);
	
	CraftingManager.getInstance().addRecipe(new ItemStack(backpackItem), "LLL", "LCL", "LLL", Character.valueOf('L'), Items.leather, Character.valueOf('C'), Blocks.chest);
	
	proxy = (CommonProxy)MeddleAPI.createProxyInstance("net.fybertech.meddlebackpack.CommonProxy", "net.fybertech.meddlebackpack.ClientProxy");
	proxy.init();		
}
 
开发者ID:FyberOptic,项目名称:JustBackpack,代码行数:13,代码来源:BackpackMod.java

示例8: loadConfig

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private void loadConfig()
{
	ConfigFile config = new ConfigFile(new File(Meddle.getConfigDir(), "heavymeddle.cfg"));
	config.load();
	
	allAxesHeavy = config.get(ConfigFile.key("general", "allAxesHeavy", false, "Makes all axes destroy logs like the Heavy Axe."));
	maxBlocks = config.get(ConfigFile.key("general", "maxBlocks", 300, "Maximum number of blocks that can be destroyed in a single break."));
	maxGirth = config.get(ConfigFile.key("general", "maxGirth", 10, "Maximum radius to search for blocks in the tree, e.g., 0 = 1x1, 1 = 3x3, 2 = 5x5, etc."));
	maxHeight = config.get(ConfigFile.key("general", "maxHeight", 100, "Maximum height to search for blocks in the tree."));
	ignoreLeaves = config.get(ConfigFile.key("general", "ignoreLeaves", false, "Disables leaf block detection used when determining whether to destroy multiple logs."));
	
	if (config.hasChanged()) config.save();		
}
 
开发者ID:FyberOptic,项目名称:HeavyMeddle,代码行数:14,代码来源:HeavyMeddleMod.java

示例9: failGracefully

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
	Meddle.LOGGER.error("[MeddleAPI] " + error);
	return bytes;
}
 
开发者ID:FyberOptic,项目名称:MeddleAPI,代码行数:6,代码来源:Transformer.java

示例10: handleError

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] handleError(String error, byte[] bytes)
{
	Meddle.LOGGER.error("[DoubleDoors] " + error);
	return bytes;
}
 
开发者ID:FyberOptic,项目名称:DoubleDoors,代码行数:6,代码来源:DoubleDoorsTransformer.java

示例11: transformEntityItem

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] transformEntityItem(byte[] classbytes)
{
	ClassNode classNode = new ClassNode();
	ClassReader classReader = new ClassReader(classbytes);
	classReader.accept(classNode, 0);

	Iterator<MethodNode> methods = classNode.methods.iterator();
	while (methods.hasNext())
	{
		MethodNode m = methods.next();

		boolean foundFirstClue = false;
		boolean foundSecondClue = false;

		// Try to find 'private void searchForOtherItemsNearby()'
		if (!m.desc.equals("()V") || m.name.equals("<clinit>")) continue;

		for (AbstractInsnNode insn = m.instructions.getFirst(); insn != null; insn = insn.getNext())
		{
			// LDC Lnet/minecraft/entity/item/EntityItem;.class
			if (!foundFirstClue && insn instanceof LdcInsnNode)
			{
				LdcInsnNode ldc = (LdcInsnNode)insn;
				if (ldc.cst instanceof Type)
				{
					if (((Type)ldc.cst).getClassName().equals(entityItemClass)) foundFirstClue = true;
				}
			}

			// INVOKEINTERFACE java/util/List.iterator ()Ljava/util/Iterator;
			if (!foundSecondClue && insn instanceof MethodInsnNode)
			{
				MethodInsnNode mn = (MethodInsnNode)insn;
				if (mn.owner.equals("java/util/List") && mn.name.equals("iterator")) foundSecondClue = true;
			}
		}

		// High confidence in a match, patch it
		if (foundFirstClue && foundSecondClue)
		{
			m.instructions.insertBefore(m.instructions.getFirst(), new InsnNode(Opcodes.RETURN));
			ClassWriter writer = new ClassWriter(0); //ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);
			classNode.accept(writer);

			Meddle.LOGGER.info("[Meddle/AllTheItems] EntityItem.searchForOtherItemsNearby patched");
			return writer.toByteArray();
		}
	}

	Meddle.LOGGER.error("[Meddle/AllTheItems] Couldn't patch EntityItem.searchForOtherItemsNearby!");
	return classbytes;

}
 
开发者ID:FyberOptic,项目名称:MeddleMods,代码行数:54,代码来源:AllTheItems.java

示例12: failGracefully

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
	Meddle.LOGGER.error("[Meddle/LeafDecay] " + error);
	return bytes;
}
 
开发者ID:FyberOptic,项目名称:MeddleMods,代码行数:6,代码来源:LeafDecay.java

示例13: failGracefully

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String msg, byte[] b)
{
	Meddle.LOGGER.error("[Meddle/BabyBuster] " + msg);
	return b;
}
 
开发者ID:FyberOptic,项目名称:MeddleMods,代码行数:6,代码来源:ZombieTransformer.java

示例14: failGracefully

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
	Meddle.LOGGER.error("[Meddle/FireTweaker] " + error);
	return bytes;
}
 
开发者ID:FyberOptic,项目名称:MeddleMods,代码行数:6,代码来源:FireTweaker.java

示例15: failGracefully

import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
	Meddle.LOGGER.error("[Meddle/PhysicsTweaker] " + error);
	return bytes;
}
 
开发者ID:FyberOptic,项目名称:MeddleMods,代码行数:6,代码来源:PhysicsTweaker.java


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