Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #30 from RenEvo/1.8.9
Browse files Browse the repository at this point in the history
Added new xbcrafted achievement.
  • Loading branch information
renevo committed May 14, 2016
2 parents 73587f6 + 0ae35ac commit 361a653
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 24 deletions.
4 changes: 2 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_version=1.3.6
mod_version=1.3.7
minecraft_version=1.8.9
forge_version=11.15.1.1764
forge_version=11.15.1.1902-1.8.9
mappings=stable_20

mantle_version=0.9.+
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/renevo/nethercore/NetherCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import java.util.Random;
import org.apache.logging.log4j.Logger;

import com.renevo.nethercore.common.CommonProxy;
import com.renevo.nethercore.common.Config;

@Mod(
modid = Util.MODID,
dependencies = "required-after:Forge@[11.15.1,);required-after:mantle@[1.8.9-0.7,)",
dependencies = "required-after:Forge@[11.15.1,);required-after:mantle@[1.8.9-0.9,)",
acceptedMinecraftVersions = "1.8.9",
updateJSON = "https://raw.githubusercontent.com/RenEvo/nethercore/master/update.json",
useMetadata = true,
Expand Down
34 changes: 24 additions & 10 deletions src/main/java/com/renevo/nethercore/NetherCoreAchievements.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.renevo.nethercore.blocks.NetherCoreBlocks;
import com.renevo.nethercore.item.NetherCoreItems;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.stats.Achievement;
Expand All @@ -22,25 +23,30 @@ private NetherCoreAchievements() {
public static Achievement netherStoneAchievement;
public static Achievement netherFurnaceAchievement;

public static void init() {

netherOreAchievement = new Achievement("achievement.netherore", "netherore", -2, 10, NetherCoreItems.netherOreIron, AchievementList.portal);
netherOreAchievement.registerStat();
// xBCrafted achievement
public static Achievement xbAchievement;

compressionAchievement = new Achievement("achievement.compressednether", "compressednether", -2, 12, NetherCoreBlocks.blockCompressedNetherrack, netherOreAchievement);
compressionAchievement.registerStat();
public static void init() {

netherSporeAchievement = new Achievement("achievement.netherspore", "netherspore", 0, 11, NetherCoreItems.netherSpore, AchievementList.blazeRod);
netherSporeAchievement = new Achievement("achievement.netherspore", "netherspore", 0, 12, NetherCoreItems.netherSpore, AchievementList.blazeRod);
netherSporeAchievement.registerStat();

netherStoneAchievement = new Achievement("achievement.netherstone", "netherstone", -4, 10, NetherCoreItems.stoneCobble, AchievementList.portal);
netherStoneAchievement = new Achievement("achievement.netherstone", "netherstone", -2, 10, NetherCoreItems.stoneCobble, AchievementList.portal);
netherStoneAchievement.registerStat();

netherFurnaceAchievement = new Achievement("achievement.netherfurnace", "netherfurnace", -6, 10, NetherCoreBlocks.blockNetherFurnace, netherStoneAchievement);
netherFurnaceAchievement = new Achievement("achievement.netherfurnace", "netherfurnace", -4, 10, NetherCoreBlocks.blockNetherFurnace, netherStoneAchievement);
netherFurnaceAchievement.registerStat();

MinecraftForge.EVENT_BUS.register(new NetherCoreAchievements());
netherOreAchievement = new Achievement("achievement.netherore", "netherore", -2, 12, NetherCoreItems.netherOreIron, AchievementList.portal);
netherOreAchievement.registerStat();

compressionAchievement = new Achievement("achievement.compressednether", "compressednether", -4, 12, NetherCoreBlocks.blockCompressedNetherrack, netherOreAchievement);
compressionAchievement.registerStat();

xbAchievement = new Achievement("achievement.xbcrafted", "xbcrafted", -6, 12, Items.nether_star, compressionAchievement);
xbAchievement.registerStat().setSpecial();

MinecraftForge.EVENT_BUS.register(new NetherCoreAchievements());
}

@SubscribeEvent
Expand Down Expand Up @@ -73,4 +79,12 @@ public void onCraftItem(PlayerEvent.ItemCraftedEvent event) {
return;
}
}

@SubscribeEvent
public void onSmeltItem(PlayerEvent.ItemSmeltedEvent event) {
if (event.smelting.getItem() == Items.nether_star) {
event.player.addStat(xbAchievement, 1);
return;
}
}
}
10 changes: 6 additions & 4 deletions src/main/resources/assets/nethercore/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ achievement.compressednether=Compression
achievement.compressednether.desc=Construct a compressed block out of nine netherrack
achievement.netherspore=Terra Nether Craft
achievement.netherspore.desc=Craft a nether spore to terraform the Nether
achievement.netherStoneAchievement=Red Cobble
achievement.netherStoneAchievement.desc=Craft Nether Cobble from four Netherrack
achievement.netherFurnaceAchievement=Hotter Topic
achievement.netherFurnaceAchievement.desc=Construct a Nether Furnace out of eight Nether Cobblestone and a Magma Cream
achievement.netherstone=Red Cobble
achievement.netherstone.desc=Craft Nether Cobble from four Netherrack
achievement.netherfurnace=Hotter Topic
achievement.netherfurnace.desc=Construct a Nether Furnace out of eight Nether Cobblestone and a Magma Cream
achievement.xbcrafted=So good at this game!
achievement.xbcrafted.desc=Smelt an Octuple Compressed Netherrack into a Nether Star
11 changes: 6 additions & 5 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"homepage": "https://github.com/RenEvo/nethercore/releases",
"promos": {
"1.8.9-latest": "1.3.5",
"1.8.9-recommended": "1.3.5",
"latest": "1.3.5",
"recommended": "1.3.5"
"1.8.9-latest": "1.3.7",
"1.8.9-recommended": "1.3.7",
"latest": "1.3.7",
"recommended": "1.3.7"
},
"1.8.9": {
"1.0.0": "Initial Release",
Expand All @@ -21,6 +21,7 @@
"1.3.3": "Added Soul Glass",
"1.3.4": "Added Nether Coal",
"1.3.5": "Added Configuration",
"1.3.6": "Updated Nether Ore - Lapis to properly smelt to lapis, and not cactus green."
"1.3.6": "Updated Nether Ore - Lapis to properly smelt to lapis, and not cactus green.",
"1.3.7": "Added a special achievement for xBCrafted"
}
}

0 comments on commit 361a653

Please sign in to comment.