Started by
pretztail777
on
Topic category: Advanced modding
Hello! I am making a mostly-animals mod, and most of them are going to have many different colors. Is there a way I could code one mob to load one of many different textures on spawning (kind of like vanilla cats) so I don't have to make a bunch of the same mob? Thank you in advance!
Does anyone know?
I think you have to edit the java of the mob after it's created, and add it in, since I'm sure MCreator doesn't have any texture variation yet
@#2 Thank you, but I know I have to do that and have tried to. I just don't know what code to put in. ^^
@#2.1 try looking in cat code
@#2.1.1 I've thought about doing that, I just can't quite figure out how to access the base Minecraft code. I have MCP installed but I'm not sure how to decompile it.
@#2.1.1.1 Don'y need to download anything, go into Mcreator folder-forge-build-tmp-recompSrc-net-minecraft-entity-passive. Then open ocelot.java with a text porgram.
@#2.1.1.1.1 I will try that. Thank you very much!
Maybe make multiple mobs...?
@#3 He already said:
@#3.1 oh...
So have you discovered?
I want to know too...
Try making a item that spawns the mob instead of the spawn egg, and make multiple mobs with different textures, in the events page for the item. Try to make different percentages and likelyhoods of spawning different types of mob.
Hi, I know that this has some time, but since I am looking for this also for mcreator 1.8.0 there are some things that I have to say about some comments, for example the ocelot data is a good suggestion but it has a problem, the problem is that only serves for domesticable mobs, then this is the problem of the object to generate it this will not work for the commands that is basically one of the things I'm looking for, that's why I've tested with the data of the flame and the parrot, but there is an error, this is the error: can not find symbol return FORMER_TEXTURES [entity.getVariant ()];
^
Symbol: method getVariant ()
location: variable entity of type Entity.
the FORMER_TEXTURES is to differentiate the mob, I will try to find the solution and when I find it I will put the code here, but if someone finds it before please put the code that is very important for many of the users of mcreator.
I know this is pretty old, but I've been looking into the same thing, and I just came up with something. You guys can test it if you want. I'm not too coding savvy, but I know some stuff about it.
You could create multiple mobs, and an item as the egg, but then go into the code and then try to set the egg to be the item egg you made for each of them, along with a random chance for each, but you'll have to state that if one appears, to prevent any more from spawning.
Idk though, just a thought. Also, look into villagers code. that should help.