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


Java MissingMapping类代码示例

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


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

示例1: handleMissingMaps

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
public void handleMissingMaps(FMLMissingMappingsEvent event) {
	OresPlus.log.info("recieved missing maps event");
	for (MissingMapping map : event.get()) {
		if (this.remapList.containsKey(map.name)) {
			switch (map.type) {
			case BLOCK:
				OresPlus.log.info("Remapping missing mapping for block " + map.name);
				map.remap(Block.getBlockFromItem(remapList.get(map.name)));
				break;
			default:
				OresPlus.log.info("Remapping missing mapping for item " + map.name);
				map.remap(remapList.get(map.name));
			}
		}
	}
}
 
开发者ID:TheTorbinWren,项目名称:OresPlus,代码行数:17,代码来源:ItemMapHelper.java

示例2: updateAlphaAnvil

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@EventHandler
public void updateAlphaAnvil(FMLMissingMappingsEvent event) {
    for(int i = 0; i < event.get().size(); i++) {
        final MissingMapping missingMapping = event.get().get(i);
        if (missingMapping.name.equals("BetterAnvil:anvilba")) {
            switch(missingMapping.type) {
                case BLOCK:
                    missingMapping.remap(BetterAnvil.ANVIL);
                    break;
                case ITEM:
                    missingMapping.remap(Item.getItemFromBlock(BetterAnvil.ANVIL));
                    break;
            }
        }
    }
}
 
开发者ID:vdvman1,项目名称:betterAnvil-forge,代码行数:17,代码来源:BetterAnvil.java

示例3: handleMissingMapping

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@Mod.EventHandler
public void handleMissingMapping(FMLMissingMappingsEvent event) {
	for (MissingMapping mapping : event.get()) {
		// TODO: ... maybe not this.
		LogHelper.info(String.format("Missing mapping: %s - ignoring.", mapping.name));
		mapping.ignore();
	}
}
 
开发者ID:MagicBees,项目名称:MagicBees,代码行数:9,代码来源:MagicBees.java

示例4: missingMapping

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@EventHandler
public void missingMapping(FMLMissingMappingsEvent event) {
	for(MissingMapping m: event.get()) {
		// This bug was introduced along with Chisel 1.5.2, and was fixed in 1.5.3.
		// Ice Stairs were called null.0-7 instead of other names, and Marble/Limestone stairs did not exist.
		// This fixes the bug.
		if(m.name.startsWith("null.") && m.name.length() == 6 && m.type == Type.BLOCK) {
			m.setAction(Action.WARN);
		}
	}
}
 
开发者ID:asiekierka,项目名称:Chisel-1.7.2,代码行数:12,代码来源:Chisel.java

示例5: missingMapping

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@EventHandler
public void missingMapping(FMLMissingMappingsEvent event) {
	BlockNameConversion.init();

	for (MissingMapping m : event.get()) {
		// This bug was introduced along with Chisel 1.5.2, and was fixed in
		// 1.5.3.
		// Ice Stairs were called null.0-7 instead of other names, and
		// Marble/Limestone stairs did not exist.
		// This fixes the bug.
		if (m.name.startsWith("null.") && m.name.length() == 6 && m.type == Type.BLOCK) {
			m.warn();// (Action.WARN);
		}

		// Fix mapping of snakestoneSand, snakestoneStone, limestoneStairs,
		// marbleStairs when loading an old (1.5.4) save
		else if (m.type == Type.BLOCK) {
			final Block block = BlockNameConversion.findBlock(m.name);

			if (block != null) {
				m.remap(block);
				FMLLog.getLogger().info("Remapping block " + m.name + " to " + General.getName(block));
			} else
				FMLLog.getLogger().warn("Block " + m.name + " could not get remapped.");
		} else if (m.type == Type.ITEM) {
			final Item item = BlockNameConversion.findItem(m.name);

			if (item != null) {
				m.remap(item);
				FMLLog.getLogger().info("Remapping item " + m.name + " to " + General.getName(item));

			} else
				FMLLog.getLogger().warn("Item " + m.name + " could not get remapped.");
		}
	}
}
 
开发者ID:Chisel-2,项目名称:Chisel-2,代码行数:37,代码来源:Chisel.java

示例6: onMissingMapping

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@EventHandler
public void onMissingMapping(FMLMissingMappingsEvent event)
{
    for (MissingMapping m : event.get())
    {
        if (m.type == GameRegistry.Type.ITEM && m.name.contains("customthings.item"))
        {
            m.remap(ItemType.getItem());
        }
    }
}
 
开发者ID:tterrag1098,项目名称:CustomThings,代码行数:12,代码来源:CustomThings.java

示例7: missingMappings

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@EventHandler
public void missingMappings(FMLMissingMappingsEvent event) {
	List<MissingMapping> mappings = event.get();
	for (MissingMapping missingMapping : mappings) {
		if (missingMapping.name.equals("pandoraschest:Decorative Chest"))
			missingMapping.setAction(Action.IGNORE);
	}
}
 
开发者ID:hea3ven,项目名称:PandorasChest,代码行数:9,代码来源:PandorasChestMod.java

示例8: onMissingMapping

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@EventHandler
public void onMissingMapping(FMLMissingMappingsEvent event){
    for(MissingMapping mapping : event.get()) {
        if(mapping.type == GameRegistry.Type.BLOCK && mapping.name.equals("PneumaticCraft:etchingAcid")) {
            mapping.remap(Fluids.etchingAcid.getBlock());
            Log.info("Remapping Etching Acid");
        }
        if(mapping.type == GameRegistry.Type.ITEM && mapping.name.equals("PneumaticCraft:etchingAcidBucket")) {
            mapping.remap(Fluids.getBucket(Fluids.etchingAcid));
            Log.info("Remapping Etching Acid Bucket");
        }

    }
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:15,代码来源:PneumaticCraft.java

示例9: processingMissingMap

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
public static void processingMissingMap(FMLMissingMappingsEvent event)
{
    List<MissingMapping> missingMappings = event.get();
    for (MissingMapping map : missingMappings)
    {
        if (map.name.equals("Agriculture:base.crop"))
        {
            ItemStack stack = ItemList.getItemStack("base", "Dough");
            map.remap(stack.getItem());
        }
    }
}
 
开发者ID:TeamMetallurgy,项目名称:Agriculture2,代码行数:13,代码来源:MissingMapHandler.java

示例10: missingMappingEvent

import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; //导入依赖的package包/类
@Mod.EventHandler
public void missingMappingEvent(FMLMissingMappingsEvent event) {
	Iterator<MissingMapping> itr = event.getAll().iterator();
	while(itr.hasNext()) {
		MissingMapping mapping = itr.next();

		if(mapping.name.equalsIgnoreCase("advancedrocketry:" + LibVulpesItems.itemBattery.getUnlocalizedName()))
			mapping.remap(LibVulpesItems.itemBattery);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.satellitePowerSource")) 
			mapping.remap(AdvancedRocketryItems.itemSatellitePowerSource);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.circuitplate")) 
			mapping.remap(AdvancedRocketryItems.itemCircuitPlate);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.wafer")) 
			mapping.remap(AdvancedRocketryItems.itemWafer);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.itemUpgrade")) 
			mapping.remap(AdvancedRocketryItems.itemUpgrade);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.dataUnit")) 
			mapping.remap(AdvancedRocketryItems.itemDataUnit);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.satellitePrimaryFunction")) 
			mapping.remap(AdvancedRocketryItems.itemSatellitePrimaryFunction);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.pressureTank")) 
			mapping.remap(AdvancedRocketryItems.itemPressureTank);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.pressureTank")) 
			mapping.remap(AdvancedRocketryItems.itemPressureTank);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.lens")) 
			mapping.remap(AdvancedRocketryItems.itemLens);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.miscpart")) 
			mapping.remap(AdvancedRocketryItems.itemMisc);

		if(mapping.name.equalsIgnoreCase("advancedRocketry:item.circuitIC")) 
			mapping.remap(AdvancedRocketryItems.itemIC);
	}
}
 
开发者ID:zmaster587,项目名称:AdvancedRocketry,代码行数:44,代码来源:AdvancedRocketry.java


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