Merge branch 'master' into 1.6.4

This commit is contained in:
CrazyPants committed 2013-10-14 11:53:39 +08:00
commit c3324da41e
6 files changed
+47 -37

No files matched your search

+2 -4
View File
@@ -25,7 +25,7 @@ public final class Config {
public static double conduitScale = DEFAULT_CONDUIT_SCALE;
public static int numConduitsPerRecipe = 4;
public static int numConduitsPerRecipe = 8;
public static double transceiverEnergyLoss = 0.1;
@@ -52,9 +52,7 @@ public final class Config {
try {
FileUtils.moveFile(deprecatedFile, configFile);
} catch (IOException e) {
Log.error("Could not move old config file to new directory: " + e);
e.printStackTrace();
throw new RuntimeException("Could not move old config file to new directory.", e);
Log.warn("Could not move old config file to new directory: " + e);
}
}
@@ -66,10 +66,12 @@ public abstract class AbstractItemConduit extends Item implements IConduitItem {
if(!world.isRemote) {
if(world.setBlock(placeAt.x, placeAt.y, placeAt.z, ModObject.blockConduitBundle.actualId, 0, 1)) {
IConduitBundle bundle = (IConduitBundle) world.getBlockTileEntity(placeAt.x, placeAt.y, placeAt.z);
bundle.addConduit(createConduit(stack));
Block b = EnderIO.blockConduitBundle;
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, b.stepSound.getPlaceSound(),
(b.stepSound.getVolume() + 1.0F) / 2.0F, b.stepSound.getPitch() * 0.8F);
if(bundle != null) {
bundle.addConduit(createConduit(stack));
Block b = EnderIO.blockConduitBundle;
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, b.stepSound.getPlaceSound(),
(b.stepSound.getVolume() + 1.0F) / 2.0F, b.stepSound.getPitch() * 0.8F);
}
}
}
if(!player.capabilities.isCreativeMode) {
@@ -88,7 +90,7 @@ public abstract class AbstractItemConduit extends Item implements IConduitItem {
IConduitBundle bundle = (TileConduitBundle) world.getBlockTileEntity(placeX, placeY, placeZ);
if(bundle == null) {
System.out.println("AbstractItemConduit.onItemUse: Bunle null");
System.out.println("AbstractItemConduit.onItemUse: Bundle null");
return false;
}
IConduit con = createConduit(stack);
@@ -39,8 +39,7 @@ public class MachineRecipes {
//stirling gen
ItemStack stirlingGen = new ItemStack(blockStirlingGenerator.actualId, 1, 0);
GameRegistry.addShapedRecipe(stirlingGen, "bcb", "bfb", "gpg", 'b', Block.stoneBrick, 'f', Block.furnaceIdle, 'p', Block.pistonBase, 'g', basicGear, 'c',
capacitor);
GameRegistry.addShapedRecipe(stirlingGen, "bbb", "bfb", "gpg", 'b', Block.stoneBrick, 'f', Block.furnaceIdle, 'p', Block.pistonBase, 'g', basicGear);
//reservoir
ItemStack fusedQuartz = new ItemStack(ModObject.blockFusedQuartz.actualId, 1, 0);
@@ -21,6 +21,14 @@ public class RecipeConfig {
}
public void merge(RecipeConfig userConfig) {
if(userConfig.dumpItemRegistery) {
dumpItemRegistery = true;
}
if(userConfig.dumpOreDictionary) {
dumpOreDictionary = true;
}
for (RecipeGroup group : userConfig.getRecipeGroups().values()) {
if(!group.enabled) {
if(recipeGroups.remove(group.name) != null) {
@@ -52,36 +52,40 @@ public class HyperCubeRegister {
}
private void convertOldFile() {
File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg");
Configuration config = new Configuration(oldFile);
config.load();
try {
File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg");
Configuration config = new Configuration(oldFile);
config.load();
Property pcNamesProp = config.get(CATEGORY_PUBLIC_CHANNELS, "names", new String[] {});
String[] pcNames = pcNamesProp.getStringList();
if(pcNames != null) {
for (String name : pcNames) {
publicChannels.add(new Channel(name, null));
Property pcNamesProp = config.get(CATEGORY_PUBLIC_CHANNELS, "names", new String[] {});
String[] pcNames = pcNamesProp.getStringList();
if(pcNames != null) {
for (String name : pcNames) {
publicChannels.add(new Channel(name, null));
}
}
}
Property userNamesProp = config.get(CATEGORY_PRIVATE_CHANNELS, "users", new String[] {});
String[] userNames = userNamesProp.getStringList();
if(userNames != null) {
for (String user : userNames) {
Property userChannles = config.get(CATEGORY_PRIVATE_CHANNELS, user + ".channels", new String[] {});
String[] channelNames = userChannles.getStringList();
if(channelNames != null && channelNames.length > 0) {
List<Channel> channels = getChannelsForUser(user);
for (String chanName : channelNames) {
channels.add(new Channel(chanName, user));
Property userNamesProp = config.get(CATEGORY_PRIVATE_CHANNELS, "users", new String[] {});
String[] userNames = userNamesProp.getStringList();
if(userNames != null) {
for (String user : userNames) {
Property userChannles = config.get(CATEGORY_PRIVATE_CHANNELS, user + ".channels", new String[] {});
String[] channelNames = userChannles.getStringList();
if(channelNames != null && channelNames.length > 0) {
List<Channel> channels = getChannelsForUser(user);
for (String chanName : channelNames) {
channels.add(new Channel(chanName, user));
}
}
}
}
updateConfig();
oldFile.renameTo(new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg.old"));
} catch (Exception e) {
Log.warn("Could not convert old Dimensional Transciever (hypercube.cfg) to new format. Channles will be reset.");
}
updateConfig();
oldFile.renameTo(new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg.old"));
}
public synchronized List<Channel> getChannelsForUser(String user) {
@@ -25,9 +25,8 @@ public enum Alloy {
new ItemStack(ModObject.itemMaterial.actualId, 1, Material.SILICON.ordinal())),
CONDUCTIVE_IRON("Conductive Iron", "conductiveIron",
new ItemStack(Item.redstone),
new ItemStack(Item.ingotIron),
new ItemStack(Item.redstone));
new ItemStack(Item.redstone, 2),
new ItemStack(Item.ingotIron));
public final String unlocalisedName;
public final String uiName;