Heh, that's how some TiC stuff has looked for a loooong time. Player holds the Rapier like its a gun or Police Baton xD Because TiC has had that issue so long, I'm guessing it's not as simple a solution as one might think!
Can you just help me? It's annoying when people say your code is messy when I'm not asking if my code is messy or not. Please just tell me how to do this in 1.6.4.
And I do not use MCreator.
The reason why we're getting at you for messy coding is because we have to read your code to help you. To work out what you have done wrong, we need to read your code, which if your code is messy, will take a while and will make us annoyed.
What they meant by saying to not cram your code in the one class is to separate your code out into different classes. Have your main mod class be as clean as possible, make another class called ModItems or whatever and place your item / block fields, registration, recipes, etc in there. Then call a method in ModItems from your main mod class to load your items up. It seems like a trivial thing to start off with, but programming is not a job, it's an art. Each person has different coding styles, each person combats a specific issue in a different way, and each person likes code to be readable. You can cram everything together, but then no one will want to read it because it will be a pain to sift through, and this especially becomes the case when you open-source your code.
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
Well anyone who knows how to fence and use a rapier probably also has the concentration levels to learn psychic powers.
What the heck is that supposed to mean? Even in first person when you use the rapier, you can see how the player is holding the rapier by the crossguard instead of the hilt/handle. 1st/3rd person is irelevant. If you're saying people need to have psychic-level concentration to know how to hold objects with handles properly then I'm very concerned for your mental health lol.
My point was that it's the same problem as the OP is now having, and it's *not* intentional - current developer of TiC is either incapable of fixing it or just too lazy to.
can I see an example of a basic @mod file (Main.java) so I can see what your version of neat is? When I code, I usually don't spend time making it neat.
can I see an example of a basic @mod file (Main.java) so I can see what your version of neat is? When I code, I usually don't spend time making it neat.
More of a picky thing, but you should maybe organise your imports. You have a lot that aren't being used.
Blame Forge for disabling all warnings in it's default Eclipse workspace a very stupid thing to do. But yeah the main class used to be a lot larger obviously.
can I see an example of a basic @mod file (Main.java) so I can see what your version of neat is? When I code, I usually don't spend time making it neat.
I think I'm gonna have to pass on that one. My code isn't very neat. Linking it might be a bad idea... It's still neater than yours, just, apparently my naming conventions don't make sense to Java coders...
I don't know if it's possible to say this without it sounding... bad... but, clearly they left a few REALLY IMPORTANT things out, like, idk: that readability is about as important as the code actually working, or that you can move code into other classes to make it easier to maintain.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
I think I'm gonna have to pass on that one. My code isn't very neat. Linking it might be a bad idea... It's still neater than yours, just, apparently my naming conventions don't make sense to Java coders...
U mad bro? It's not that, it's just that your variables imply (or loosely follow) a single-letter Hungarian Notation and I'm not personally used to that in Java. Others might actually find it super-readable.
U mad bro? It's not that, it's just that your variables imply (or loosely follow) a single-letter Hungarian Notation and I'm not personally used to that in Java. Others might actually find it super-readable.
Not mad. if anything, it's good to know that my naming scheme might not be 100% conventional in Java and Software Engineering.
Should we say... I have uncertainties about when and where to link my code. Sometimes, my code can confuse ME, and I'm the one writing it
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Not mad. if anything, it's good to know that my naming scheme might not be 100% conventional in Java and Software Engineering.
Should we say... I have uncertainties about when and where to link my code. Sometimes, my code can confuse ME, and I'm the one writing it
Lol same. Although seeing your code has reminded me about this Hungarian notation and I'm actually thankful for that. Strictly speaking, Java is very type safe and a prefix of a variable's type is not part of convention - but for the sake of readability, it might be good.
Most Java programmers seem strongly against the Hungarian notation, but it makes sense to me when dealing with complex code. The convention of camelcase still makes them easy to scan, along with reminders as to what type of object we're working with (without having to keep looking back in the code). With that said, I think single-letter prefixes are only suitable for primitive variables, but objects should be descriptive and at least two letters (but only when obvious) - e.g. "iCount" is obviously an int but "integerCount" or even "intCount" would be Integer, whereas "teCampfire" is obvious to *us Minecraft modders* that te = TileEntity. For something like "bIsValid" though, it's easy to mistake that for a boolean rather than a Block.
Variables that are only one or two letters though is discouraged in every language I know of, and should only be reserved for throw-away primitives that can't easily be described... an obvious example being "i", "j", "k", etc. in nested loops... though that's pretty rare, at least in Minecraft.
In the end none of these are rules of course, but I think I may personally rewrite all my code to follow this convention - it's how I first learned programming in high school, and for whatever reason - likely to please other developers - I abandoned it when I moved to Java. But in the end, it's more important that my own code is readable to *me* than others, and type-prefixes to variables are quite easy to ignore with camelcasing anyway - provided the entire type prefix remains lowercase, and the variable label/description itself uses camel case.
Art by me: MrPancakeWolfie@DeviantArt
Srsly?
Who taught you to hold a sword like that?
The reason why we're getting at you for messy coding is because we have to read your code to help you. To work out what you have done wrong, we need to read your code, which if your code is messy, will take a while and will make us annoyed.
What they meant by saying to not cram your code in the one class is to separate your code out into different classes. Have your main mod class be as clean as possible, make another class called ModItems or whatever and place your item / block fields, registration, recipes, etc in there. Then call a method in ModItems from your main mod class to load your items up. It seems like a trivial thing to start off with, but programming is not a job, it's an art. Each person has different coding styles, each person combats a specific issue in a different way, and each person likes code to be readable. You can cram everything together, but then no one will want to read it because it will be a pain to sift through, and this especially becomes the case when you open-source your code.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
What the heck is that supposed to mean? Even in first person when you use the rapier, you can see how the player is holding the rapier by the crossguard instead of the hilt/handle. 1st/3rd person is irelevant. If you're saying people need to have psychic-level concentration to know how to hold objects with handles properly then I'm very concerned for your mental health lol.
My point was that it's the same problem as the OP is now having, and it's *not* intentional - current developer of TiC is either incapable of fixing it or just too lazy to.
Anyway, it seems Vic's last post should work.
https://github.com/cosmicdan/Imperium/blob/master/src/main/java/com/cosmicdan/imperium4x/Main.java
Neat coding is one thing, you've completely ignored the fact that java is a class-based language.
More of a picky thing, but you should maybe organise your imports. You have a lot that aren't being used.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
Blame Forge for disabling all warnings in it's default Eclipse workspace a very stupid thing to do. But yeah the main class used to be a lot larger obviously.
I think I'm gonna have to pass on that one. My code isn't very neat. Linking it might be a bad idea... It's still neater than yours, just, apparently my naming conventions don't make sense to Java coders...
I don't know if it's possible to say this without it sounding... bad... but, clearly they left a few REALLY IMPORTANT things out, like, idk: that readability is about as important as the code actually working, or that you can move code into other classes to make it easier to maintain.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
U mad bro? It's not that, it's just that your variables imply (or loosely follow) a single-letter Hungarian Notation and I'm not personally used to that in Java. Others might actually find it super-readable.
Not mad. if anything, it's good to know that my naming scheme might not be 100% conventional in Java and Software Engineering.
Should we say... I have uncertainties about when and where to link my code. Sometimes, my code can confuse ME, and I'm the one writing it
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Lol same. Although seeing your code has reminded me about this Hungarian notation and I'm actually thankful for that. Strictly speaking, Java is very type safe and a prefix of a variable's type is not part of convention - but for the sake of readability, it might be good.
Most Java programmers seem strongly against the Hungarian notation, but it makes sense to me when dealing with complex code. The convention of camelcase still makes them easy to scan, along with reminders as to what type of object we're working with (without having to keep looking back in the code). With that said, I think single-letter prefixes are only suitable for primitive variables, but objects should be descriptive and at least two letters (but only when obvious) - e.g. "iCount" is obviously an int but "integerCount" or even "intCount" would be Integer, whereas "teCampfire" is obvious to *us Minecraft modders* that te = TileEntity. For something like "bIsValid" though, it's easy to mistake that for a boolean rather than a Block.
Variables that are only one or two letters though is discouraged in every language I know of, and should only be reserved for throw-away primitives that can't easily be described... an obvious example being "i", "j", "k", etc. in nested loops... though that's pretty rare, at least in Minecraft.
In the end none of these are rules of course, but I think I may personally rewrite all my code to follow this convention - it's how I first learned programming in high school, and for whatever reason - likely to please other developers - I abandoned it when I moved to Java. But in the end, it's more important that my own code is readable to *me* than others, and type-prefixes to variables are quite easy to ignore with camelcasing anyway - provided the entire type prefix remains lowercase, and the variable label/description itself uses camel case.
Speech / hijack over xD