public override void RandomUpdate(int i, int j)
        {
            if (!Framing.GetTileSafely(i, j - 1).active() && Main.rand.Next(10) == 0)
            {
                switch (Main.rand.Next(7))
                {
                case 0:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA1"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA1"), 0, 0, -1, -1);
                    break;

                case 1:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA2"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA2"), 0, 0, -1, -1);
                    break;

                case 2:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA3"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA3"), 0, 0, -1, -1);
                    break;

                case 3:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA4"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA4"), 0, 0, -1, -1);
                    break;

                case 4:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA5"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA5"), 0, 0, -1, -1);
                    break;

                case 5:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA6"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA6"), 0, 0, -1, -1);
                    break;

                default:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("ReachGrassA7"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("ReachGrassA7"), 0, 0, -1, -1);
                    break;
                }
            }
        }
Esempio n. 2
0
        public override void RandomUpdate(int i, int j)
        {
            if (!Framing.GetTileSafely(i, j - 1).active() && Main.rand.Next(400) == 0)
            {
                switch (Main.rand.Next(9))
                {
                case 0:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("GlowShard1"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("GlowShard1"), 0, 0, -1, -1);
                    break;

                case 1:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("GlowShard2"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("GlowShard2"), 0, 0, -1, -1);
                    break;

                case 2:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("GlowShard3"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("GlowShard3"), 0, 0, -1, -1);
                    break;

                case 3:
                    ReachGrassTile.PlaceObject(i, j - 1, mod.TileType("GlowShard4"));
                    NetMessage.SendObjectPlacment(-1, i, j - 1, mod.TileType("GlowShard4"), 0, 0, -1, -1);
                    break;
                }
            }
            if (!Framing.GetTileSafely(i, j + 1).active() && Main.rand.Next(400) == 0)
            {
                switch (Main.rand.Next(3))
                {
                case 0:
                    ReachGrassTile.PlaceObject(i, j + 1, mod.TileType("GlowShard1"));
                    NetMessage.SendObjectPlacment(-1, i, j + 1, mod.TileType("GlowShard1"), 0, 0, -1, -1);
                    break;

                case 1:
                    ReachGrassTile.PlaceObject(i, j + 1, mod.TileType("GlowShard2"));
                    NetMessage.SendObjectPlacment(-1, i, j + 1, mod.TileType("GlowShard2"), 0, 0, -1, -1);
                    break;

                case 2:
                    ReachGrassTile.PlaceObject(i, j + 1, mod.TileType("GlowShard3"));
                    NetMessage.SendObjectPlacment(-1, i, j + 1, mod.TileType("GlowShard3"), 0, 0, -1, -1);
                    break;

                case 3:
                    ReachGrassTile.PlaceObject(i, j + 1, mod.TileType("GlowShard4"));
                    NetMessage.SendObjectPlacment(-1, i, j + 1, mod.TileType("GlowShard4"), 0, 0, -1, -1);
                    break;
                }
            }
            if (!Framing.GetTileSafely(i - 1, j).active() && Main.rand.Next(4) == 0)
            {
                switch (Main.rand.Next(3))
                {
                case 0:
                    ReachGrassTile.PlaceObject(i - 1, j, mod.TileType("GlowShard1"));
                    NetMessage.SendObjectPlacment(-1, i - 1, j, mod.TileType("GlowShard1"), 0, 0, -1, -1);
                    break;

                case 1:
                    ReachGrassTile.PlaceObject(i - 1, j, mod.TileType("GlowShard2"));
                    NetMessage.SendObjectPlacment(-1, i - 1, j, mod.TileType("GlowShard2"), 0, 0, -1, -1);
                    break;

                case 2:
                    ReachGrassTile.PlaceObject(i - 1, j, mod.TileType("GlowShard3"));
                    NetMessage.SendObjectPlacment(-1, i - 1, j, mod.TileType("GlowShard3"), 0, 0, -1, -1);
                    break;

                case 3:
                    ReachGrassTile.PlaceObject(i - 1, j, mod.TileType("GlowShard4"));
                    NetMessage.SendObjectPlacment(-1, i - 1, j, mod.TileType("GlowShard4"), 0, 0, -1, -1);
                    break;
                }
            }
            if (!Framing.GetTileSafely(i + 1, j).active() && Main.rand.Next(4) == 0)
            {
                switch (Main.rand.Next(3))
                {
                case 0:
                    ReachGrassTile.PlaceObject(i + 1, j, mod.TileType("GlowShard1"));
                    NetMessage.SendObjectPlacment(-1, i + 1, j, mod.TileType("GlowShard1"), 0, 0, -1, -1);
                    break;

                case 1:
                    ReachGrassTile.PlaceObject(i + 1, j, mod.TileType("GlowShard2"));
                    NetMessage.SendObjectPlacment(-1, i + 1, j, mod.TileType("GlowShard2"), 0, 0, -1, -1);
                    break;

                case 2:
                    ReachGrassTile.PlaceObject(i + 1, j, mod.TileType("GlowShard3"));
                    NetMessage.SendObjectPlacment(-1, i + 1, j, mod.TileType("GlowShard3"), 0, 0, -1, -1);
                    break;

                case 3:
                    ReachGrassTile.PlaceObject(i + 1, j, mod.TileType("GlowShard4"));
                    NetMessage.SendObjectPlacment(-1, i + 1, j, mod.TileType("GlowShard4"), 0, 0, -1, -1);
                    break;
                }
            }
        }