Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  1. Position wc = new Position((short)sign.X, (short)sign.Y, (short)sign.Z);
  2.                                                         EntityMob ent = new EntityMob(0, 0, 0, 20);
  3.                                                         ent.ID = mobid;
  4.                                                         Random r = new Random();
  5.                                                         for (int j = 0; j < mobcount; j++)
  6.                                                         {
  7.                                                             double rsin = Math.Sin(r.Next(0, 32) / 5) * mobrange;
  8.                                                             double rcos = Math.Cos(r.Next(0, 32) / 5) * mobrange;
  9.                                                             ent.X = (double)(rsin + wc.X);
  10.                                                             ent.Z = (double)(rsin + wc.Z);
  11.                                                             ent.Y = (double)wc.Y;
  12.                                                             map.PlaceEntity(ent);
  13.                                                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement