paxhosting.blogg.se

Minecraft gullivers mod 1.7.10
Minecraft gullivers mod 1.7.10











minecraft gullivers mod 1.7.10

You simply update the particle position with very simple trigonometry such as center + radius * cos(angle) You need to have a sense of 'radius' for the circle.

minecraft gullivers mod 1.7.10

I would have the particle 'remember' where the center of the circle should be. So the new positions would be something like (this is pseudo code because you need to put the code into the right place with a field for the center: tPos(particleCenterX + vx, this.getPosY(), particleCenterZ + vz) Summary Putting it all together: The movement code needs to be in the update for the particle class which runs on the client side. Sin and Cos functions already take and angle and separate it into the two dimensional components, so I think it should be something more like: double angle = Math.toRadians(degrees) double radius = 2.0D double vx = radius * s(angle) double vz = radius * Math.sin(angle) Then instead spawning the particles again, you should just move them.Īlso, you shouldn't move them based on current position, but recalculate from the center of the circle. Also, you're mixing up the two dimensions. Instead I think you should be multiplying by a radius for the circle as the vx and vz fields presumably indicate the difference in position relative to the center. The X and Z positions are the values in the world, so they can be numbers like 600 or 0 or -600. Your code to use trigonometry to adjust the X and Z positions looks like: double angle = Math.toRadians(degrees) double vx = (pos.getX() + 0.3) * s(angle) - pos.getZ() * Math.sin(angle) double vz = pos.getX() * Math.sin(angle) + pos.getZ() * s(angle) I'm pretty sure the math is wrong here. Additionally, I think your math is still suspicious. So I think you need your particle class to remember the center of the circle and the angle, and then in the update method for the particle you would add some angle and adjust the position (not respawn) accordingly. It might also be possible to used particles in fixed positions and 'animate' them by killing and spawning them quickly but I don't think it would work well visually. So your first mistake is that your code isn't moving the particles, it is just spawning them constantly. If you want to move the particles it would need to be in the particle class, but I kind of suspect you have it somewhere else like in an entity. The first important thing is - where is this update code? Minecraft Gulliver Mod 1.12.2 Let's go through you update() method in the hastebin link. It might spawn them in a circle, although the code for that looks a little weird for that too. I don't think your code will move them in a circle. You can either set a specific multiplier of their default size, or a range from which each mob's size will be randomly determined. Lilliputian is a mod that allows for mobs' sizes to be configured. Minecraft: Mod Showcase| GULLIVER! 4 years ago11 views.













Minecraft gullivers mod 1.7.10