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));
}
}
}
}
java类cpw.mods.fml.common.event.FMLMissingMappingsEvent的实例源码
ItemMapHelper.java 文件源码
项目:OresPlus
阅读 19
收藏 0
点赞 0
评论 0
MagicBees.java 文件源码
项目:MagicBees
阅读 19
收藏 0
点赞 0
评论 0
@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();
}
}
Chisel.java 文件源码
项目:Chisel-1.7.2
阅读 26
收藏 0
点赞 0
评论 0
@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);
}
}
}
Chisel.java 文件源码
项目:Chisel-2
阅读 20
收藏 0
点赞 0
评论 0
@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.");
}
}
}
CustomThings.java 文件源码
项目:CustomThings
阅读 23
收藏 0
点赞 0
评论 0
@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());
}
}
}
PandorasChestMod.java 文件源码
项目:PandorasChest
阅读 19
收藏 0
点赞 0
评论 0
@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);
}
}
PneumaticCraft.java 文件源码
项目:PneumaticCraft
阅读 23
收藏 0
点赞 0
评论 0
@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");
}
}
}
MissingMapHandler.java 文件源码
项目:Agriculture2
阅读 25
收藏 0
点赞 0
评论 0
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());
}
}
}
ExtraUtilsMod.java 文件源码
项目:ExtraUtilities
阅读 19
收藏 0
点赞 0
评论 0
@Mod.EventHandler
public void remap(final FMLMissingMappingsEvent event) {
ExtraUtilsMod.extraUtils.remap(event);
}
ExtraUtils.java 文件源码
项目:ExtraUtilities
阅读 26
收藏 0
点赞 0
评论 0
public void remap(final FMLMissingMappingsEvent event) {
}
ModStartupHelper.java 文件源码
项目:DynamicLib
阅读 19
收藏 0
点赞 0
评论 0
public void handleRenames(FMLMissingMappingsEvent event) {
gameConfig.handleRemaps(event.get());
}
Extruder.java 文件源码
项目:Extruder
阅读 17
收藏 0
点赞 0
评论 0
@EventHandler
public void handleRenames(FMLMissingMappingsEvent event) {
startupHelper.handleRenames(event);
}
OresPlus.java 文件源码
项目:OresPlus
阅读 23
收藏 0
点赞 0
评论 0
@EventHandler
public void handleMissingMaps(FMLMissingMappingsEvent event) {
itemMapHelper.handleMissingMaps(event);
}
Agriculture.java 文件源码
项目:Agriculture2
阅读 20
收藏 0
点赞 0
评论 0
@EventHandler
public void missingMapping(FMLMissingMappingsEvent event)
{
MissingMapHandler.processingMissingMap(event);
}
OpenPeripheralAddons.java 文件源码
项目:OpenPeripheral-Addons
阅读 17
收藏 0
点赞 0
评论 0
@EventHandler
public void handleRenames(FMLMissingMappingsEvent event) {
startupHelper.handleRenames(event);
}
Sugarplus.java 文件源码
项目:Sugarplus
阅读 21
收藏 0
点赞 0
评论 0
@EventHandler
public void remap(FMLMissingMappingsEvent event) {
for(FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
if(mapping.name.equals("sugarplus_LiquidChocolateFluidBlock")) {
mapping.remap(liquidChocolateFluidBlock);
} else if(mapping.name.equals("SugarplusLogsBlock")) {
mapping.remap(cocoaTreeLogs);
} else if(mapping.name.equals("SugarplusLeavesBlock")) {
mapping.remap(cocoaTreeLeaves);
} else if(mapping.name.equals("SugarplusSaplingsBlock")) {
mapping.remap(cocoaTreeSaplings);
} else if(mapping.name.equals("CocoaTreePlankBlock")) {
mapping.remap(cocoaTreePlanks);
}
}
}