Jump to content

Adding Ore Into Game


AssassinHero

Recommended Posts

I have added a block into the game called Nightium...

 

I am now trying to add an ore so i can make nightium

 

I have gone by the previous code and the Ore will not add into the game at all...

 

Can anyone give me steps on how to add an ore??

 

Thanks

STOP CRUCIFYING NEW MODDERS!!!!

Link to comment
Share on other sites

maybe you could finally stoop to post some code? otherwise we're in the dark.

 

This is my code for the BlockNightiumOre Class

 

public class BlockNightiumOre extends Block{

public BlockNightiumOre(int id, int texture, Material material){
	super(id, material.rock);
	this.setCreativeTab(CreativeTabs.tabBlock);


}


public String getTextureFile(){
	return "/parallelworlds/parallelworlds_Blocks_NightiumOre.png";
}




}

 

This is my code for my main class file

 

@Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class ParallelWorlds {

@SidedProxy(clientSide = "parallelworlds.client.ClientProxyParallelWorlds", serverSide = "parallelworlds.common.CommonProxyParallelWorlds")

public static ClientProxyParallelWorlds proxy = new ClientProxyParallelWorlds();

Block parallelworldsBlock;

int parallelworldsBlockID = 682;

@Init
public void load(FMLInitializationEvent event){
	parallelworldsBlock = new BlockParallelWorldsBlock(parallelworldsBlockID, 0, Material.iron).setUnlocalizedName("Nightium").setHardness(8.0F).setResistance(10000.0F).setStepSound(Block.soundStoneFootstep);
	gameRegisters();
	languageRegisters();
	proxy.registerRenders();
}


	public void gameRegisters(){
		GameRegistry.registerBlock(parallelworldsBlock);}

		public void languageRegisters(){

		LanguageRegistry.addName(parallelworldsBlock, "Nightium");

		}

		Block NightiumOre;

		int NightiumOreID = 681;

		@Init
		public void load1(FMLInitializationEvent event){
			NightiumOre = new BlockNightiumOre(NightiumOreID, 1, Material.iron).setUnlocalizedName("Nightium Ore").setHardness(8.0F).setResistance(100000.0F).setStepSound(Block.soundStoneFootstep).setLightValue(1.0F);
			gameRegisters();
			languageRegisters();
			proxy.registerRenders();

		}


		public void gameRegisters1(){
			GameRegistry.registerBlock(NightiumOre);
		}

		public void languageRegisters1(){

			LanguageRegistry.addName(NightiumOre, "NightiumOre");
		}



		}

STOP CRUCIFYING NEW MODDERS!!!!

Link to comment
Share on other sites

You are bumping after less than half an hour? Seriously?

and you have absolutely no clue of programming. That is obvious. I am out.

 

No need to be an idiot

 

Clearly I'm new and learning so the normal thing to do is to help out.

 

Therefore screw you

STOP CRUCIFYING NEW MODDERS!!!!

Link to comment
Share on other sites

You are bumping after less than half an hour? Seriously?

and you have absolutely no clue of programming. That is obvious. I am out.

 

No need to be an idiot

 

Clearly I'm new and learning so the normal thing to do is to help out.

 

Therefore screw you

 

you shouldn't have bumped it so soon. your code formatting is awful. your usage of @init method is unusual (mildly said). you don't use config files to get IDs. ugh, I can't look at this code anymore, there's probably more problems...

 

this is not a Java support forum, learn basics of Java first.

*sigh*, pretty similar to http://www.minecraftforge.net/forum/index.php/topic,6456.0.html.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

Before you start trying to add a block to world generation, you need to program the basic mod file correctly... I hope you dont mind, but i sorted out the base mod file to help you a little.

 

 

@Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class ParallelWorlds {

 

@SidedProxy(clientSide = "parallelworlds.client.ClientProxyParallelWorlds", serverSide = "parallelworlds.common.CommonProxyParallelWorlds")

 

public static ClientProxyParallelWorlds proxy = new ClientProxyParallelWorlds();

 

@Init

public void load(FMLInitializationEvent event){

 

gameRegisters();

languageRegisters();

proxy.registerRenders();

}

 

 

public void gameRegisters(){

GameRegistry.registerBlock(parallelworldsBlock);

GameRegistry.registerBlock(NightiumOre);

}

public void languageRegisters(){

LanguageRegistry.addName(NightiumOre, "NightiumOre");

LanguageRegistry.addName(parallelworldsBlock, "Nightium");

}

 

public static final Block NightiumOre = new BlockNightiumOre(681, 1, Material.iron).setBlockName("Nightium Ore").setHardness(8.0F).setResistance(100000.0F).setStepSound(Block.soundStoneFootstep).setLightValue(1.0F);

public static final Block parallelworldsBlock = new BlockParallelWorldsBlock(682, 0, Material.iron).setBlockName("Nightium").setHardness(8.0F).setResistance(10000.0F).setStepSound(Block.soundStoneFootstep);

 

}

 

 

You made it look a lot more complecated then it had to be, and really there were several errors. I hope this helps :)

Link to comment
Share on other sites

Before you start trying to add a block to world generation, you need to program the basic mod file correctly... I hope you dont mind, but i sorted out the base mod file to help you a little.

 

 

@Mod(modid = "Parallel Worlds", name = "Parallel Worlds", version = "1.0.0")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class ParallelWorlds {

 

@SidedProxy(clientSide = "parallelworlds.client.ClientProxyParallelWorlds", serverSide = "parallelworlds.common.CommonProxyParallelWorlds")

 

public static ClientProxyParallelWorlds proxy = new ClientProxyParallelWorlds();

 

@Init

public void load(FMLInitializationEvent event){

 

gameRegisters();

languageRegisters();

proxy.registerRenders();

}

 

 

public void gameRegisters(){

GameRegistry.registerBlock(parallelworldsBlock);

GameRegistry.registerBlock(NightiumOre);

}

public void languageRegisters(){

LanguageRegistry.addName(NightiumOre, "NightiumOre");

LanguageRegistry.addName(parallelworldsBlock, "Nightium");

}

 

public static final Block NightiumOre = new BlockNightiumOre(681, 1, Material.iron).setBlockName("Nightium Ore").setHardness(8.0F).setResistance(100000.0F).setStepSound(Block.soundStoneFootstep).setLightValue(1.0F);

public static final Block parallelworldsBlock = new BlockParallelWorldsBlock(682, 0, Material.iron).setBlockName("Nightium").setHardness(8.0F).setResistance(10000.0F).setStepSound(Block.soundStoneFootstep);

 

}

 

 

You made it look a lot more complecated then it had to be, and really there were several errors. I hope this helps :)

 

I have restarted the mod. but many thanks for this... I will be using it to help me through the mod :)

STOP CRUCIFYING NEW MODDERS!!!!

Link to comment
Share on other sites

Please stop posting help topics until you at least learn basic Java maybe even intermediate Java

 

A good video tutorial series for Java can be found on http://www.youtube.com/user/thenewboston

 

Even though you are making a mod because you don't understand what it is your code is doing even minimally you're not going to learn anything at all.

 

If you take the time to learn basic-intermediate Java then you will find it much much easier to understand tutorials and understand how to implement code solutions as such.

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.



×
×
  • Create New...

Important Information

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