public static int PlacementPreviewHook_AfterPlacement( int x, int y, int type = 597, int style = 0, int direction = 1, int alternate = 0) { if (Main.netMode != 1) { return(TETeleportationPylon.Place(x - 1, y - 3)); } NetMessage.SendTileSquare(Main.myPlayer, x, y - 1, 5, TileChangeType.None); NetMessage.SendData(87, -1, -1, (NetworkText)null, x - 1, (float)(y - 3), (float)TETeleportationPylon._myEntityID, 0.0f, 0, 0, 0); return(-1); }
public override void NetPlaceEntityAttempt(int x, int y) { TeleportPylonType pylonType; if (!this.TryGetPylonTypeFromTileCoords(x, y, out pylonType)) { TETeleportationPylon.RejectPlacementFromNet(x, y); } else if (Main.PylonSystem.HasPylonOfType(pylonType)) { TETeleportationPylon.RejectPlacementFromNet(x, y); } else { NetMessage.SendData(86, -1, -1, (NetworkText)null, TETeleportationPylon.Place(x, y), (float)x, (float)y, 0.0f, 0, 0, 0); } }