本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例9: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
Meddle.LOGGER.error("[MeddleAPI] " + error);
return bytes;
}
示例10: handleError
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] handleError(String error, byte[] bytes)
{
Meddle.LOGGER.error("[DoubleDoors] " + error);
return bytes;
}
示例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;
}
示例12: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
Meddle.LOGGER.error("[Meddle/LeafDecay] " + error);
return bytes;
}
示例13: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String msg, byte[] b)
{
Meddle.LOGGER.error("[Meddle/BabyBuster] " + msg);
return b;
}
示例14: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
Meddle.LOGGER.error("[Meddle/FireTweaker] " + error);
return bytes;
}
示例15: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
Meddle.LOGGER.error("[Meddle/PhysicsTweaker] " + error);
return bytes;
}