本文整理汇总了Java中net.fybertech.meddle.Meddle类的典型用法代码示例。如果您正苦于以下问题:Java Meddle类的具体用法?Java Meddle怎么用?Java Meddle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Meddle类属于net.fybertech.meddle包,在下文中一共展示了Meddle类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: patchEntityLivingBase
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] patchEntityLivingBase(byte[] basicClass)
{
ClassReader reader = new ClassReader(basicClass);
ClassNode cn = new ClassNode();
reader.accept(cn, 0);
int count = 0;
MethodNode moveMethod = null;
// Find moveEntityWithHeading
for (MethodNode method : cn.methods)
{
if (!method.desc.equals(moveEntityWithHeadingDesc)) continue;
boolean skip = false;
for (AbstractInsnNode insn = method.instructions.getFirst(); insn != null; insn = insn.getNext()) {
//INVOKESPECIAL net/minecraft/entity/Entity.fall (FF)V
if (insn.getOpcode() == Opcodes.INVOKESPECIAL) {
MethodInsnNode mn = (MethodInsnNode)insn;
if (mn.owner.equals(entityClass) && mn.desc.equals(moveEntityWithHeadingDesc))
{
skip = true;
break;
}
}
}
if (skip) continue;
count++;
moveMethod = method;
}
if (count != 1 || moveMethod == null)
return failGracefully("Unable to find EntityLivingBase.moveEntityWithHeading", basicClass);
// Found the method, now find the patch location
AbstractInsnNode node = moveMethod.instructions.getFirst();
while (node != null)
{
if (node.getOpcode() == Opcodes.IFEQ) break;
node = node.getNext();
}
if (node == null)
return failGracefully("Couldn't patch EntityLivingBase.moveEntityWithHeading!", basicClass);
moveMethod.instructions.set(node, new InsnNode(Opcodes.POP));
Meddle.LOGGER.info("[Meddle/PhysicsTweaker] EntityLivingBase.moveEntityWithHeading patched");
ClassWriter writer = new ClassWriter(0);
cn.accept(writer);
return writer.toByteArray();
}
开发者ID:FyberOptic,项目名称:MeddleMods,代码行数:56,代码来源:PhysicsTweaker.java
示例17: loadConfig
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
public static void loadConfig()
{
ConfigFile config = new ConfigFile(new File(Meddle.getConfigDir(), "fullyloded.cfg"));
config.load();
String defaultOres = "iron_ore, gold_ore, coal_ore, lapis_ore, diamond_ore, redstone_ore, lit_redstone_ore, emerald_ore, quartz_ore";
String list = config.get(ConfigFile.key("general", "ores", defaultOres, "List of block names to mine by the vein.\n\nMetadata can be provided by using a colon followed by the value.\ne.g. stone:1 for granite, stone:3 for diorite, etc"));
maxBlocks = config.get(ConfigFile.key("general", "maxBlocks", 100, "Maximum number of blocks that can be mined at once."));
maxHorizontal = config.get(ConfigFile.key("general", "maxHorizontal", 10, "Maximum horizontal distance to search the vein from the block mined."));
maxVertical = config.get(ConfigFile.key("general", "maxVertical", 10, "Maximum vertical distance to search the vein from the block mined."));
blocks = new ArrayList<>();
String[] split = list.split(",");
for (String id : split) {
id = id.trim();
int metaIndex = id.indexOf(":");
int meta = 0;
if (metaIndex != -1) {
meta = Integer.parseInt(id.substring(metaIndex + 1));
id = id.substring(0, metaIndex);
}
Block b = Block.getBlockFromName(id);
IBlockState bs;
if (b != null && b != Blocks.air) {
if (meta != 0)
bs = b.getStateFromMeta(meta);
else
bs = b.getDefaultState();
blocks.add(bs);
String description = Block.blockRegistry.getNameForObject(b).toString();
if (meta != 0) description += ":" + meta;
Meddle.LOGGER.info("[Meddle/FullyLoded] Added block: " + description);
}
else
Meddle.LOGGER.warn("[Meddle/FullyLoded] Invalid block ID in config: " + id);
}
if (config.hasChanged()) config.save();
}
开发者ID:FyberOptic,项目名称:FullyLoded,代码行数:43,代码来源:FullyLoded.java
示例18: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
Meddle.LOGGER.error("[Meddle/FullyLoded] " + error);
return bytes;
}
开发者ID:FyberOptic,项目名称:FullyLoded,代码行数:6,代码来源:FullyLodedTransformer.java
示例19: failGracefully
import net.fybertech.meddle.Meddle; //导入依赖的package包/类
private byte[] failGracefully(String error, byte[] bytes)
{
Meddle.LOGGER.error("[Meddle/HeavyMeddle] " + error);
return bytes;
}
开发者ID:FyberOptic,项目名称:HeavyMeddle,代码行数:6,代码来源:HeavyTransformer.java
注:本文中的net.fybertech.meddle.Meddle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论