Jump to content

[SOLVED][1.7.2] Achievement page error when loading it


MinecraftMart

Recommended Posts

Hey, every time when i load my achievement page it crashes. I dont know what causes the problem but i think my achievement page since that is pretty straight forward. Here is my code

 

Main class

package com.mart.achievements;



import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;


@Mod(modid = Achievements.modid, version = Achievements.version)
public class Achievements {

public static final String modid = "More Achievements!";
public static final String version = "Version 1.0";


@EventHandler
public void config(FMLPreInitializationEvent event)
{
}

//everything
public static Achievement Dirt;
public static Achievement Cobble;

@EventHandler
public void load(FMLInitializationEvent event)
{
	System.out.println("Loaded!");
	MinecraftForge.EVENT_BUS.register(new PickupHandler());
	AchievementPage.registerAchievementPage(page1);
}

@EventHandler
public void modsLoaded(FMLPostInitializationEvent event)
{

	Dirt = new Achievement("achievement.getDirt", "getDirt", 0, 0, Blocks.dirt, (Achievement)null).registerStat();
	this.addAchievementName("Dirt", "Dirt.. Really?");
	this.addAchievementDesc("Dirt", "You just found a piece of dirt..");

	Cobble = new Achievement("achievement.getCobble", "getCobble", 0, 1, Blocks.cobblestone, (Achievement)null).registerStat();
	this.addAchievementName("Cobble", "Well atleast its stone");
	this.addAchievementDesc("Dirt", "1st pieve of cobble! You must be so proud of yourself ");;

}

private void addAchievementName(String ach, String name)
{
LanguageRegistry.instance().addStringLocalization("achievement." + ach, "en_US", name);
}

private void addAchievementDesc(String ach, String desc)
{
LanguageRegistry.instance().addStringLocalization("achievement." + ach + ".desc", "en_US", desc);
}
        //Okay it seems that , Dirt, Cobble makes the page crash. How other should i put it in?? Any ideas?
public static AchievementPage page1 = new AchievementPage("More Achievements!", Dirt, Cobble);






}

 

Crash log

[21:28:30] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering screen
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1239) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1066) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:954) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.NullPointerException
at net.minecraft.client.gui.achievement.GuiAchievements.func_146552_b(GuiAchievements.java:385) ~[GuiAchievements.class:?]
at net.minecraft.client.gui.achievement.GuiAchievements.drawScreen(GuiAchievements.java:219) ~[GuiAchievements.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1209) ~[EntityRenderer.class:?]
... 9 more
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 27-2-14 21:28
Description: Rendering screen

java.lang.NullPointerException: Rendering screen
at net.minecraft.client.gui.achievement.GuiAchievements.func_146552_b(GuiAchievements.java:385)
at net.minecraft.client.gui.achievement.GuiAchievements.drawScreen(GuiAchievements.java:219)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1209)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1066)
at net.minecraft.client.Minecraft.run(Minecraft.java:954)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.client.gui.achievement.GuiAchievements.func_146552_b(GuiAchievements.java:385)
at net.minecraft.client.gui.achievement.GuiAchievements.drawScreen(GuiAchievements.java:219)

-- Screen render details --
Details:
Screen name: net.minecraft.client.gui.achievement.GuiAchievements
Mouse location: Scaled: (191, 203). Absolute: (382, 72)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player125'/419, l='MpServer', x=128,44, y=73,62, z=-208,36]]
Chunk stats: MultiplayerChunkCache: 225, 225
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: World: (120,64,-200), Chunk: (at 8,4,8 in 7,-13; contains blocks 112,0,-208 to 127,255,-193), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Level time: 589 game time, 589 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 120 total; [EntitySquid['Squid'/273, l='MpServer', x=151,43, y=51,39, z=-158,62], EntitySquid['Squid'/272, l='MpServer', x=150,28, y=56,09, z=-144,10], EntityBat['Bat'/258, l='MpServer', x=153,98, y=27,46, z=-207,85], EntityBat['Bat'/259, l='MpServer', x=151,17, y=18,71, z=-211,99], EntityZombie['Zombie'/256, l='MpServer', x=154,53, y=21,00, z=-213,72], EntityCreeper['Creeper'/257, l='MpServer', x=159,53, y=24,00, z=-208,28], EntityZombie['Zombie'/262, l='MpServer', x=144,50, y=13,00, z=-176,50], EntityZombie['Zombie'/263, l='MpServer', x=147,25, y=13,00, z=-182,47], EntityZombie['Zombie'/260, l='MpServer', x=149,56, y=40,00, z=-203,59], EntityCreeper['Creeper'/261, l='MpServer', x=148,69, y=13,00, z=-176,63], EntityItem['item.item.arrow'/266, l='MpServer', x=145,28, y=17,13, z=-180,88], EntityHorse['Horse'/267, l='MpServer', x=144,78, y=70,00, z=-187,22], EntitySkeleton['Skeleton'/264, l='MpServer', x=148,50, y=13,00, z=-179,97], EntityItem['item.item.bone'/265, l='MpServer', x=144,13, y=13,13, z=-176,13], EntitySquid['Squid'/270, l='MpServer', x=148,82, y=56,32, z=-147,05], EntitySquid['Squid'/271, l='MpServer', x=145,78, y=53,34, z=-150,39], EntitySpider['Spider'/268, l='MpServer', x=151,19, y=16,00, z=-170,00], EntitySkeleton['Skeleton'/269, l='MpServer', x=150,88, y=16,00, z=-167,56], EntityZombie['Zombie'/305, l='MpServer', x=171,59, y=57,00, z=-164,31], EntityZombie['Zombie'/304, l='MpServer', x=174,47, y=58,00, z=-165,94], EntityZombie['Zombie'/306, l='MpServer', x=174,50, y=36,00, z=-156,50], EntityHorse['Horse'/289, l='MpServer', x=162,50, y=72,00, z=-279,09], EntityHorse['Donkey'/292, l='MpServer', x=163,09, y=69,00, z=-238,97], EntityCreeper['Creeper'/293, l='MpServer', x=162,50, y=13,00, z=-217,50], EntityCreeper['Creeper'/294, l='MpServer', x=162,83, y=13,00, z=-214,40], EntityCreeper['Creeper'/295, l='MpServer', x=175,94, y=22,00, z=-219,53], EntitySkeleton['Skeleton'/296, l='MpServer', x=162,00, y=26,00, z=-210,69], EntitySkeleton['Skeleton'/297, l='MpServer', x=160,46, y=24,00, z=-210,56], EntitySkeleton['Skeleton'/298, l='MpServer', x=174,50, y=46,00, z=-215,50], EntitySkeleton['Skeleton'/299, l='MpServer', x=175,50, y=46,00, z=-215,50], EntityCreeper['Creeper'/300, l='MpServer', x=173,25, y=46,00, z=-200,41], EntityWitch['Witch'/301, l='MpServer', x=175,50, y=31,00, z=-186,81], EntitySpider['Spider'/302, l='MpServer', x=172,71, y=24,17, z=-169,54], EntitySkeleton['Skeleton'/303, l='MpServer', x=172,31, y=24,00, z=-167,47], EntityZombie['Zombie'/343, l='MpServer', x=187,87, y=21,00, z=-147,19], EntitySkeleton['Skeleton'/342, l='MpServer', x=177,88, y=26,00, z=-148,47], EntitySkeleton['Skeleton'/341, l='MpServer', x=179,28, y=25,00, z=-153,50], EntitySkeleton['Skeleton'/340, l='MpServer', x=176,50, y=24,00, z=-164,50], EntitySquid['Squid'/339, l='MpServer', x=189,78, y=47,00, z=-188,36], EntityCreeper['Creeper'/338, l='MpServer', x=178,78, y=30,00, z=-183,91], EntitySpider['Spider'/337, l='MpServer', x=189,31, y=28,91, z=-183,28], EntitySquid['Squid'/336, l='MpServer', x=183,52, y=48,00, z=-195,09], EntityCow['Cow'/78, l='MpServer', x=63,09, y=69,00, z=-287,63], EntityCow['Cow'/79, l='MpServer', x=50,31, y=67,00, z=-281,53], EntitySquid['Squid'/346, l='MpServer', x=189,64, y=47,44, z=-144,87], EntityCreeper['Creeper'/345, l='MpServer', x=178,54, y=36,24, z=-157,49], EntityZombie['Zombie'/344, l='MpServer', x=188,50, y=21,00, z=-149,50], EntityHorse['Donkey'/326, l='MpServer', x=181,16, y=72,00, z=-253,03], EntitySkeleton['Skeleton'/327, l='MpServer', x=189,35, y=46,00, z=-209,18], EntityHorse['Donkey'/324, l='MpServer', x=179,72, y=72,00, z=-250,97], EntityHorse['Donkey'/325, l='MpServer', x=177,03, y=73,00, z=-255,97], EntityHorse['Donkey'/322, l='MpServer', x=178,72, y=74,00, z=-256,72], EntityCow['Cow'/80, l='MpServer', x=60,48, y=69,00, z=-281,11], EntityHorse['Donkey'/323, l='MpServer', x=182,28, y=72,00, z=-251,19], EntityHorse['Horse'/321, l='MpServer', x=190,00, y=73,00, z=-274,00], EntitySpider['Spider'/334, l='MpServer', x=181,59, y=47,00, z=-203,91], EntityBat['Bat'/335, l='MpServer', x=182,67, y=47,63, z=-204,93], EntityCreeper['Creeper'/332, l='MpServer', x=176,50, y=46,00, z=-207,50], EntityCreeper['Creeper'/333, l='MpServer', x=181,50, y=46,00, z=-206,38], EntityCreeper['Creeper'/330, l='MpServer', x=186,50, y=42,00, z=-206,50], EntityCreeper['Creeper'/331, l='MpServer', x=179,50, y=46,00, z=-205,50], EntitySkeleton['Skeleton'/328, l='MpServer', x=190,31, y=25,00, z=-195,22], EntitySkeleton['Skeleton'/329, l='MpServer', x=189,31, y=25,00, z=-197,50], EntityBat['Bat'/368, l='MpServer', x=193,13, y=21,72, z=-155,53], EntityHorse['Horse'/356, l='MpServer', x=192,78, y=75,00, z=-275,22], EntitySkeleton['Skeleton'/357, l='MpServer', x=197,50, y=26,00, z=-196,50], EntityZombie['Zombie'/358, l='MpServer', x=203,50, y=38,00, z=-202,50], EntityCreeper['Creeper'/359, l='MpServer', x=200,85, y=45,00, z=-201,50], EntityHorse['Horse'/355, l='MpServer', x=196,50, y=75,00, z=-275,50], EntityBat['Bat'/364, l='MpServer', x=193,75, y=45,10, z=-202,59], EntitySkeleton['Skeleton'/366, l='MpServer', x=197,78, y=17,00, z=-154,41], EntitySquid['Squid'/124, l='MpServer', x=71,32, y=48,94, z=-218,24], EntityEnderman['Enderman'/367, l='MpServer', x=198,00, y=23,00, z=-147,16], EntityCow['Cow'/123, l='MpServer', x=66,69, y=70,00, z=-284,28], EntityBat['Bat'/360, l='MpServer', x=200,59, y=43,10, z=-200,94], EntityZombie['Zombie'/361, l='MpServer', x=199,98, y=45,00, z=-201,49], EntityBat['Bat'/362, l='MpServer', x=192,75, y=46,10, z=-202,56], EntitySkeleton['Skeleton'/363, l='MpServer', x=194,91, y=47,00, z=-202,47], EntityBat['Bat'/149, l='MpServer', x=90,72, y=34,10, z=-244,33], EntityZombie['Zombie'/163, l='MpServer', x=111,50, y=41,00, z=-211,50], EntitySkeleton['Skeleton'/162, l='MpServer', x=104,46, y=35,00, z=-251,50], EntityBat['Bat'/161, l='MpServer', x=104,92, y=39,28, z=-251,09], EntitySkeleton['Skeleton'/167, l='MpServer', x=100,50, y=23,00, z=-170,50], EntityZombie['Zombie'/166, l='MpServer', x=102,50, y=40,00, z=-212,50], EntityCreeper['Creeper'/165, l='MpServer', x=101,25, y=40,00, z=-213,25], EntityCreeper['Creeper'/164, l='MpServer', x=103,50, y=40,00, z=-212,00], EntityCreeper['Creeper'/186, l='MpServer', x=117,38, y=42,00, z=-209,31], EntityCreeper['Creeper'/187, l='MpServer', x=114,09, y=42,00, z=-208,53], EntityCreeper['Creeper'/190, l='MpServer', x=120,06, y=26,00, z=-176,50], EntitySkeleton['Skeleton'/191, l='MpServer', x=119,78, y=26,00, z=-178,31], EntityBat['Bat'/188, l='MpServer', x=125,75, y=18,10, z=-193,47], EntityCreeper['Creeper'/189, l='MpServer', x=124,69, y=12,00, z=-181,91], EntityClientPlayerMP['Player125'/419, l='MpServer', x=128,44, y=73,62, z=-208,36], EntitySquid['Squid'/201, l='MpServer', x=118,63, y=51,25, z=-147,88], EntityBat['Bat'/200, l='MpServer', x=118,70, y=29,06, z=-174,76], EntitySkeleton['Skeleton'/197, l='MpServer', x=118,28, y=26,00, z=-171,41], EntityZombie['Zombie'/196, l='MpServer', x=118,53, y=26,00, z=-170,47], EntityCreeper['Creeper'/199, l='MpServer', x=120,60, y=26,00, z=-170,56], EntitySkeleton['Skeleton'/198, l='MpServer', x=124,25, y=26,00, z=-167,69], EntityZombie['Zombie'/193, l='MpServer', x=120,50, y=26,00, z=-172,50], EntityZombie['Zombie'/192, l='MpServer', x=121,47, y=27,00, z=-176,98], EntitySkeleton['Skeleton'/195, l='MpServer', x=122,28, y=26,00, z=-170,44], EntityZombie['Zombie'/194, l='MpServer', x=117,50, y=26,00, z=-172,50], EntitySquid['Squid'/235, l='MpServer', x=141,70, y=57,31, z=-160,87], EntitySlime['Slime'/234, l='MpServer', x=136,84, y=15,00, z=-166,00], EntityCreeper['Creeper'/233, l='MpServer', x=133,44, y=30,12, z=-164,30], EntityWitch['Witch'/232, l='MpServer', x=130,50, y=29,00, z=-169,50], EntityHorse['Horse'/231, l='MpServer', x=138,00, y=64,00, z=-182,00], EntityCreeper['Creeper'/230, l='MpServer', x=142,97, y=13,00, z=-186,47], EntityBat['Bat'/229, l='MpServer', x=135,78, y=15,02, z=-190,22], EntityBat['Bat'/228, l='MpServer', x=137,31, y=14,13, z=-208,81], EntityHorse['Horse'/227, l='MpServer', x=140,19, y=73,00, z=-212,81], EntityHorse['Horse'/226, l='MpServer', x=135,19, y=73,00, z=-216,50], EntitySkeleton['Skeleton'/225, l='MpServer', x=136,50, y=16,00, z=-218,50], EntityHorse['Donkey'/254, l='MpServer', x=156,00, y=69,00, z=-235,75], EntityHorse['Donkey'/255, l='MpServer', x=156,00, y=69,00, z=-239,97], EntityHorse['Donkey'/252, l='MpServer', x=157,78, y=69,00, z=-234,72], EntityHorse['Donkey'/253, l='MpServer', x=153,78, y=69,00, z=-236,22], EntityHorse['Horse'/250, l='MpServer', x=157,16, y=76,00, z=-282,13], EntityBat['Bat'/251, l='MpServer', x=154,60, y=15,53, z=-230,20]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:418)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2559)
at net.minecraft.client.Minecraft.run(Minecraft.java:976)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 711327256 bytes (678 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 12006 (672336 bytes; 0 MB) allocated, 12 (672 bytes; 0 MB) used
IntCache: cache: 11, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.01-pre FML v7.2.125.1033 Minecraft Forge 10.12.0.1033 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.125.1033} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1033.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.0.1033} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1033.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
More Achievements!{Version 1.0} [More Achievements!] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: ATI Mobility Radeon HD 5470 GL version 3.2.9262 Compatibility Profile Context, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 4826 (270256 bytes; 0 MB) allocated, 69 (3864 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Mart\Desktop\ForgeModding\eclipse\.\crash-reports\crash-2014-02-27_21.28.30-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

I hope you can help me :D

 

Okay it seems that , Dirt, Cobble makes the page crash. How other should i put it in?? Any ideas?

public static AchievementPage page1 = new AchievementPage("More Achievements!", Dirt, Cobble);

Is what i am talking about

Link to comment
Share on other sites

        @EventHandler
public void config(FMLPreInitializationEvent event)
{
}

//everything
public static Achievement Dirt;
public static Achievement Cobble;

@EventHandler
public void load(FMLInitializationEvent event)
{
	System.out.println("Loaded!");
	MinecraftForge.EVENT_BUS.register(new PickupHandler());
	AchievementPage.registerAchievementPage(page1);
}

@EventHandler
public void modsLoaded(FMLPostInitializationEvent event)
{

	Dirt = new Achievement("achievement.getDirt", "getDirt", 0, 0, Blocks.dirt, (Achievement)null).registerStat();
	this.addAchievementName("Dirt", "Dirt.. Really?");
	this.addAchievementDesc("Dirt", "You just found a piece of dirt..");

	Cobble = new Achievement("achievement.getCobble", "getCobble", 0, 1, Blocks.cobblestone, (Achievement)null).registerStat();
	this.addAchievementName("Cobble", "Well atleast its stone");
	this.addAchievementDesc("Dirt", "1st pieve of cobble! You must be so proud of yourself ");;

}

private void addAchievementName(String ach, String name)
{
LanguageRegistry.instance().addStringLocalization("achievement." + ach, "en_US", name);
}

private void addAchievementDesc(String ach, String desc)
{
LanguageRegistry.instance().addStringLocalization("achievement." + ach + ".desc", "en_US", desc);
}
        //Okay it seems that , Dirt, Cobble makes the page crash. How other should i put it in?? Any ideas?
public static AchievementPage page1 = new AchievementPage("More Achievements!", Dirt, Cobble);
}

 

*Sigh* I thought it would pull a NPE. You do know post-init comes AFTER init right? You're rendering something that came after the achievement page was registered. To do it correctly, you should've done this:

 

public static AchievementPage page1;
public static Achievement Dirt;
public static Achievement Cobble;

@EventHandler
public void load(FMLInitializationEvent event) {

Dirt = new Achievement("achievement.getDirt", "getDirt", 0, 0, Blocks.dirt, (Achievement)null).registerStat();
this.addAchievementName("Dirt", "Dirt.. Really?");
this.addAchievementDesc("Dirt", "You just found a piece of dirt..");

Cobble = new Achievement("achievement.getCobble", "getCobble", 0, 1, Blocks.cobblestone, (Achievement)null).registerStat();
this.addAchievementName("Cobble", "Well atleast its stone");
this.addAchievementDesc("Dirt", "1st pieve of cobble! You must be so proud of yourself ");

page1 = new AchievementPage("More Achievements!", Dirt, Cobble);
}

@EventHandler 
public void postInit(FMLPostInitializationEvent event) {
System.out.println("Loaded!");
MinecraftForge.EVENT_BUS.register(new PickupHandler());
AchievementPage.registerAchievementPage(page1);
}


private void addAchievementName(String ach, String name)
{
LanguageRegistry.instance().addStringLocalization("achievement." + ach, "en_US", name);
}

private void addAchievementDesc(String ach, String desc)
{
LanguageRegistry.instance().addStringLocalization("achievement." + ach + ".desc", "en_US", desc);
}

 

Enjoy!

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
    • OLXTOTO adalah situs bandar togel online resmi terbesar dan terpercaya di Indonesia. Bergabunglah dengan OLXTOTO dan nikmati pengalaman bermain togel yang aman dan terjamin. Koleksi toto 4D dan togel toto terlengkap di OLXTOTO membuat para member memiliki pilihan taruhan yang lebih banyak. Sebagai situs togel terpercaya, OLXTOTO menjaga keamanan dan kenyamanan para membernya dengan sistem keamanan terbaik dan enkripsi data. Transaksi yang cepat, aman, dan terpercaya merupakan jaminan dari OLXTOTO. Nikmati layanan situs toto terbaik dari OLXTOTO dengan tampilan yang user-friendly dan mudah digunakan. Layanan pelanggan tersedia 24/7 untuk membantu para member. Bergabunglah dengan OLXTOTO sekarang untuk merasakan pengalaman bermain togel yang menyenangkan dan menguntungkan.
    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.