if your talking about the Actual names of the files, its RenderRottwieler and Rottwieler.java
from the file i exported from Techne
So Rottwieler.java is the model file? (exported from Techne)
If so, then the line should be:
new RenderRottwieler(new Rottwieler(), 0.4F));
In the future i'd suggest conforming to what Notch has done and naming the model file as ModelAnimalNameHere.java Plus it keeps things organized and easier to find.
So I'd just delete super.render(f, f1, f2, f3, f4, f5); from the model code?
I'd say take out the rendering of the head/body/legs and leave the super call in there. Personally I don't think it will change anything though since you are extending ModelBase, not ModelQuadruped. But you can give it a try and see what happens.
Is there a way to get a mob to only spawn on a specific type of blocks, say I want it to only spawn in trees, would the getBlockId(int x, int y, int z) method in the world class be the one that could help in this.
Yes, check out the method getCanSpawnHere() in EntityAnimal for a good example. It makes it so animals can only spawn on grass blocks with enough light.
I am trying to make a Gui very similar the achievmnet one in the game i have 39 errors and i will solve them one by one but i need help on this one
src\minecraft\net\minecraft\src\GuiMission.java:6:cannot find symbol
symbol: class Minecraft
location; class net.minecraft.src.GuiMission
public GuiMission(Minecraft minecraft)
i see the same code in the achievmnet Gui help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0
Without seeing the code, do you have this line at the top?
import net.minecraft.client.Minecraft;
To reference the class Minecraft you need to import the package that its in (since it is separate from the net.minecraft.src package).
That first number (the number appearing after the name string) is the ID of that tool material. You set Titanium to 2, but that ID is already taken by Iron, you set Litrinium to 3 which is already taken by Emerald and so on. You need to give all four your new tool material types a UNIQUE ID.
Hi
After I made some blocks,I wanted to try to create my own passive mod, but i get these five errors:
src\minecraft\net\minecraft\src\Mod_Creature.java:1: class, interface, or enum expected
public void Mod_Creature
^
src\minecraft\net\minecraft\src\Mod_Creature.java:7: class, interface, or enum expected
Modloader.AddSpawn(EntityCreature.java, 100, EnumCreatureType.creature);
^
src\minecraft\net\minecraft\src\Mod_Creature.java:9: class, interface, or enum expected
}
^
src\minecraft\net\minecraft\src\Mod_Creature.java:11: class, interface, or enum expected
public void AddRenderer(Map map)
^
src\minecraft\net\minecraft\src\Mod_Creature.java:14: class, interface, or enum expected
}
^
I will help you figure out how to read these errors (so you can try to fix them on your own later on). Lets look at the very first compile error here:
src\minecraft\net\minecraft\src\Mod_Creature.java:1: class, interface, or enum expected
public void Mod_Creature
First, it tells you which file the error is in. In this case Mod_Creature.java (which by the way will need to be changed to mod_Creature.java for it to be ModLoader compatible). After that you see the :1, this tells you which LINE in the code the error occurs. So now you have a very precise place to start looking for the error. Lastly, it gives a description of the error that occurs in Mod_Creature at line 1, in this case it says "class, interface, or enum expected". Obviously you don't have much coding experience but by simply looking others posted codes, you'll notice they begin with:
public class mod_BlahBlah ...
I am taking an educated guess and saying you are missing the word 'class' right there.
Thank you for replaying
I changed the code as you suggested, but still the name doesn't appear above the mobs head.
This is where I changed the code :
Should I change anything here or just leave it as it is?
Thank you.
Other than that original error, I don't know much about displaying text above a creature's head. But looking into the RenderPigman file, I believe that:
Since you don't override it in the RenderPigman file, you need to tell the program where to look for the renderLivingLabel function, which is in the super class. If that doesn't fix it, i'm not sure what the problem is.
Also, if that doesn't solve it, try just putting the string "Tom" into the string parameter of the renderLivingLabel call. If it still doesn't work, then there is something wrong with the way you are using that specific function.
Sorry to be a bother maybe I'm not looking properly, but how would I check or how would I know if the text is null.
Again sorry for bothering you with this, it might be just simple thing I'm over looking.
The problem is that when you initialize your creature, you set an int randomly between 0 and 5 and then try to access your array mobName[] at that position. The array only has position 0, so when the int is set to anything above that you are going to get an ArrayOutOfBoundsException. Either add 5 more names to the mobName array (so that you can never go out of bounds), or take out the random int line and make
is that a right click action (it in your hand) or a right click on it on the ground. I though the question was about the latter.
Its for when its held in your hand, I thought that was what it was asking about. If the question was referencing the other then I would agree, I don't think there is a way (built-in at least) to do it.
great tutorials!!! but how would i make it so that when i right click a item it spawns my mob? i tried you blocks code went into the game right clicked the item and crash!! thanks
You'll need to post the traceback (the error messages that appear when the game crashed) for anyone to be able to help in pinpointing the problem.
Can't help you there. I can make items, but never played around with the code yet. I didn't think you could right click on an item...
Yes, you definitely can. Item.java has a function called OnItemRightClick(). I've used it to create an umbrella that lets you gracefully float to the ground.
Ok fixed the pig problem but I'm not sure on how to change the hitbox size to his whole body or give him walk animations! Help?
For animations, look back a few posts as it was mentioned. Look in ModelBiped class (or ModelQuadruped if its 4-legged) to see how leg/arm/head animations are setup. They all go into the setRotationAngles method.
Hitbox size can be changed by making this call inside the creatures constructor function:
setSize(newWidth, newHeight);
Despite looking like it may change the creature's actual width and height, it does not as I found out. Only changes the hitbox size.
Thanks a lot! You saved me a lot of time!
But now I get another error that gets spammed alot:
java.lang.NoSuchMethodException: net.minecraft.src.ModelSuperMeatboy.<init>(net.minecraft.src.World)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at net.minecraft.src.SpawnerAnimals.performSpawning(SpawnerAnimals.java:139)
at net.minecraft.src.World.tick(World.java:2033)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1192)
at net.minecraft.client.Minecraft.run(Minecraft.java:480)
at java.lang.Thread.run(Unknown Source)
Found it, you have another mistake in your mod_Meatboy file. The line:
But another thing, all the spots where you have net.minecraft.src.__FileName__ can be changed to leave out the net.minecraft.src part. This is because your mod_Meatboy file is in the same package (aka directory) as all the other net.minecraft.src files. You can tell that it is in the same package by looking at the very top of your mod_Meatboy file.
I have been modding for a long time but when I recompile my mod it says Map doesnt exist? I have everything like yours except different names and model(I think you can help me without seing my source code aka i dont wanna make it public)
Might as well get the simplest question answered first, do you have this line somewhere at the top of your file?
0
So Rottwieler.java is the model file? (exported from Techne)
If so, then the line should be:
In the future i'd suggest conforming to what Notch has done and naming the model file as ModelAnimalNameHere.java Plus it keeps things organized and easier to find.
0
I'd say take out the rendering of the head/body/legs and leave the super call in there. Personally I don't think it will change anything though since you are extending ModelBase, not ModelQuadruped. But you can give it a try and see what happens.
0
Yes, check out the method getCanSpawnHere() in EntityAnimal for a good example. It makes it so animals can only spawn on grass blocks with enough light.
0
In the mod file try changing:
To:
0
Without seeing the code, do you have this line at the top?
To reference the class Minecraft you need to import the package that its in (since it is separate from the net.minecraft.src package).
0
Your problem, I believe, is right here in EnumToolMaterial:
That first number (the number appearing after the name string) is the ID of that tool material. You set Titanium to 2, but that ID is already taken by Iron, you set Litrinium to 3 which is already taken by Emerald and so on. You need to give all four your new tool material types a UNIQUE ID.
0
I will help you figure out how to read these errors (so you can try to fix them on your own later on). Lets look at the very first compile error here:
First, it tells you which file the error is in. In this case Mod_Creature.java (which by the way will need to be changed to mod_Creature.java for it to be ModLoader compatible). After that you see the :1, this tells you which LINE in the code the error occurs. So now you have a very precise place to start looking for the error. Lastly, it gives a description of the error that occurs in Mod_Creature at line 1, in this case it says "class, interface, or enum expected". Obviously you don't have much coding experience but by simply looking others posted codes, you'll notice they begin with:
I am taking an educated guess and saying you are missing the word 'class' right there.
0
yeah, just change that string to the designated name of another mob.
0
Other than that original error, I don't know much about displaying text above a creature's head. But looking into the RenderPigman file, I believe that:
should look like:
Since you don't override it in the RenderPigman file, you need to tell the program where to look for the renderLivingLabel function, which is in the super class. If that doesn't fix it, i'm not sure what the problem is.
Also, if that doesn't solve it, try just putting the string "Tom" into the string parameter of the renderLivingLabel call. If it still doesn't work, then there is something wrong with the way you are using that specific function.
0
The problem is that when you initialize your creature, you set an int randomly between 0 and 5 and then try to access your array mobName[] at that position. The array only has position 0, so when the int is set to anything above that you are going to get an ArrayOutOfBoundsException. Either add 5 more names to the mobName array (so that you can never go out of bounds), or take out the random int line and make instead.
0
Its for when its held in your hand, I thought that was what it was asking about. If the question was referencing the other then I would agree, I don't think there is a way (built-in at least) to do it.
0
You'll need to post the traceback (the error messages that appear when the game crashed) for anyone to be able to help in pinpointing the problem.
Yes, you definitely can. Item.java has a function called OnItemRightClick(). I've used it to create an umbrella that lets you gracefully float to the ground.
0
For animations, look back a few posts as it was mentioned. Look in ModelBiped class (or ModelQuadruped if its 4-legged) to see how leg/arm/head animations are setup. They all go into the setRotationAngles method.
Hitbox size can be changed by making this call inside the creatures constructor function:
Despite looking like it may change the creature's actual width and height, it does not as I found out. Only changes the hitbox size.
0
Found it, you have another mistake in your mod_Meatboy file. The line:
Should be:
But another thing, all the spots where you have net.minecraft.src.__FileName__ can be changed to leave out the net.minecraft.src part. This is because your mod_Meatboy file is in the same package (aka directory) as all the other net.minecraft.src files. You can tell that it is in the same package by looking at the very top of your mod_Meatboy file.
Anyways, so the line I changed could like this:
You don't HAVE to delete the net.minecraft.src from in front, it will work either way, its all preference. Just letting you know its not necessary.
0
Might as well get the simplest question answered first, do you have this line somewhere at the top of your file?