Add 1.7 Woodtypes to the Config Description

This commit is contained in:
Sn0wStorm 2014-08-25 21:43:25 +02:00
parent 620ab93b6c
commit ebfbda884a
2 changed files with 40 additions and 19 deletions

View File

@ -55,7 +55,7 @@ openLargeBarrelEverywhere: true
autosave: 3
# Config Version
version: '1.2'
version: '1.3'
# -- Recipes for Potions --
@ -66,7 +66,7 @@ version: '1.2'
# You can specify a data value, omitting it will ignore the data value of the added ingredient
# cookingtime: Time in real minutes ingredients have to boil
# distillruns: How often it has to be distilled for full alcohol (0=without distilling)
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak
# age: Time in Minecraft-days, the potion has to age in a barrel 0=no aging
# color: Color of the potion after distilling/aging. DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
# difficulty: 1-10 accuracy needed to get good quality (1 = unaccurate/easy, 10 = very precise/hard)

View File

@ -105,7 +105,16 @@ public class ConfigUpdater {
fromVersion = "1.2";
}
if (!fromVersion.equals("1.2")) {
if (fromVersion.equals("1.2")) {
if (lang.equals("de")) {
update12de();
} else {
update12en();
}
fromVersion = "1.3";
}
if (!fromVersion.equals("1.3")) {
P.p.log(P.p.languageReader.get("Error_ConfigUpdate", fromVersion));
return;
}
@ -379,10 +388,16 @@ public class ConfigUpdater {
private void update12de() {
updateVersion("1.3");
// Add the Example to the Cooked Section
int index = indexOfStart("# cooked:");
// Add the new Wood Types to the Description
int index = indexOfStart("# wood:");
if (index != -1) {
addLines(index, "# [Beispiel] MATERIAL_oder_id: Name nach Gähren");
setLine(index, "# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak");
}
// Add the Example to the Cooked Section
index = indexOfStart("# cooked:");
if (index != -1) {
addLines(index + 1, "# [Beispiel] MATERIAL_oder_id: Name nach Gähren");
}
// Add new ingredients description
@ -394,17 +409,17 @@ public class ConfigUpdater {
index = indexOfStart("# ingredients:");
if (index != -1) {
setLine(index, replacedLine);
addLines(index, lines);
addLines(index + 1, lines);
} else {
index = indexOfStart("# name:");
if (index != -1) {
addLines(index, lines);
addLines(index, replacedLine);
addLines(index + 1, lines);
addLines(index + 1, replacedLine);
} else {
index = indexOfStart("# -- Rezepte für Getränke --");
if (index != -1) {
addLines(index, lines);
addLines(index, "", replacedLine);
addLines(index + 2, lines);
addLines(index + 2, "", replacedLine);
}
}
}
@ -415,10 +430,16 @@ public class ConfigUpdater {
private void update12en() {
updateVersion("1.3");
// Add the Example to the Cooked Section
int index = indexOfStart("# cooked:");
// Add the new Wood Types to the Description
int index = indexOfStart("# wood:");
if (index != -1) {
addLines(index, "# [Example] MATERIAL_or_id: Name after cooking");
setLine(index, "# wood: Holz des Fasses 0=alle Holzsorten 1=Birke 2=Eiche 3=Jungel 4=Fichte 5=Akazie 6=Schwarzeiche");
}
// Add the Example to the Cooked Section
index = indexOfStart("# cooked:");
if (index != -1) {
addLines(index + 1, "# [Example] MATERIAL_or_id: Name after cooking");
}
// Add new ingredients description
@ -430,17 +451,17 @@ public class ConfigUpdater {
index = indexOfStart("# ingredients:");
if (index != -1) {
setLine(index, replacedLine);
addLines(index, lines);
addLines(index + 1, lines);
} else {
index = indexOfStart("# name:");
if (index != -1) {
addLines(index, lines);
addLines(index, replacedLine);
addLines(index + 1, lines);
addLines(index + 1, replacedLine);
} else {
index = indexOfStart("# -- Recipes for Potions --");
if (index != -1) {
addLines(index, lines);
addLines(index, "", replacedLine);
addLines(index + 2, lines);
addLines(index + 2, "", replacedLine);
}
}
}