Started by
tetch_wolf
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, how are you?
So, I'm creating a mod that has several creatures with varying texture, I took the spawn egg from a certain type of creature and made an item to serve as a general spawn
I wish there was a chance for each creature to be born, so I did this procedure for when I right-clicked on a block
so far so good, the problem is that when I enter the game, only the entity "ruby one" spawna, while "ruby two", no
can someone help me? am i doing something wrong? if someone is watching this and is willing to help me, please explain me with prints, because i am brazilian and i use the translator
thx
change the else if to else
hum thats a good way to turn around the multiple textures thing... so you made a new 'egg' item that has that procedure when you right click a block i imagine... i guess you could use 2 'If, Do' instead of just one like that too. everytime i use 'else' i got errors too
can you explain me why you 'random 0,1' instead of 'random 1' ? i dont understand this part much yet..
it means generate a pseudo random double value from 0.0 to 1.0
Remove the condition from the else if, just turn it into an else (like N4zaris said)
The first condition is only true if the variable is littler than 0.5. If it isn't, it will try to trigger the second one, which will never be true, since the variable can't be littler than 0.5 if we have just said it isn't.
Simply removing the condition from the second part should fix the procedure
(I'm sorry for my bad English)
thx guys :D
How do I get my "random" variable into the "set___ to" procedure? How do I also create the XYZ dependancies? sorry a little know to local variables
Is there a way to do this with 4 model/mobs/skins..etc... I have it set up that way except it spawns two mobs at a time with the random variable? is there a way to pick 1 of 4?
Use an item NBT tag to determine the random value beforehand, rather than determining it per event. What's happening in yours is most likely that it's picking a new random number for every possibility, which means that instead of getting one result based on a random chance, you're getting multiple results because there were multiple chances that succeeded.
are you able to post an example of what you mean?
what are the specific procedures that you would need to use in this instance! I've looked through some of them Im just uncertain of how to arrange them
Anyone figured out how to make more than one variant?