Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (mobcount <= 1000 && mobrange <= 1000)
- {
- Position wc = new Position((short)sign.X, (short)sign.Y, (short)sign.Z);
- EntityMob ent = new EntityMob(0, 0, 0, 20);
- ent.ID = mobid;
- Random r = new Random();
- for (int j = 0; j < mobcount; j++)
- {
- double rsin = Math.Sin(r.Next(0, 32) / 5) * mobrange;
- double rcos = Math.Cos(r.Next(0, 32) / 5) * mobrange;
- ent.X = (double)(rsin + wc.X);
- ent.Z = (double)(rcos + wc.Z);
- ent.Y = (double)wc.Y;
- map.PlaceEntity(ent);
- }
- }
- else
- {
- valid = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement