Jump to content

Noob question, hopefully an easy one.


mrhappy42

Recommended Posts

My son and I want to make a mod, I coded in the past and he is learning but knows Minecraft so a good team.

 

Setup Eclipse and Forge, sample runs and we can put in some test code - so all is well - thank you.

 

We put it a popup message.

Then we added code to make a diamond out of dirt in the crafting table.

 

Ok. so now we want to make our own block.

 

However we are seeing some issues with the sample code around on websites and youtube, namely.

 

- setUnlocalizedName does not seem to be available

- addName seems to be deprecated

- when extending Block the super class does not take material like it does in most examples public Something(int id, Material mat) { super(id, mat); }

 

Leads me to think we are not in sync with some version of minecraft or Forge. So some versions.

 

When we run minecraft as a client in debug the minecraft splashscreen has.

 

- Minecraft 1.7.2

- MCP v9.01-pre

- FML v7.2.116.1024

- Forge 10.12.0.1024

- 4 mods loaded, 4 mods active (goes to 3 when we try to add a block)

 

He wants to make a big chest with some colours on it. I just want it to compile :-)

 

 

Link to comment
Share on other sites

My son and I want to make a mod, I coded in the past and he is learning but knows Minecraft so a good team.

 

Setup Eclipse and Forge, sample runs and we can put in some test code - so all is well - thank you.

 

We put it a popup message.

Then we added code to make a diamond out of dirt in the crafting table.

 

Ok. so now we want to make our own block.

 

However we are seeing some issues with the sample code around on websites and youtube, namely.

 

- setUnlocalizedName does not seem to be available

- addName seems to be deprecated

- when extending Block the super class does not take material like it does in most examples public Something(int id, Material mat) { super(id, mat); }

 

Leads me to think we are not in sync with some version of minecraft or Forge. So some versions.

 

When we run minecraft as a client in debug the minecraft splashscreen has.

 

- Minecraft 1.7.2

- MCP v9.01-pre

- FML v7.2.116.1024

- Forge 10.12.0.1024

- 4 mods loaded, 4 mods active (goes to 3 when we try to add a block)

 

He wants to make a big chest with some colours on it. I just want it to compile :-)

 

1 & 2. More details on setUnlocalizedName not being available? (give code that calls it, give error message) Make sure you're calling it on something that extends block or is a block...

3. the constructor no longer uses an i.d., do it like this:

public sampleConstructor(Material m)
{
super(Material m);
}

Link to comment
Share on other sites

The tutorial worked - nice one.

Glad the whole id thing is gone.

 

We now got a block - textures tomorrow.

 

Good night thank you all.

I hope you guys enjoy coding. I am 12 at the moment, turning 13 in a few months. So I do know how much your son might be enjoying it, specially game programming and not anything else. If you need help, be sure to PM me, I will do my best to help.

 

Regards,

Ablaze.

Add me on Skype: AblazeTheBest. Send a message saying "#HeyAblaze"

 

Currently: Making a mod!

Link to comment
Share on other sites

We got all the graphics working etc. we also played around with some methods etc.

 

One thing that does not work is the entity, it appears and then disappears again - it has our graphic (chain mail).

 

We can see the output window of Eclipse the object is created.

 

I'll post the files the files up in the original post.

 

Again thank you for the help so far. Hope the files we post will help others as well.

 

I've zipped the whole file from withing forge.

 

We had it in the location of

 

C:\Users\black\Forge\src

 

 

 

 

 

 

Link to comment
Share on other sites

I haven't downloaded your source (please use Pastebin, an online repository, or some other way to let us view your source, as I doubt most will be willing to download), but here are a few suggestions:

 

1. If your entity is a mob, are you on peaceful? They will automatically despawn on peaceful, making them "disappear"

 

2. If you are not using a spawn egg, make sure you are spawning your mob on the server side only, like so:

if (!world.isRemote) {
world.spawnEntityInWorld(yourEntity);
}

 

If neither of those work, please post your code so we can see it, starting with your custom Entity class and the method you use to spawn it.

Link to comment
Share on other sites

Firstly, what CoolAlias said - mainly use Gist or Pastebin.

 

Next, the title "Noob question, hopefully an easy one." gives us no idea what your problem is.

 

Last, I think you should create a new thread for a new problem. Just my personal opinion, no rule like this. I'll tell you why. If A creates a thread, "I can't solve problem EFG!" and asks for help, people answer his queries. Next, in the same thread, if A begins talking about problem HIJ (remember he doesn't make a new thread). Now, if B has a problem EFG, he googles it and finds A's thread and tries to find the solution. However, this gets confusing as there is discussion on both problems EFG and HIJ!

So making a new thread will help others too.

Add me on Skype: AblazeTheBest. Send a message saying "#HeyAblaze"

 

Currently: Making a mod!

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



×
×
  • Create New...

Important Information

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