return configFolder;
}
@Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) {
Splitter splitter = Splitter.on("@").trimResults();
for (FMLInterModComms.IMCMessage mess : event.getMessages()) {
if (mess.key.equals("ballast")) {
String[] tokens = Iterables.toArray(splitter.split(mess.getStringValue()), String.class);
if (tokens.length != 2) {
Game.log(Level.WARN, String.format("Mod %s attempted to register a ballast, but failed: %s", mess.getSender(), mess.getStringValue()));
continue;
}
String blockName = tokens[0];
Integer metadata = Ints.tryParse(tokens[1]);
if (blockName == null || metadata == null) {
Game.log(Level.WARN, String.format("Mod %s attempted to register a ballast, but failed: %s", mess.getSender(), mess.getStringValue()));
continue;
}
BallastRegistry.registerBallast(Block.getBlockFromName(blockName), metadata);
Game.log(Level.INFO, String.format("Mod %s registered %s as a valid ballast", mess.getSender(), mess.getStringValue()));
} else if (mess.key.equals("boiler-fuel-liquid")) {
String[] tokens = Iterables.toArray(splitter.split(mess.getStringValue()), String.class);
if (tokens.length != 2) {
Game.log(Level.WARN, String.format("Mod %s attempted to register a liquid Boiler fuel, but failed: %s", mess.getSender(), mess.getStringValue()));
continue;
}
Fluid fluid = FluidRegistry.getFluid(tokens[0]);