Made achievements configurable
This commit is contained in:
parent
53cb24154b
commit
d34f691e0a
1 changed files with 75 additions and 64 deletions
|
@ -79,6 +79,7 @@ public class mod_BiomesOPlenty
|
||||||
config.load();
|
config.load();
|
||||||
skyColors = true;
|
skyColors = true;
|
||||||
biomeSize = config.get("Biome Settings", "Biome Size", 4, null).getInt();
|
biomeSize = config.get("Biome Settings", "Biome Size", 4, null).getInt();
|
||||||
|
achievements = config.get("Achievement Settings", "Add Biomes O Plenty Achievemnets (Currently Broken)", false).getBoolean(false);
|
||||||
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", false).getBoolean(false);
|
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", false).getBoolean(false);
|
||||||
vanillaEnhanced = config.get("Biome Settings", "Enhanced Vanilla Biomes", true).getBoolean(false);
|
vanillaEnhanced = config.get("Biome Settings", "Enhanced Vanilla Biomes", true).getBoolean(false);
|
||||||
promisedLandDimID = config.get("Dimension Settings", "Promised Land Dimension ID", 20, null).getInt();
|
promisedLandDimID = config.get("Dimension Settings", "Promised Land Dimension ID", 20, null).getInt();
|
||||||
|
@ -676,6 +677,8 @@ public class mod_BiomesOPlenty
|
||||||
bootsAmethyst = (new ArmorAmethyst(bootsAmethystID, EnumArmorMaterialAmethyst, proxy.addArmor("amethyst"), 3)).setCreativeTab(tabBiomesOPlenty).setUnlocalizedName("bootsAmethyst");
|
bootsAmethyst = (new ArmorAmethyst(bootsAmethystID, EnumArmorMaterialAmethyst, proxy.addArmor("amethyst"), 3)).setCreativeTab(tabBiomesOPlenty).setUnlocalizedName("bootsAmethyst");
|
||||||
|
|
||||||
// Achievement declaration
|
// Achievement declaration
|
||||||
|
if (achievements == true)
|
||||||
|
{
|
||||||
achFlower2 = (new Achievement(3057, "achFlower2", 0, 0, Block.plantRed, (Achievement)null)).registerAchievement();
|
achFlower2 = (new Achievement(3057, "achFlower2", 0, 0, Block.plantRed, (Achievement)null)).registerAchievement();
|
||||||
achRedRock2 = (new Achievement(3058, "achRedRock2", -1, 2, redRock, achFlower2)).registerAchievement();
|
achRedRock2 = (new Achievement(3058, "achRedRock2", -1, 2, redRock, achFlower2)).registerAchievement();
|
||||||
achThorn2 = (new Achievement(3059, "achThorn2", 2, 1, thorn, achFlower2)).registerAchievement();
|
achThorn2 = (new Achievement(3059, "achThorn2", 2, 1, thorn, achFlower2)).registerAchievement();
|
||||||
|
@ -689,6 +692,7 @@ public class mod_BiomesOPlenty
|
||||||
|
|
||||||
pageBOP = new AchievementPage("Biomes O\' Plenty", achFlower2, achRedRock2, achThorn2, achAsh2, achOrigin2, achPromised2, achMud2, achShroom2, achBarley2, achMoss2);
|
pageBOP = new AchievementPage("Biomes O\' Plenty", achFlower2, achRedRock2, achThorn2, achAsh2, achOrigin2, achPromised2, achMud2, achShroom2, achBarley2, achMoss2);
|
||||||
AchievementPage.registerAchievementPage(pageBOP);
|
AchievementPage.registerAchievementPage(pageBOP);
|
||||||
|
}
|
||||||
|
|
||||||
// Add block names
|
// Add block names
|
||||||
LanguageRegistry.addName(mud, "Mud");
|
LanguageRegistry.addName(mud, "Mud");
|
||||||
|
@ -1217,6 +1221,8 @@ public class mod_BiomesOPlenty
|
||||||
GameRegistry.addSmelting(redRockCobble.blockID, new ItemStack(redRock, 1), 0.1F);
|
GameRegistry.addSmelting(redRockCobble.blockID, new ItemStack(redRock, 1), 0.1F);
|
||||||
GameRegistry.addSmelting(tinyCactus.blockID, new ItemStack(Item.dyePowder, 1, 2), 0.2F);
|
GameRegistry.addSmelting(tinyCactus.blockID, new ItemStack(Item.dyePowder, 1, 2), 0.2F);
|
||||||
|
|
||||||
|
if (achievements == true)
|
||||||
|
{
|
||||||
// Add Achievement registration
|
// Add Achievement registration
|
||||||
addAchievementDesc("achFlower2", "Flower Child", "Pick some flowers!");
|
addAchievementDesc("achFlower2", "Flower Child", "Pick some flowers!");
|
||||||
addAchievementDesc("achRedRock2", "Red Rocky Mountain High", "Dig out some red rocks.");
|
addAchievementDesc("achRedRock2", "Red Rocky Mountain High", "Dig out some red rocks.");
|
||||||
|
@ -1228,6 +1234,7 @@ public class mod_BiomesOPlenty
|
||||||
addAchievementDesc("achShroom2", "Trippin\'", "Don\'t try this at home, kids!");
|
addAchievementDesc("achShroom2", "Trippin\'", "Don\'t try this at home, kids!");
|
||||||
addAchievementDesc("achBarley2", "Fields Of Gold", "Upon the fields of barley.");
|
addAchievementDesc("achBarley2", "Fields Of Gold", "Upon the fields of barley.");
|
||||||
addAchievementDesc("achMoss2", "Mossman", "Mothman's long-lost cousin.");
|
addAchievementDesc("achMoss2", "Mossman", "Mothman's long-lost cousin.");
|
||||||
|
}
|
||||||
|
|
||||||
LanguageRegistry.instance().addStringLocalization("generator.BIOMESOP", "en_US", "Biomes O\' Plenty");
|
LanguageRegistry.instance().addStringLocalization("generator.BIOMESOP", "en_US", "Biomes O\' Plenty");
|
||||||
|
|
||||||
|
@ -2245,6 +2252,7 @@ public class mod_BiomesOPlenty
|
||||||
private Configuration config;
|
private Configuration config;
|
||||||
public static boolean skyColors;
|
public static boolean skyColors;
|
||||||
public static int biomeSize;
|
public static int biomeSize;
|
||||||
|
public static boolean achievements;
|
||||||
public static boolean addToDefault;
|
public static boolean addToDefault;
|
||||||
public static boolean vanillaEnhanced;
|
public static boolean vanillaEnhanced;
|
||||||
public static int promisedLandDimID;
|
public static int promisedLandDimID;
|
||||||
|
@ -2804,6 +2812,8 @@ public class mod_BiomesOPlenty
|
||||||
|
|
||||||
// Achievement checker
|
// Achievement checker
|
||||||
public static void onItemPickup(EntityPlayer player, ItemStack item)
|
public static void onItemPickup(EntityPlayer player, ItemStack item)
|
||||||
|
{
|
||||||
|
if (achievements == true)
|
||||||
{
|
{
|
||||||
if (item.itemID == glowFlower.blockID || item.itemID == orangeFlower.blockID || item.itemID == blueFlower.blockID || item.itemID == purpleFlower.blockID || item.itemID == pinkFlower.blockID || item.itemID == whiteFlower.blockID || item.itemID == tinyFlower.blockID || item.itemID == deathbloom.blockID || item.itemID == hydrangea.blockID || item.itemID == violet.blockID || item.itemID == Block.plantRed.blockID || item.itemID == Block.plantYellow.blockID)
|
if (item.itemID == glowFlower.blockID || item.itemID == orangeFlower.blockID || item.itemID == blueFlower.blockID || item.itemID == purpleFlower.blockID || item.itemID == pinkFlower.blockID || item.itemID == whiteFlower.blockID || item.itemID == tinyFlower.blockID || item.itemID == deathbloom.blockID || item.itemID == hydrangea.blockID || item.itemID == violet.blockID || item.itemID == Block.plantRed.blockID || item.itemID == Block.plantYellow.blockID)
|
||||||
{
|
{
|
||||||
|
@ -2846,6 +2856,7 @@ public class mod_BiomesOPlenty
|
||||||
player.addStat(achMoss2, 1);
|
player.addStat(achMoss2, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void addAchievementDesc(String ach, String name, String desc)
|
public static void addAchievementDesc(String ach, String name, String desc)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue