Hey, how do you make an item (when right clicked on the ground) place your mob? Like in the clay soldiers mod? Also, how do you make an entity/mob stay COMPLETELY still? Is that possible?
Rollback Post to RevisionRollBack
BOTTLES: First you must stand like this...
KAZOOIE: What, wearing ridiculous glasses and a silly grin?
EDIT: No reply in awhile...guessing the person who was helping me went offline...someone else see anything wrong here in the code? (Look at my previous post too to see the 1 error i got when i recompiled...)
so sorry i got distracted in my own modding im so sorry
btw next time use code and spoiler snippets to shorten the post
ok well is your .java file exactly as follows:
JWorld_AnibusEntity.java
?
(snippets are[.spoiler] [.code]put stuff here [./code] [./spoiler]
without the "."
how could i make an animal basically that doesnt attack unless provoked and spawns both day and night (while keeping that rule)
i already have the animal all set up but i need these last crucial parts... and i cant tell which of the methods i should take from Entitymob or Entityspider
Hey, how do you make an item (when right clicked on the ground) place your mob? Like in the clay soldiers mod? Also, how do you make an entity/mob stay COMPLETELY still? Is that possible?
Completely still is possible, add this to your mob's entity file:
This forces any movement to be non-existant. Can't be pushed, moved, nothing. This is glitchy if the model has animations and it is hurt however, as it attempts to play an animation when it's hit, which causes joints to fail wildy. I think you can override it but I forget which function it is.
(BTW Inlanoche told me this code, so credit him for the help.)
src\minecraft\net\minecraft\src\JWorld_AnibusEntity.java.java:12: class JWorld_
nibusEntity is public, should be declared in a file named JWorld_AnibusEntity.j
va
public class JWorld_AnibusEntity extends EntityAnimal
^
src\minecraft\net\minecraft\src\RenderEngine.java:649: cannot access net.minecr
ft.src.java
bad class file: src\minecraft\net\minecraft\src\JWorld_AnibusEntity.java.java
file does not contain class net.minecraft.src.java
Please remove or make sure it appears in the correct subdirectory of the classp
th.
private java.util.List textureList;
Help...please?
^
Not to be rude, but use eclipse. Watch my video. Also, the error hints as to what is wrong in the error. You probably forgot to add the package snipit in your code.
is it possible to give my model a pickaxe?? http://img822.imageshack.us/img822/3041/unlesdd.png
i just scaled everything down to 0.5 and it fits perfectly, i am using 256by128 now :]
works perfectly fine. he is nearly as big as 1 normal block
yes. You have to put it in his inventory, after that, I'm not sure how to make him have that in his active hand, but the code is there. Should be do-able in the entity class.
This forces any movement to be non-existant. Can't be pushed, moved, nothing. This is glitchy if the model has animations and it is hurt however, as it attempts to play an animation when it's hit, which causes joints to fail wildy. I think you can override it but I forget which function it is.
(BTW Inlanoche told me this code, so credit him for the help.)
Actually, if you look at my Controlable Rideable mob tutorial, there is a call to check if a mob is allowed to move. this would still allow you to push the mob (if it is pushable) as you can control it while riding it.
how could i make an animal basically that doesnt attack unless provoked and spawns both day and night (while keeping that rule)
i already have the animal all set up but i need these last crucial parts... and i cant tell which of the methods i should take from Entitymob or Entityspider
check out the wolf. I'm sure it spawns night and day, and will attack if you attack it.
can any of you help me? I'm trying to get it so the mob can shoot lightning. Also, how can you make it so mobs don't take fall damage? Thanks for helping, and if you can't do it I understand.
I have a question: You showed us how to add buttons but how about text fields? I really need it!!! Also please go a little deeper in the flying mobs. Finally, I have this problem with text fields: cannot convert GuiTextField to String!! What do I have to do to get it work? Thanx in advance!!!!! and for your tutorials!!!
can any of you help me? I'm trying to get it so the mob can shoot lightning. Also, how can you make it so mobs don't take fall damage? Thanks for helping, and if you can't do it I understand.
Thanks,
-Muserae
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.
I have a question: You showed us how to add buttons but how about text fields? I really need it!!! Also please go a little deeper in the flying mobs. Finally, I have this problem with text fields: cannot convert GuiTextField to String!! What do I have to do to get it work? Thanx in advance!!!!! and for your tutorials!!!
I assume you mean fields that you can enter text in? I think someone else here did a bit of code for naming the mobs (with the name showing). He had some issues with that, I can take a closer look now that I'm finished with my next little add on to the riding tutorial.
I'll look back at flying, and maybe do some more. Just got my flything to fly me around on it's back, will post a vid on that too. What did you want me to go more into on the details. I can be sure to put that in. PM me.
Could you look at this code to see what´s wrong with it.
There were times when I was starting this up where I couldn't find my mobs either. That's why I did the spawn block thing. It's a good way to get you mob right then and there. If you have made a block, it's not that hard to add this.
Funny thing now is my mobs are everywhere... Even when I start a new game.
For some reason my main mod java file keeps remaining as a txt file(how to fix plz?), Also i cant find my mob anywhere, so i decided to export, it only gave me 3 of the files but not the main mod file, I continue anyway and then i mod a vannila.jar with SPC and Modloader...I put in "/spawn Anibus" and it doesnt recognize it :sad.gif:
Also i dont get the spawn block tutorial as in the part where you have to start putting code into the main mod file...
Could you look at this code to see what´s wrong with it.
I am not sure, but I ended up getting my mob to start spawning when I added it to BiomeGenBase.java. I later added it to the desert biome.
spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntitySheep.class, 12)); This is just as an example of the sheep. spawnableCreatureList is for your general creatures, spawnableMonsterList are for your aggressive mobs and spawnableWaterCreatureList is for your aquatic mobs. The number at the end I presume is the frequency the mob spawns.
For some reason my main mod java file keeps remaining as a txt file(how to fix plz?), Also i cant find my mob anywhere, so i decided to export, it only gave me 3 of the files but not the main mod file, I continue anyway and then i mod a vannila.jar with SPC and Modloader...I put in "/spawn Anibus" and it doesnt recognize it :sad.gif:
Also i dont get the spawn block tutorial as in the part where you have to start putting code into the main mod file...
help please?
I don't think that SPC will help, unless you add you mob to minecraft's own entity listing. What don't you get about the code in the main mod file? If a part is unclear, let me know, and I will try and explain it better. Please understand that you are going into an area of modding that is above the beginner level, to continue down this path you need to understand the code and java, or it's going to be an uphill battle.
I am all for sharing my knowledge, but I'm not going to go into the basics of coding. Mainly because I am learning Java as I do this stuff. I'm not qualified.
Techne doesn't like producing texture maps higher than 64x32, we all know that's not nearly as great of a texture, especially if you're making nice looking mobs, as could be done. I have tested and experimented and if you create your model on Techne and are all finished, export as a texturemap. Open that texturemap up in an image editor. Re-size this image to something like 512x256, this will allow you more space for details. When you load the texmap into Techne you may get an error about 96dpi, just ignore it. That is how I went from this model:
To this model using a 512x256 texture map. All the while this is not using any other renderer other than the basic ModelRenderer, no Turbo.
And a view of it in game as a proof of concept.
(This is a first screenshot of the mob, some of the textures have later been flipped and fixed, so yeah.)
I am not sure, but I ended up getting my mob to start spawning when I added it to BiomeGenBase.java. I later added it to the desert biome.
spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntitySheep.class, 12)); This is just as an example of the sheep. spawnableCreatureList is for your general creatures, spawnableMonsterList are for your aggressive mobs and spawnableWaterCreatureList is for your aquatic mobs. The number at the end I presume is the frequency the mob spawns.
I thought that is what ModLoader.AddSpawn(JWorld_HorseEntity.class, 100, EnumCreatureType.creature); does. It seems to work fine for me. The next vid I'm posting is riding on the back of a flying creature. I have to make the vid, but everytime I've tested it, I see my new mobs all over the place. I should probably drop the number I use down to like 15, as I see alot of people just cutting and pasting, instead of learning from the tutorial.
I also saw either a method or var in EntityLiving, EntityAnimal, or EntityCreature that deals with if the mob can "spawn here". may be something else to look at. In any case, there are ways to control this stuff better, but I'm basing all my learning off ModLoader.
I don't think that SPC will help, unless you add you mob to minecraft's own entity listing. What don't you get about the code in the main mod file? If a part is unclear, let me know, and I will try and explain it better. Please understand that you are going into an area of modding that is above the beginner level, to continue down this path you need to understand the code and java, or it's going to be an uphill battle.
I am all for sharing my knowledge, but I'm not going to go into the basics of coding. Mainly because I am learning Java as I do this stuff. I'm not qualified.
Well i got the mob to spawn but it doesnt have its texture, I think its because the main mod file doesnt want to be a java file. When i reobfuscate, it only detects 3 new class files, but it doesnt detect the main mod file. How do i make my main mod file into a java file? (Yes i put .java at the end but it still remains a txt file...)
so sorry i got distracted in my own modding im so sorry
btw next time use code and spoiler snippets to shorten the post
ok well is your .java file exactly as follows:
JWorld_AnibusEntity.java
?
(snippets are[.spoiler] [.code]put stuff here [./code] [./spoiler]
without the "."
i already have the animal all set up but i need these last crucial parts... and i cant tell which of the methods i should take from Entitymob or Entityspider
Completely still is possible, add this to your mob's entity file:
This forces any movement to be non-existant. Can't be pushed, moved, nothing. This is glitchy if the model has animations and it is hurt however, as it attempts to play an animation when it's hit, which causes joints to fail wildy. I think you can override it but I forget which function it is.
(BTW Inlanoche told me this code, so credit him for the help.)
Not to be rude, but use eclipse. Watch my video. Also, the error hints as to what is wrong in the error. You probably forgot to add the package snipit in your code.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
yes. You have to put it in his inventory, after that, I'm not sure how to make him have that in his active hand, but the code is there. Should be do-able in the entity class.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Actually, if you look at my Controlable Rideable mob tutorial, there is a call to check if a mob is allowed to move. this would still allow you to push the mob (if it is pushable) as you can control it while riding it.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
check out the wolf. I'm sure it spawns night and day, and will attack if you attack it.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Thanks,
-Muserae
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.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
I assume you mean fields that you can enter text in? I think someone else here did a bit of code for naming the mobs (with the name showing). He had some issues with that, I can take a closer look now that I'm finished with my next little add on to the riding tutorial.
I'll look back at flying, and maybe do some more. Just got my flything to fly me around on it's back, will post a vid on that too. What did you want me to go more into on the details. I can be sure to put that in. PM me.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
There were times when I was starting this up where I couldn't find my mobs either. That's why I did the spawn block thing. It's a good way to get you mob right then and there. If you have made a block, it's not that hard to add this.
Funny thing now is my mobs are everywhere... Even when I start a new game.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Also i dont get the spawn block tutorial as in the part where you have to start putting code into the main mod file...
help please?
I am not sure, but I ended up getting my mob to start spawning when I added it to BiomeGenBase.java. I later added it to the desert biome.
spawnableCreatureList.add(new SpawnListEntry(net.minecraft.src.EntitySheep.class, 12)); This is just as an example of the sheep. spawnableCreatureList is for your general creatures, spawnableMonsterList are for your aggressive mobs and spawnableWaterCreatureList is for your aquatic mobs. The number at the end I presume is the frequency the mob spawns.
I don't think that SPC will help, unless you add you mob to minecraft's own entity listing. What don't you get about the code in the main mod file? If a part is unclear, let me know, and I will try and explain it better. Please understand that you are going into an area of modding that is above the beginner level, to continue down this path you need to understand the code and java, or it's going to be an uphill battle.
I am all for sharing my knowledge, but I'm not going to go into the basics of coding. Mainly because I am learning Java as I do this stuff. I'm not qualified.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Techne doesn't like producing texture maps higher than 64x32, we all know that's not nearly as great of a texture, especially if you're making nice looking mobs, as could be done. I have tested and experimented and if you create your model on Techne and are all finished, export as a texturemap. Open that texturemap up in an image editor. Re-size this image to something like 512x256, this will allow you more space for details. When you load the texmap into Techne you may get an error about 96dpi, just ignore it. That is how I went from this model:
To this model using a 512x256 texture map. All the while this is not using any other renderer other than the basic ModelRenderer, no Turbo.
And a view of it in game as a proof of concept.
(This is a first screenshot of the mob, some of the textures have later been flipped and fixed, so yeah.)
I thought that is what ModLoader.AddSpawn(JWorld_HorseEntity.class, 100, EnumCreatureType.creature); does. It seems to work fine for me. The next vid I'm posting is riding on the back of a flying creature. I have to make the vid, but everytime I've tested it, I see my new mobs all over the place. I should probably drop the number I use down to like 15, as I see alot of people just cutting and pasting, instead of learning from the tutorial.
I also saw either a method or var in EntityLiving, EntityAnimal, or EntityCreature that deals with if the mob can "spawn here". may be something else to look at. In any case, there are ways to control this stuff better, but I'm basing all my learning off ModLoader.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Well i got the mob to spawn but it doesnt have its texture, I think its because the main mod file doesnt want to be a java file. When i reobfuscate, it only detects 3 new class files, but it doesnt detect the main mod file. How do i make my main mod file into a java file? (Yes i put .java at the end but it still remains a txt file...)