I thought that is what ModLoader.AddSpawn(JWorld_HorseEntity.class, 100, EnumCreatureType.creature); does. It seems to work fine for me.
I added that line to my mod file, yet regardless, nothing would spawn on its own, I had to manually add the line I pasted above into the BiomeGen before anything started to spawn on its own.
I added that line to my mod file, yet regardless, nothing would spawn on its own, I had to manually add the line I pasted above into the BiomeGen before anything started to spawn on its own.
I did this too and it worked but my mob looks like this for some reason...
g1 is written on its head....it doesnt have its snount..it doesnt have its texture, ears, its just the basic body for some reason :/
EDIT: Apparently i cant make anymore posts for today >.<
To the post below me: That just causes a bunch of errors when i recompile...
I did this too and it worked but my mob looks like this for some reason...
g1 is written on its head....it doesnt have its snount..it doesnt have its texture, ears, its just the basic body for some reason :/
EDIT: Apparently i cant make anymore posts for today >.<
To the post below me: That just causes a bunch of errors when i recompile...
2 things are missing which is causing this. First, the texture. Did you add it to the minecraft.jar file? if not, there you go.
If you read my tutorial completely, I explain this issue. you are missing the map.put() method in your main mod file to tell it to render with a specific model file.
In your Model file for your mob, change extends ModelQuadruped to extends ModelBase
not a good idea, unless you set up all the body rotations yourself. Understand what it means to extend a class. it means that all the code from the class being extended is available. So the rotation for leg1-4 and head are already set. With the quadruped, the body is rotated 90 degrees, so you have to correct that.
I try and post enough detail that this stuff can be picked up. I don't mind answering questions, but if you have an issue, please go back over the tutorial first.
[Rayvyn, I gave you a rep point for the info you PMed me. You should post that)
not a good idea, unless you set up all the body rotations yourself. Understand what it means to extend a class. it means that all the code from the class being extended is available. So the rotation for leg1-4 and head are already set. With the quadruped, the body is rotated 90 degrees, so you have to correct that.
I try and post enough detail that this stuff can be picked up. I don't mind answering questions, but if you have an issue, please go back over the tutorial first.
Yeah, puting it to extend to Base gives me a bunch of errors, I will try inlanoches suggestion...
P.S. Yeah, this is my actual account, its just that i lost the password to it after this curse conversition, recovered my old account now.
EDIT: But WAIT, how do i get my main mod file turned into a java file??? I need the main mod file to be a java file dont I? It keeps staying as a txt. file >.<
Rollback Post to RevisionRollBack
Famous Nyan seed has caves now along with 3 other special maps for MCPE! Check here for downloads: http://tinyurl.com/c75ax6y
Can't tell you about the lightning, I haven't done anything on shooting or throwing, or lightning to that matter.
As to the no fall damage, there is an entity boolean for isCollidedHorizontally, there might be a similar check for vertical. You can also do what is done with the chicken and reduce the fall speed (see my flying mob stuff). Lastly, and it takes more process power, but you can run an onLivingUpdate check to see if there is a block 1-3y below you, and if so, set the motionY to something small like 0.15F.
The chicken code is the only way I have actually tested, but you fall slow.
Alright, thanks. Do you know if there's anyway to make it so they spam sneaking and jump to make it like they're dancing? I'm not very good at making mobs :/
Alright, thanks. Do you know if there's anyway to make it so they spam sneaking and jump to make it like they're dancing? I'm not very good at making mobs :/
Dancing? hmm. Well going by what I have done with forcing a mob to stay still, you might be able to have it do your own animations while it's not moving. I was going to look into something like this soon, kind of an interaction with mobs, like have them wave at you when you interact with them. Not a practical application, I know, but just a sampler. Will post that if I work it out. Gotta see how to make the entity java code talk to the model java code.
@Inlanoche I understand that, but my main mod file will not automatically go into a .java file, it remains a txt file, I just need to know how to make my main mod file into an actually JAVA file.
Rollback Post to RevisionRollBack
Famous Nyan seed has caves now along with 3 other special maps for MCPE! Check here for downloads: http://tinyurl.com/c75ax6y
@Inlanoche I understand that, but my main mod file will not automatically go into a .java file, it remains a txt file, I just need to know how to make my main mod file into an actually JAVA file.
(inLanoche, the broken record)
Are you using eclipse as your editor for the code? Just do a save as, and make sure to put the extension .java. Java code is just straight text anyway, you could just close out and rename the file as *.java and that should work also.
If you are not using eclipse, sorry, but you're just making life hard for yourself.
@Inlanoche I understand that, but my main mod file will not automatically go into a .java file, it remains a txt file, I just need to know how to make my main mod file into an actually JAVA file.
As I am going over the mess I have made with entity here, and GUI there, I would like to bring up something that I have (in passing) brushed apon. Sorry if my context is wrong, but I beleive the term is sub classing. You do this everytime you add "extends <another class>" at the top of your code. This becomes very powerful and could save you a lot of time.
First off, I am not a Java expert. I do understand about how coding works (again not an expert), but I do think that this will be useful. Let's take my last 2 projects mounts, and flying mounts.
instead of making a horse entity and a flything entity extend EntityAnimal, what I should do is make a Super class for mountable mobs, such as (using my own naming style) JWorld_MountsEntity that extends EntityAnimal. with this class I could add all my mount code. If I want it to be slick, I could also make the item needed to mount a variable that could be set in a Sub class.
Now when I go to make any mountable mob, I can have it extend JWorld_MountsEntity. I wouldn't have to script all that stuff for mounting as I did for my horse and flything, that was alot of wasted code. Furthermore, if I wanted to make more mountable mobs, I don't have to work out that code again. It would then be easy to make mountable horses, dragons, oxes, or what ever you could think of, without having to re-write the same code over and over.
Ah, you say, but doesn't your flything fly? and your horse does not? True, and there are ways to handle this too. You can add a global boolean var that checks if your mob is a flying mob, and just set that in your sub class. You could also override a method from the Super class, by retyping in in your sub class. You can also have it do all that it used to by using the Super() call (with the same variables passed to it), then make the needed changes afterwards. This is seen almost everywhere, just look at the model files.
This is something to seriously look at as you are practicing for you final mod. I hope you are practicing, becuase things get sloppy if you try to create while learning. For me, this JWorld is just a testing ground. I will most likely kill all the code, or rename the main mod file, when I start my mod. It's better to start fresh with a solid plan and the tools to do the job.
Actually, putting all this code in a mob makes it fly quite nicely, the fall, moveEntityWithHeading, and isOnLadder isn't required if you extend entityFlying. The update player action state is a slightly modified version of the ghast's. It does not go at the player, it just wanders.
Alright, after going through your tutorial many times, and looking through all the posts on this forum, I managed to fix 22 errors to 5 errors.
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\JWorld_AnibusEntity.class.java:3: class JWorld_A
nibusEntity is public, should be declared in a file named JWorld_AnibusEntity.ja
va
public class JWorld_AnibusEntity extends EntityAnimal
^
src\minecraft\net\minecraft\src\mod_Anibus.java:5: cannot find symbol
symbol: class BaseMod
public class mod_Anibus extends BaseMod
^
src\minecraft\net\minecraft\src\mod_Anibus.java:10: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_Anibus
ModLoader.RegisterEntityID(JWorld_AnibusEntity.class, "Anibus", ModLoader.getUni
queEntityId());
^
src\minecraft\net\minecraft\src\mod_Anibus.java:10: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_Anibus
ModLoader.RegisterEntityID(JWorld_AnibusEntity.class, "Anibus", ModLoader.getUni
queEntityId());
^
src\minecraft\net\minecraft\src\mod_Anibus.java:11: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_Anibus
ModLoader.AddSpawn(JWorld_AnibusEntity.class, 100, EnumCreatureType.creature);
^
5 errors
Help please?
Rollback Post to RevisionRollBack
Famous Nyan seed has caves now along with 3 other special maps for MCPE! Check here for downloads: http://tinyurl.com/c75ax6y
I added that line to my mod file, yet regardless, nothing would spawn on its own, I had to manually add the line I pasted above into the BiomeGen before anything started to spawn on its own.
I did this too and it worked but my mob looks like this for some reason...
g1 is written on its head....it doesnt have its snount..it doesnt have its texture, ears, its just the basic body for some reason :/
EDIT: Apparently i cant make anymore posts for today >.<
To the post below me: That just causes a bunch of errors when i recompile...
Are you using ModelBase? Or ModelQuadruped/Biped?
You mean what i typed in when i used Techne and it asked? I put it ModelQuadruped.
In your Model file for your mob, change extends ModelQuadruped to extends ModelBase
2 things are missing which is causing this. First, the texture. Did you add it to the minecraft.jar file? if not, there you go.
If you read my tutorial completely, I explain this issue. you are missing the map.put() method in your main mod file to tell it to render with a specific model file.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
not a good idea, unless you set up all the body rotations yourself. Understand what it means to extend a class. it means that all the code from the class being extended is available. So the rotation for leg1-4 and head are already set. With the quadruped, the body is rotated 90 degrees, so you have to correct that.
I try and post enough detail that this stuff can be picked up. I don't mind answering questions, but if you have an issue, please go back over the tutorial first.
[Rayvyn, I gave you a rep point for the info you PMed me. You should post that)
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Yeah, puting it to extend to Base gives me a bunch of errors, I will try inlanoches suggestion...
P.S. Yeah, this is my actual account, its just that i lost the password to it after this curse conversition, recovered my old account now.
EDIT: But WAIT, how do i get my main mod file turned into a java file??? I need the main mod file to be a java file dont I? It keeps staying as a txt. file >.<
Alright, thanks. Do you know if there's anyway to make it so they spam sneaking and jump to make it like they're dancing? I'm not very good at making mobs :/
Awesome, I posted the info at the top of this page, you can add it to the 1st page if needed be.
Funny you should ask...
and here is the code if that was all too fast for you:
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Thanks, will give you credit for that.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Dancing? hmm. Well going by what I have done with forcing a mob to stay still, you might be able to have it do your own animations while it's not moving. I was going to look into something like this soon, kind of an interaction with mobs, like have them wave at you when you interact with them. Not a practical application, I know, but just a sampler. Will post that if I work it out. Gotta see how to make the entity java code talk to the model java code.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
O.O
Wow...I definitely wanna try this if nothing else to play with flying around :tongue.gif: Thanks!
(inLanoche, the broken record)
Are you using eclipse as your editor for the code? Just do a save as, and make sure to put the extension .java. Java code is just straight text anyway, you could just close out and rename the file as *.java and that should work also.
If you are not using eclipse, sorry, but you're just making life hard for yourself.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Are you using ECLIPSE?
As I am going over the mess I have made with entity here, and GUI there, I would like to bring up something that I have (in passing) brushed apon. Sorry if my context is wrong, but I beleive the term is sub classing. You do this everytime you add "extends <another class>" at the top of your code. This becomes very powerful and could save you a lot of time.
First off, I am not a Java expert. I do understand about how coding works (again not an expert), but I do think that this will be useful. Let's take my last 2 projects mounts, and flying mounts.
instead of making a horse entity and a flything entity extend EntityAnimal, what I should do is make a Super class for mountable mobs, such as (using my own naming style) JWorld_MountsEntity that extends EntityAnimal. with this class I could add all my mount code. If I want it to be slick, I could also make the item needed to mount a variable that could be set in a Sub class.
Now when I go to make any mountable mob, I can have it extend JWorld_MountsEntity. I wouldn't have to script all that stuff for mounting as I did for my horse and flything, that was alot of wasted code. Furthermore, if I wanted to make more mountable mobs, I don't have to work out that code again. It would then be easy to make mountable horses, dragons, oxes, or what ever you could think of, without having to re-write the same code over and over.
Ah, you say, but doesn't your flything fly? and your horse does not? True, and there are ways to handle this too. You can add a global boolean var that checks if your mob is a flying mob, and just set that in your sub class. You could also override a method from the Super class, by retyping in in your sub class. You can also have it do all that it used to by using the Super() call (with the same variables passed to it), then make the needed changes afterwards. This is seen almost everywhere, just look at the model files.
This is something to seriously look at as you are practicing for you final mod. I hope you are practicing, becuase things get sloppy if you try to create while learning. For me, this JWorld is just a testing ground. I will most likely kill all the code, or rename the main mod file, when I start my mod. It's better to start fresh with a solid plan and the tools to do the job.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Help please?