By stefan182
#35239 Heey everyone,

I used to make models for pixelmon when i wasnt very good at it, so only 1 of them (venonat) is in the game. I started making an other mod with some people, but we have some problems in the coding and i think you could help us out. We have 4 problems.

1 is that the models rarely spawn, but we cant figure out why.
2 is that models that spawn in the water dont do damage and they sink to the bottom.
3 is that we cant code the GIScale right. Every model is reset to 1,0 if we add it.
4 is that we cant find any tutorials on how to properly animate a model using forge. We did find tutorials where is recommended that you use the animation of a pig, but we used rotation in the blocks that need to be animated and then they are reset to 0 rotation. So then every block is pointing straight down and they are sticking out more to the front or back. We tried to use pieces but they give errors.

So you could help us by sending a link to a good tutorial for fixing those problems or maybe sending me a workspace of a model that spawns in water and a model that spawns on land. I used to have access to the dropbox folder, but i deleted it because i kept getting messages about changes in the folder.

Thanks for your help,
Stefan182

User avatar
By MrMasochism
#35411 Minecraft modding tutorials are by and large awful. But that's cause they are written by and for people who don't know how to code...

You can adjust rarity of an entity when you register it with the minecraft spawner (if you have to use that abomination). If they are sinking then you need to look at the differences in the inheritance tree between a normal mob and a water mob (like a squid), you'll see they follow different paths and as a result the moveEntity method (or whatever it's called) is very different (gravity handling being a big difference) also you can look at using an ai to handle movement in water.

sounds like you are having issues distinguishing between ints and floats. Minecraft modding is not a good way to learn the basics of coding, I'd suggest you spend some time in some good tutorials (for general coding) or, even better, a decent text book.

Hope this helps
By stefan182
#35741 Well, we tried some things you suggested, but we get errors or it just doesnt work.

We copied everything from the squid and used it on our fish models, but they keep sinking. We are still rookies so we dont know what you meant with the moveEntity and the gravity handling. I am happy with your post, but could you send me some links to sites where everything is explained clearly for forge. Maybe a site where some of the coders here learned how to code. I tried to find some good tutorials myself but i cant find one.

Thanks for the help so far
JOIN THE TEAM