start cleaning up getting ready for a stable release

This commit is contained in:
Hea3veN 2015-05-28 20:19:55 -03:00
parent 78b423f8b0
commit adaab2ed3c
8 changed files with 115 additions and 50 deletions

View file

@ -289,10 +289,10 @@ public class MappingRegistry {
nbt.setTag("entitiesMapping", entitiesMapping); nbt.setTag("entitiesMapping", entitiesMapping);
System.out.println("[W] idToItem size : " + idToItem.size()); // System.out.println("[W] idToItem size : " + idToItem.size());
for (Item i : idToItem) { // for (Item i : idToItem) {
System.out.println("- " + (i != null ? i.toString() : "null")); // System.out.println("- " + (i != null ? i.toString() : "null"));
} // }
} }
private Object getMissingMappingFromFML(boolean isBlock, String name, int i) { private Object getMissingMappingFromFML(boolean isBlock, String name, int i) {
@ -418,9 +418,9 @@ public class MappingRegistry {
} }
} }
System.out.println("[R] idToItem size : " + idToItem.size()); // System.out.println("[R] idToItem size : " + idToItem.size());
for (Item i : idToItem) { // for (Item i : idToItem) {
System.out.println("- " + (i != null ? i.toString() : "null")); // System.out.println("- " + (i != null ? i.toString() : "null"));
} // }
} }
} }

View file

@ -79,6 +79,7 @@ config.general=General
config.general.pipes=Pipes config.general.pipes=Pipes
config.blueprints=Blueprints config.blueprints=Blueprints
config.power=Power Usage config.power=Power Usage
config.experimental=Experimental
config.display=Display config.display=Display
config.worldgen=World Generation config.worldgen=World Generation
config.network=Networking config.network=Networking
@ -92,15 +93,31 @@ config.display.colorBlindMode=Colorblind mode
config.display.hideFluidValues=Hide fluid numbers config.display.hideFluidValues=Hide fluid numbers
config.display.hidePowerValues=Hide power numbers config.display.hidePowerValues=Hide power numbers
config.experimental.kinesisPowerLossOnTravel=Kinesis pipes power perdition
config.general.boards.blacklist=Robot blacklist
config.general.pumpsConsumeWater=Pumps consume water config.general.pumpsConsumeWater=Pumps consume water
config.general.updateCheck=Check for updates config.general.updateCheck=Check for updates
config.general.fuel.fuel.combustion=Combustion engine fuel multiplier
config.general.fuel.lava.combustion=Combustion engine lava multiplier
config.general.fuel.oil.combustion=Combustion engine oil multiplier
config.general.fuel.fuel.combustion.energyOutput=Combustion engine fuel output
config.general.fuel.lava.combustion.energyOutput=Combustion engine lava output
config.general.fuel.oil.combustion.energyOutput=Combustion engine oil output
config.general.itemLifespan=Item lifespan (seconds) config.general.itemLifespan=Item lifespan (seconds)
config.general.canEnginesExplode=Engines explode config.general.canEnginesExplode=Engines explode
config.general.oilCanBurn=Burning oil config.general.oilCanBurn=Burning oil
config.general.oilIsDense=Dense oil config.general.oilIsDense=Dense oil
config.general.pipes.baseFluidRate=Base flow rate
config.general.pipes.facadeBlacklist=Facade blacklist
config.general.pipes.facadeBlacklistAsWhitelist=Invert facade blacklist
config.general.pipes.facadeNoLaserRecipe=Add facade recipe without laser
config.general.pipes.hardness=Hardness
config.general.pipes.slimeballWaterproofRecipe=Add slimeball sealant recipe
config.general.quarry=Quarry Options config.general.quarry=Quarry Options
config.general.quarry.oneTimeUse=One-time use config.general.quarry.oneTimeUse=One-time use
config.general.quarry.doChunkLoading=Automatic chunk loading config.general.quarry.doChunkLoading=Automatic chunk loading
config.general.markerRange=Range of markers
config.general.miningDepth=Maximum relative mining depth config.general.miningDepth=Maximum relative mining depth
config.general.pumpDimensionControl=Pump dimension control config.general.pumpDimensionControl=Pump dimension control
@ -109,10 +126,17 @@ config.network.updateFactor=Packet sending factor (ticks)
config.power.miningUsageMultiplier=Mining usage multiplier config.power.miningUsageMultiplier=Mining usage multiplier
config.power.chipsetCostMultiplier=Chipset cost multiplier config.power.chipsetCostMultiplier=Chipset cost multiplier
config.power.gateCostMultiplier=Gate cost multiplier
config.worldgen.enable=Enable config.worldgen.enable=Enable
config.worldgen.generateWaterSprings=Spawn water springs
config.worldgen.oilWellGenerationRate=Oil well generation rate config.worldgen.oilWellGenerationRate=Oil well generation rate
config.worldgen.spawnOilSprings=Spawn oil springs config.worldgen.spawnOilSprings=Spawn oil springs
config.worldgen.biomes.biomeOilDesert=Oil Desert biome id
config.worldgen.biomes.biomeOilOcean=Oil Ocean biome id
config.worldgen.biomes.excessiveOilIDs=Biomes with excessive oil
config.worldgen.biomes.excludeOilIDs=Biomes without oil
config.worldgen.biomes.increasedOilIDs=Biomes with increased oil
direction.north=North direction.north=North

View file

@ -1,6 +1,7 @@
Bugs fixed: Bugs fixed:
* [#2730] fix integration table using energy when it has an invalid recipe (hea3ven) * [#2730] Fix integration table using energy when it has an invalid recipe (hea3ven)
* [#2694] fix client/server desync on the gate copier item (hea3ven) * [#2694] Fix client/server desync on the gate copier item (hea3ven)
* fix gate expansion recipe ignoring the input's stack size (hea3ven) * Fix gate expansion recipe ignoring the input's stack size (hea3ven)
* fix planters dropping items in stead of planting (hea3ven) * Fix planters dropping items in stead of planting (hea3ven)
* Use the OreDict for the pipes recipes (ganymedes01)

View file

@ -148,7 +148,7 @@ public class BuildCraftCore extends BuildCraftMod {
public static BuildCraftCore instance; public static BuildCraftCore instance;
public static final boolean NONRELEASED_BLOCKS = true; public static final boolean NONRELEASED_BLOCKS = true;
public static final boolean TABLET_TESTING = true; public static final boolean TABLET_TESTING = false;
public enum RenderMode { public enum RenderMode {
Full, NoDynamic Full, NoDynamic

View file

@ -21,6 +21,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement; import net.minecraft.stats.Achievement;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
@ -34,6 +35,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
@ -55,6 +57,7 @@ import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms; import buildcraft.core.InterModComms;
import buildcraft.core.Version; import buildcraft.core.Version;
import buildcraft.core.config.ConfigManager; import buildcraft.core.config.ConfigManager;
import buildcraft.core.config.ConfigManager.RestartRequirement;
import buildcraft.core.lib.block.BlockBuildCraftFluid; import buildcraft.core.lib.block.BlockBuildCraftFluid;
import buildcraft.core.lib.engines.TileEngineBase; import buildcraft.core.lib.engines.TileEngineBase;
import buildcraft.core.lib.engines.TileEngineBase.EnergyStage; import buildcraft.core.lib.engines.TileEngineBase.EnergyStage;
@ -120,40 +123,44 @@ public class BuildCraftEnergy extends BuildCraftMod {
BuildcraftFuelRegistry.fuel = FuelManager.INSTANCE; BuildcraftFuelRegistry.fuel = FuelManager.INSTANCE;
BuildcraftFuelRegistry.coolant = CoolantManager.INSTANCE; BuildcraftFuelRegistry.coolant = CoolantManager.INSTANCE;
int oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("worldgen.biomes", "biomeOilDesert", DefaultProps.BIOME_OIL_DESERT).getInt(DefaultProps.BIOME_OIL_DESERT); // TODO: Reload configs without having to close the game
int oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("worldgen.biomes", "biomeOilOcean", DefaultProps.BIOME_OIL_OCEAN).getInt(DefaultProps.BIOME_OIL_OCEAN); int oilDesertBiomeId = BuildCraftCore.mainConfigManager.register("worldgen.biomes",
"biomeOilDesert", DefaultProps.BIOME_OIL_DESERT, "The id for the Oil Desert biome",
RestartRequirement.GAME).getInt();
int oilOceanBiomeId = BuildCraftCore.mainConfigManager.register("worldgen.biomes",
"biomeOilOcean", DefaultProps.BIOME_OIL_OCEAN, "The id for the Oil Ocean biome",
RestartRequirement.GAME).getInt();
BuildCraftCore.mainConfigManager.register("worldgen.spawnOilSprings", true, "Should I spawn oil springs?", ConfigManager.RestartRequirement.GAME); BuildCraftCore.mainConfigManager.register("worldgen.spawnOilSprings", true, "Should I spawn oil springs?", ConfigManager.RestartRequirement.GAME);
BuildCraftCore.mainConfigManager.register("worldgen.oilWellGenerationRate", 1.0D, "How high should be the probability of an oil well generating?", ConfigManager.RestartRequirement.NONE); BuildCraftCore.mainConfigManager.register("worldgen.oilWellGenerationRate", 1.0D, "How high should be the probability of an oil well generating?", ConfigManager.RestartRequirement.NONE);
setBiomeList( setBiomeList(
OilPopulate.INSTANCE.surfaceDepositBiomes, OilPopulate.INSTANCE.surfaceDepositBiomes,
BuildCraftCore.mainConfiguration BuildCraftCore.mainConfigManager
.get("worldgen.biomes", "increasedOilIDs", .register("worldgen.biomes", "increasedOilIDs",
new String[] {BiomeDictionary.Type.SANDY.toString(), BiomeGenBase.taiga.biomeName}, new String[] {BiomeDictionary.Type.SANDY.toString(), BiomeGenBase.taiga.biomeName},
"IDs or Biome Types (e.g. SANDY,OCEAN) of biomes that should have increased oil generation rates.")); "IDs or Biome Types (e.g. SANDY,OCEAN) of biomes that should have increased oil generation rates.", RestartRequirement.GAME));
setBiomeList( setBiomeList(
OilPopulate.INSTANCE.excessiveBiomes, OilPopulate.INSTANCE.excessiveBiomes,
BuildCraftCore.mainConfiguration BuildCraftCore.mainConfigManager
.get("worldgen.biomes", .register("worldgen.biomes", "excessiveOilIDs",
"excessiveOilIDs",
new String[] {}, new String[] {},
"IDs or Biome Types (e.g. SANDY,OCEAN) of biomes that should have GREATLY increased oil generation rates.")); "IDs or Biome Types (e.g. SANDY,OCEAN) of biomes that should have GREATLY increased oil generation rates.", RestartRequirement.GAME));
setBiomeList(OilPopulate.INSTANCE.excludedBiomes, setBiomeList(OilPopulate.INSTANCE.excludedBiomes,
BuildCraftCore.mainConfiguration BuildCraftCore.mainConfigManager
.get("worldgen.biomes", "excludeOilIDs", .register("worldgen.biomes", "excludeOilIDs",
new String[]{BiomeGenBase.sky.biomeName, BiomeGenBase.hell.biomeName}, new String[]{BiomeGenBase.sky.biomeName, BiomeGenBase.hell.biomeName},
"IDs or Biome Types (e.g. SANDY,OCEAN) of biomes that are excluded from generating oil.")); "IDs or Biome Types (e.g. SANDY,OCEAN) of biomes that are excluded from generating oil.", RestartRequirement.GAME));
double fuelLavaMultiplier = BuildCraftCore.mainConfiguration.get("general", "fuel.lava.combustion", 1.0F, "adjust energy value of Lava in Combustion Engines").getDouble(1.0F); double fuelLavaMultiplier = BuildCraftCore.mainConfigManager.register("general", "fuel.lava.combustion", 1.0F, "adjust energy value of Lava in Combustion Engines", RestartRequirement.GAME).getDouble();
double fuelOilMultiplier = BuildCraftCore.mainConfiguration.get("general", "fuel.oil.combustion", 1.0F, "adjust energy value of Oil in Combustion Engines").getDouble(1.0F); double fuelOilMultiplier = BuildCraftCore.mainConfigManager.register("general", "fuel.oil.combustion", 1.0F, "adjust energy value of Oil in Combustion Engines", RestartRequirement.GAME).getDouble();
double fuelFuelMultiplier = BuildCraftCore.mainConfiguration.get("general", "fuel.fuel.combustion", 1.0F, "adjust energy value of Fuel in Combustion Engines").getDouble(1.0F); double fuelFuelMultiplier = BuildCraftCore.mainConfigManager.register("general", "fuel.fuel.combustion", 1.0F, "adjust energy value of Fuel in Combustion Engines", RestartRequirement.GAME).getDouble();
int fuelLavaEnergyOutput = BuildCraftCore.mainConfiguration.get("general", "fuel.lava.combustion.energyOutput", 20, "adjust output energy by Lava in Combustion Engines").getInt(20); int fuelLavaEnergyOutput = BuildCraftCore.mainConfigManager.register("general", "fuel.lava.combustion.energyOutput", 20, "adjust output energy by Lava in Combustion Engines", RestartRequirement.GAME).getInt();
int fuelOilEnergyOutput = BuildCraftCore.mainConfiguration.get("general", "fuel.oil.combustion.energyOutput", 30, "adjust output energy by Oil in Combustion Engines").getInt(30); int fuelOilEnergyOutput = BuildCraftCore.mainConfigManager.register("general", "fuel.oil.combustion.energyOutput", 30, "adjust output energy by Oil in Combustion Engines", RestartRequirement.GAME).getInt();
int fuelFuelEnergyOutput = BuildCraftCore.mainConfiguration.get("general", "fuel.fuel.combustion.energyOutput", 60, "adjust output energy by Fuel in Combustion Engines").getInt(60); int fuelFuelEnergyOutput = BuildCraftCore.mainConfigManager.register("general", "fuel.fuel.combustion.energyOutput", 60, "adjust output energy by Fuel in Combustion Engines", RestartRequirement.GAME).getInt();
BuildCraftCore.mainConfiguration.save(); BuildCraftCore.mainConfiguration.save();

View file

@ -19,6 +19,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement; import net.minecraft.stats.Achievement;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
@ -48,6 +49,7 @@ import buildcraft.core.CompatHooks;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms; import buildcraft.core.InterModComms;
import buildcraft.core.Version; import buildcraft.core.Version;
import buildcraft.core.config.ConfigManager;
import buildcraft.core.network.EntityIds; import buildcraft.core.network.EntityIds;
import buildcraft.core.proxy.CoreProxy; import buildcraft.core.proxy.CoreProxy;
import buildcraft.robotics.BlockRequester; import buildcraft.robotics.BlockRequester;
@ -190,10 +192,9 @@ public class BuildCraftRobotics extends BuildCraftMod {
public void preInit(FMLPreInitializationEvent evt) { public void preInit(FMLPreInitializationEvent evt) {
new BCCreativeTab("boards"); new BCCreativeTab("boards");
blacklistedRobots = new ArrayList<String>(); BuildCraftCore.mainConfigManager.register("general", "boards.blacklist", new String[]{}, "Blacklisted robots boards", ConfigManager.RestartRequirement.GAME);
blacklistedRobots.addAll(Arrays.asList(BuildCraftCore.mainConfiguration.get("general", "boards.blacklist", new String[]{}).getStringList()));
BuildCraftCore.mainConfiguration.save(); reloadConfig(ConfigManager.RestartRequirement.GAME);
robotItem = new ItemRobot().setUnlocalizedName("robot"); robotItem = new ItemRobot().setUnlocalizedName("robot");
CoreProxy.proxy.registerItem(robotItem); CoreProxy.proxy.registerItem(robotItem);
@ -421,4 +422,26 @@ public class BuildCraftRobotics extends BuildCraftMod {
public void processRequests(FMLInterModComms.IMCEvent event) { public void processRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }
public void reloadConfig(ConfigManager.RestartRequirement restartType) {
if (restartType == ConfigManager.RestartRequirement.GAME) {
blacklistedRobots = new ArrayList<String>();
blacklistedRobots.addAll(Arrays.asList(BuildCraftCore.mainConfigManager.get("general",
"boards.blacklist").getStringList()));
reloadConfig(ConfigManager.RestartRequirement.WORLD);
} else if (restartType == ConfigManager.RestartRequirement.WORLD) {
reloadConfig(ConfigManager.RestartRequirement.NONE);
} else {
if (BuildCraftCore.mainConfiguration.hasChanged()) {
BuildCraftCore.mainConfiguration.save();
}
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
if ("BuildCraft|Core".equals(event.modID)) {
reloadConfig(event.isWorldRunning ? ConfigManager.RestartRequirement.NONE : ConfigManager.RestartRequirement.WORLD);
}
}
} }

View file

@ -21,7 +21,9 @@ public class ConfigManager implements IModGuiFactory {
super(parentScreen, new ArrayList<IConfigElement>(), "BuildCraft|Core", "config", false, false, I18n.format("config.buildcraft")); super(parentScreen, new ArrayList<IConfigElement>(), "BuildCraft|Core", "config", false, false, I18n.format("config.buildcraft"));
for (String s : config.getCategoryNames()) { for (String s : config.getCategoryNames()) {
configElements.add(new BCConfigElement(config.getCategory(s))); if (!s.contains(".")) {
configElements.add(new BCConfigElement(config.getCategory(s)));
}
} }
} }
} }
@ -43,9 +45,13 @@ public class ConfigManager implements IModGuiFactory {
} }
public Property get(String iName) { public Property get(String iName) {
String prefix = iName.substring(0, iName.lastIndexOf(".")); int sep = iName.lastIndexOf(".");
ConfigCategory c = config.getCategory(prefix); return get(iName.substring(0, sep), iName.substring(sep + 1));
return c.get(iName.substring(iName.lastIndexOf(".") + 1)); }
public Property get(String catName, String propName) {
ConfigCategory c = config.getCategory(catName);
return c.get(propName);
} }
private Property create(String s, Object o) { private Property create(String s, Object o) {
@ -66,31 +72,35 @@ public class ConfigManager implements IModGuiFactory {
return p; return p;
} }
public Property register(String name, Object property, String comment, RestartRequirement restartRequirement) { public Property register(String catName, String propName, Object property, String comment, RestartRequirement restartRequirement) {
String prefix = name.substring(0, name.lastIndexOf(".")); ConfigCategory c = config.getCategory(catName);
String suffix = name.substring(name.lastIndexOf(".") + 1);
ConfigCategory c = config.getCategory(prefix);
ConfigCategory parent = c; ConfigCategory parent = c;
while (parent != null) { while (parent != null) {
parent.setLanguageKey("config." + parent.getQualifiedName()); parent.setLanguageKey("config." + parent.getQualifiedName());
parent = parent.parent; parent = parent.parent;
} }
Property p; Property p;
if (c.get(suffix) != null) { if (c.get(propName) != null) {
p = c.get(suffix); p = c.get(propName);
} else { } else {
p = create(suffix, property); p = create(propName, property);
c.put(suffix, p); c.put(propName, p);
} }
p.comment = comment; p.comment = comment;
RestartRequirement r = restartRequirement; RestartRequirement r = restartRequirement;
p.setLanguageKey("config." + name); p.setLanguageKey("config." + catName + "." + propName);
p.setRequiresWorldRestart(r == RestartRequirement.WORLD); p.setRequiresWorldRestart(r == RestartRequirement.WORLD);
p.setRequiresMcRestart(r == RestartRequirement.GAME); p.setRequiresMcRestart(r == RestartRequirement.GAME);
return p; return p;
} }
public Property register(String name, Object property, String comment, RestartRequirement restartRequirement) {
String prefix = name.substring(0, name.lastIndexOf("."));
String suffix = name.substring(name.lastIndexOf(".") + 1);
return register(prefix, suffix, property, comment, restartRequirement);
}
@Override @Override
public void initialize(Minecraft minecraftInstance) { public void initialize(Minecraft minecraftInstance) {

View file

@ -34,7 +34,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft {
PULSATING, PULSATING,
QUARTZ, QUARTZ,
COMP, COMP,
EMERALD, Chipset; EMERALD;
public static final Chipset[] VALUES = values(); public static final Chipset[] VALUES = values();
private IIcon icon; private IIcon icon;