Java 类cpw.mods.fml.common.event.FMLMissingMappingsEvent.Action 实例源码
项目:Chisel-1.7.2
文件:Chisel.java
@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);
}
}
}
项目:PandorasChest
文件:PandorasChestMod.java
@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);
}
}