I was watching at the moment where you explain the Syntax for "EntityType.Builder.of(TomahawkProjectileEntity::new, ...)". For sure the Syntax is weird, especially for people who start coding. But to understand why you need to specify the , it is quite "easy". In fact, Generic stuff is computed mainly at "Object" time, if it makes sense. Here, you're not into an "Object" time but in "Class" time because Builder.of is a static method. Static, is a keyword to handle stuff at "Class" level. And at class level, generic doesn't make any sense if I may say so. It doesn't know how it should read next generic parameters, ... To illustrate it, try to create a static variable with a generic parameter into any class and it will always get a Compiling error. As such, you have to hint your compiler, what kind of type your builder is waiting. That's why this particular Syntax exists. Another way to see it is if you remove the particular hint, if you try to see the parameter it will probably wait for a generic type (like T). As such, TomahawkProjectileEntity is not a child of T and thus is invalid here. Hope it will help the community to understand better this particular syntax and behavior. And thanks for the modding tutorial ! :)
@@affluora I am somewhat. For 1.21.1, I would probably look into Fabric. However, learning either Fabric or NeoForge with a good Java foundation will help you learn the other one much faster! Yes, curseforge supports both fabric and neoforge :)
Happy New Year! I have a question. If I follow the block entity coding tutorial for version 1.20.x and just check the changes for version 1.21.1, will it still work without any issues? (I’m not a native English speaker, so please excuse any mistakes.)
I've wanted to learn this for like 3 months 😂 thank you!
Oh I made something like this some time ago. Would be helpful to know what i could do better once the fabric version comes out.
Happy New Year
Happy new year 🥂🎉
I was watching at the moment where you explain the Syntax for "EntityType.Builder.of(TomahawkProjectileEntity::new, ...)".
For sure the Syntax is weird, especially for people who start coding.
But to understand why you need to specify the , it is quite "easy". In fact, Generic stuff is computed mainly at "Object" time, if it makes sense.
Here, you're not into an "Object" time but in "Class" time because Builder.of is a static method. Static, is a keyword to handle stuff at "Class" level. And at class level, generic doesn't make any sense if I may say so. It doesn't know how it should read next generic parameters, ...
To illustrate it, try to create a static variable with a generic parameter into any class and it will always get a Compiling error.
As such, you have to hint your compiler, what kind of type your builder is waiting. That's why this particular Syntax exists.
Another way to see it is if you remove the particular hint, if you try to see the parameter it will probably wait for a generic type (like T). As such, TomahawkProjectileEntity is not a child of T and thus is invalid here.
Hope it will help the community to understand better this particular syntax and behavior.
And thanks for the modding tutorial ! :)
Wouldn't calling both Super and Hurt on onHitEntity make the tomahawk deal damage twice?
If I was going to create a new mod would you recommend using neoforge over forge ?
If it's between those, I recommend NeoForge 1.21.1 🙏🏻
@@ModdingByKaupenjoe Does that imply Fabric is best? Would I be able to have my mod downloadable form curseforge if it's fabric or neoforge?
@@affluora I am somewhat. For 1.21.1, I would probably look into Fabric. However, learning either Fabric or NeoForge with a good Java foundation will help you learn the other one much faster!
Yes, curseforge supports both fabric and neoforge :)
Hiiiiiiiiiiii ❤
Happy New Year!
I have a question.
If I follow the block entity coding tutorial for version 1.20.x and just check the changes for version 1.21.1, will it still work without any issues?
(I’m not a native English speaker, so please excuse any mistakes.)
"without any issues" unsure. You can certainly try, but it's going to be a challenge. Also depends on your level of java knowledge 🙏🏻
@@ModdingByKaupenjoe Thank you!