Tutorial 9 says to name the class for recipes as Recipes but at the end says to add ModRecipes.init(); to the main class. when i try to add in the latter it comes as an error. Was this a typo or did i perhaps miss a step?
Tutorial 9 says to name the class for recipes as Recipes but at the end says to add ModRecipes.init(); to the main class. when i try to add in the latter it comes as an error. Was this a typo or did i perhaps miss a step?
Whatever you name your recipe class, you need to call that class in your main class. Make sense? If you name a class one name, and refer to it as another, it won't retrieve anything or the right thing.
Hullo! I've just started on your tutorials, and I'm having a small problem involving the Reference class. To the best of my knowledge, I've got everything written down correctly (apparently not). @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) Now, apparently these have the error: "Reference cannot be resolved to a variable", which I assume means it can't find where I've defined it. Problem is, I've made a .help package, with a Reference class in it. I'm not experienced with Eclipse, so I can't find a way of importing the Reference class into the above line automatically. I will mention that everything else was fine, all those errors were fixed, but it will not give me the option to import with the errors above. Is there a way of fixing this?
Java has a Reference class, so my guess would be you imported the wrong class file.
in the Create new Tab tutorial? It's giving me error and I can clearly say I never had any 'omega' class/field/methods in any of the packages! Please help.
in the Create new Tab tutorial? It's giving me error and I can clearly say I never had any 'omega' class/field/methods in any of the packages! Please help.
That's part of my example. Substitute your item in for that.
I'll come back to this when I can see pictures of the folder/package structure. What you mention is rather vague and confusing when it comes to it's structure and such when creating new files.. This has been causing massive confusion for me. So I'll stick with other guides for now.
Rollback Post to RevisionRollBack
If anyone has any questions or wants to chat, feel free to PM, I don't bite and I'm frankly happy to have a lil' chat. But if you're PMing me just because you disagree with me or feel insulted, bite my shiny metal boiler.
This project is dead --> City of Waterton | A Modern City Insert obligatory achievement get, quote from random person, .gif, or Youtube advertisement here
My YoutubeMy Enjin Only reason I'm including a YT link is since the forums seem to be on a steady decline, I thought I'd provide another place to chat or keep up apart from Enjin.
I'll come back to this when I can see pictures of the folder/package structure. What you mention is rather vague and confusing when it comes to it's structure and such when creating new files.. This has been causing massive confusion for me. So I'll stick with other guides for now.
Package structure that big of a deal. They are different from folders in a way, but they are very much similar. I can try and explain them a bit better here if it helps.
Packages are essentially a folder. Java conventions is where all the words and dots come from. For example, my 'main' package is called com.thexfactor117.ascension. Now, what I mean by 'main' is that it is the package that all other packages will come from. For example, if I create an items package, it will extend off of the 'main' package. One thing you may have realized is that packages cannot be placed inside of other packages, and it is something that spending time around programming gets you more comfortable with. Essentially, you could put all of your class files in one package. With this in mind, you could put all classes in different packages. What I'm trying to say is that you can organize your packages and classes however you wish, and you can create as many packages as you see fit.
All files, or classes in Java terms, are found in packages. This should be something fairly simple to grasp.
Looking at a GitHub repository could also provide some help in understanding how things work in a more user-friendly way. You just need to convert the folders into packages, and so on. This may make things more confusing, or help lighten the situation, but it just depends on what type of 'learner' you are.
If you are still confused as to why everything works this way, I can see about getting some screenshots up.
Package structure that big of a deal. They are different from folders in a way, but they are very much similar. I can try and explain them a bit better here if it helps.
Packages are essentially a folder. Java conventions is where all the words and dots come from. For example, my 'main' package is called com.thexfactor117.ascension. Now, what I mean by 'main' is that it is the package that all other packages will come from. For example, if I create an items package, it will extend off of the 'main' package. One thing you may have realized is that packages cannot be placed inside of other packages, and it is something that spending time around programming gets you more comfortable with. Essentially, you could put all of your class files in one package. With this in mind, you could put all classes in different packages. What I'm trying to say is that you can organize your packages and classes however you wish, and you can create as many packages as you see fit.
All files, or classes in Java terms, are found in packages. This should be something fairly simple to grasp.
Looking at a GitHub repository could also provide some help in understanding how things work in a more user-friendly way. You just need to convert the folders into packages, and so on. This may make things more confusing, or help lighten the situation, but it just depends on what type of 'learner' you are.
If you are still confused as to why everything works this way, I can see about getting some screenshots up.
I had meant it as I know what a package is, it's the order/areas the packages were in. e.g. Place packageX inside of package Y, and so on. Sorry for the misunderstanding. It's just that I learn mostly via visuals. I didnt want to do things such as putting packageG inside of packageZ and causing a whole lot of funk for my self. (Reason why this is sort of an issue for me is that I just can't stand messing up. ;-;)
Rollback Post to RevisionRollBack
If anyone has any questions or wants to chat, feel free to PM, I don't bite and I'm frankly happy to have a lil' chat. But if you're PMing me just because you disagree with me or feel insulted, bite my shiny metal boiler.
This project is dead --> City of Waterton | A Modern City Insert obligatory achievement get, quote from random person, .gif, or Youtube advertisement here
My YoutubeMy Enjin Only reason I'm including a YT link is since the forums seem to be on a steady decline, I thought I'd provide another place to chat or keep up apart from Enjin.
I had meant it as I know what a package is, it's the order/areas the packages were in. e.g. Place packageX inside of package Y, and so on. Sorry for the misunderstanding. It's just that I learn mostly via visuals. I didnt want to do things such as putting packageG inside of packageZ and causing a whole lot of funk for my self. (Reason why this is sort of an issue for me is that I just can't stand messing up. ;-;)
Alright, I see. I can get a bit tricky, but in the end, it doesn't matter what classes go in which packages. As long as you think it is organized, then you are good.
Alright, I see. I can get a bit tricky, but in the end, it doesn't matter what classes go in which packages. As long as you think it is organized, then you are good.
It... doesn't? Well, ya learn something new everyday. ._.
Rollback Post to RevisionRollBack
If anyone has any questions or wants to chat, feel free to PM, I don't bite and I'm frankly happy to have a lil' chat. But if you're PMing me just because you disagree with me or feel insulted, bite my shiny metal boiler.
This project is dead --> City of Waterton | A Modern City Insert obligatory achievement get, quote from random person, .gif, or Youtube advertisement here
My YoutubeMy Enjin Only reason I'm including a YT link is since the forums seem to be on a steady decline, I thought I'd provide another place to chat or keep up apart from Enjin.
It... doesn't? Well, ya learn something new everyday. ._.
As I said previously, you could technically have all your classes in one package. As long as you know where your classes, then you are good. The reason I name them is that is how you'll typically see other open source mods organized.
The tutorials are easy to follow, but i can't hover over the Reference in @Mod annotation and import my new class file. When i hover over the Reference, it just says "Reference cannot be resolved into a variable."
Me for the third time. Now I fixed all of my other errors, and i have 2 curly brackets that are apparently syntax errors. For the first one it says "Syntax error, } to complete Block." (These are { brackets, this way.) The second one says "Syntax Error, } to complete BlockStatements." I don't know how to correct these errors. Should I just turn these brackets around??
Me for the third time. Now I fixed all of my other errors, and i have 2 curly brackets that are apparently syntax errors. For the first one it says "Syntax error, } to complete Block." (These are { brackets, this way.) The second one says "Syntax Error, } to complete BlockStatements." I don't know how to correct these errors. Should I just turn these brackets around??
Close off the block of code with another "}". Not much I can do if I can't see your code.
Yup, the shortcut for somethings just won't appear. This was the same for Reference, and to fix that, I had to manually input the path (after seeing the line from a line from a later tutorial).
Yeah, it will do that. Have you tried closing and re-opening Eclipse? Also, there are two different shortcuts for importing depending on your OS, so make sure you are using the right shortcut for you OS.
Whatever you name your recipe class, you need to call that class in your main class. Make sense? If you name a class one name, and refer to it as another, it won't retrieve anything or the right thing.
Java has a Reference class, so my guess would be you imported the wrong class file.
In that situation, IIconRegister needs to be imported. Is the shortcut not working for you?
returnModItems.omega;
That's part of my example. Substitute your item in for that.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIf anyone has any questions or wants to chat, feel free to PM, I don't bite and I'm frankly happy to have a lil' chat. But if you're PMing me just because you disagree with me or feel insulted, bite my shiny metal boiler.
This project is dead --> City of Waterton | A Modern City Insert obligatory achievement get, quote from random person, .gif, or
Youtube advertisementhereMy Youtube My Enjin Only reason I'm including a YT link is since the forums seem to be on a steady decline, I thought I'd provide another place to chat or keep up apart from Enjin.
Package structure that big of a deal. They are different from folders in a way, but they are very much similar. I can try and explain them a bit better here if it helps.
Packages are essentially a folder. Java conventions is where all the words and dots come from. For example, my 'main' package is called com.thexfactor117.ascension. Now, what I mean by 'main' is that it is the package that all other packages will come from. For example, if I create an items package, it will extend off of the 'main' package. One thing you may have realized is that packages cannot be placed inside of other packages, and it is something that spending time around programming gets you more comfortable with. Essentially, you could put all of your class files in one package. With this in mind, you could put all classes in different packages. What I'm trying to say is that you can organize your packages and classes however you wish, and you can create as many packages as you see fit.
All files, or classes in Java terms, are found in packages. This should be something fairly simple to grasp.
Looking at a GitHub repository could also provide some help in understanding how things work in a more user-friendly way. You just need to convert the folders into packages, and so on. This may make things more confusing, or help lighten the situation, but it just depends on what type of 'learner' you are.
If you are still confused as to why everything works this way, I can see about getting some screenshots up.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI had meant it as I know what a package is, it's the order/areas the packages were in. e.g. Place packageX inside of package Y, and so on. Sorry for the misunderstanding. It's just that I learn mostly via visuals. I didnt want to do things such as putting packageG inside of packageZ and causing a whole lot of funk for my self. (Reason why this is sort of an issue for me is that I just can't stand messing up. ;-;)
If anyone has any questions or wants to chat, feel free to PM, I don't bite and I'm frankly happy to have a lil' chat. But if you're PMing me just because you disagree with me or feel insulted, bite my shiny metal boiler.
This project is dead --> City of Waterton | A Modern City Insert obligatory achievement get, quote from random person, .gif, or
Youtube advertisementhereMy Youtube My Enjin Only reason I'm including a YT link is since the forums seem to be on a steady decline, I thought I'd provide another place to chat or keep up apart from Enjin.
Alright, I see. I can get a bit tricky, but in the end, it doesn't matter what classes go in which packages. As long as you think it is organized, then you are good.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt... doesn't?
If anyone has any questions or wants to chat, feel free to PM, I don't bite and I'm frankly happy to have a lil' chat. But if you're PMing me just because you disagree with me or feel insulted, bite my shiny metal boiler.
This project is dead --> City of Waterton | A Modern City Insert obligatory achievement get, quote from random person, .gif, or
Youtube advertisementhereMy Youtube My Enjin Only reason I'm including a YT link is since the forums seem to be on a steady decline, I thought I'd provide another place to chat or keep up apart from Enjin.
As I said previously, you could technically have all your classes in one package. As long as you know where your classes, then you are good. The reason I name them is that is how you'll typically see other open source mods organized.
There is a method called 'getItemDropped' that you can use.
@Override public Item getItemDropped(int metadata, Random random, int fortune) { return [i]youritemhere;[/i] }Asin Akklae Domaevent);
event);
);
preInit
Init
postInit
I don't know how to get rid of the squiggly lines.
Asin Akklae DomaAsin Akklae DomaClose off the block of code with another "}". Not much I can do if I can't see your code.
Asin Akklae DomaYeah, it will do that. Have you tried closing and re-opening Eclipse? Also, there are two different shortcuts for importing depending on your OS, so make sure you are using the right shortcut for you OS.